:root {
    /* Light Mode (Default) */
    --primary-color: #7c3aed;
    /* Violet 600 */
    --secondary-color: #6d28d9;
    /* Violet 700 */
    --accent-color: #f59e0b;
    /* Amber 500 */
    --bg-gradient: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-color: #4c1d95;
    /* Violet 900 */
    --text-muted: #6d28d9;
    /* Violet 700 */
    --card-bg: #ffffff;
    --board-bg: rgba(255, 255, 255, 0.5);
    --cell-bg: rgba(255, 255, 255, 0.8);
    --cell-called: #7c3aed;
    --cell-last: #f59e0b;
}

body.dark-mode {
    /* Dark Mode */
    --primary-color: #a78bfa;
    /* Violet 400 */
    --secondary-color: #c4b5fd;
    /* Violet 300 */
    --accent-color: #fbbf24;
    /* Amber 400 */
    --bg-gradient: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%);
    --glass-bg: rgba(46, 16, 101, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #f5f3ff;
    --text-muted: #ddd6fe;
    --card-bg: rgba(46, 16, 101, 0.8);
    --board-bg: rgba(0, 0, 0, 0.2);
    --cell-bg: rgba(255, 255, 255, 0.05);
    --cell-called: #7c3aed;
    --cell-last: #fbbf24;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.glass-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.back-link {
    justify-self: start;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
}

.logo {
    justify-self: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.theme-btn {
    justify-self: end;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Game Area */
.game-card {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Current Number Display */
.current-number-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
    margin: 2rem 0;
}

#current-number {
    font-size: 6rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    line-height: 1;
}

.number-label {
    position: absolute;
    bottom: 30px;
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.primary-btn,
.secondary-btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    transition: transform 0.2s;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.primary-btn:active {
    transform: scale(0.95);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Board */
.board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 800px;
    background: var(--board-bg);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.board-number {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--cell-bg);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.board-number.called {
    background: var(--cell-called);
    color: white;
    font-weight: 800;
    transform: scale(1.05);
    border-color: var(--cell-called);
}

.board-number.last-called {
    background: var(--cell-last);
    color: white;
    animation: pulse 1s infinite;
    border-color: var(--cell-last);
    z-index: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* CTA Section */
.cta-section {
    margin-top: 2rem;
    text-align: center;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed var(--primary-color);
    border-radius: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-link:hover {
    background: rgba(124, 58, 237, 0.1);
}

/* Footer */
.glass-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Mobile */
@media (max-width: 600px) {
    .current-number-container {
        width: 150px;
        height: 150px;
    }

    #current-number {
        font-size: 4rem;
    }

    .board {
        gap: 4px;
        padding: 10px;
    }

    .board-number {
        font-size: 0.8rem;
        border-radius: 4px;
    }

    .controls {
        flex-direction: column;
        width: 100%;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        justify-content: center;
    }
}