:root {
    --bg-color: #0d0d12;
    --card-bg: rgba(20, 20, 25, 0.6);
    --accent-glow: #7800ff;
    --text-main: #f0f0f5;
    --text-muted: #888899;
    --border: rgba(120, 0, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.background-anim {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(120, 0, 255, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    padding: 20px;
    width: 100%;
    max-width: 500px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(120, 0, 255, 0.05);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    box-shadow: 0 0 15px var(--accent-glow);
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.accent {
    color: #a64dff;
    text-shadow: 0 0 10px rgba(166, 77, 255, 0.5);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.state {
    transition: opacity 0.3s ease;
}

.state.hidden {
    display: none;
    opacity: 0;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn.primary {
    background: linear-gradient(45deg, #7800ff, #a64dff);
    color: white;
    box-shadow: 0 5px 15px rgba(120, 0, 255, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(120, 0, 255, 0.5);
}

.btn.primary:active {
    transform: translateY(1px);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.key-box {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.key-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: #a64dff;
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
}

.timer-container {
    margin-top: 20px;
}

.countdown {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
    margin-top: 5px;
}

.error-msg {
    color: #ff4d4d;
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(120, 0, 255, 0.2);
    border-top-color: #a64dff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
