body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Fredoka', sans-serif;
    min-height: 100vh;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    max-width: 500px;
    width: 90%;
}

.glass-input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.glass-input option {
    background: #764ba2;
    color: white;
}

.btn-primary {
    background: #ff0080;
    border: none;
    background: linear-gradient(90deg, #ff0080 0%, #ff8c00 100%);
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #ff0080 0%, #ff8c00 100%);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
    }
}

.game-container {
    max-width: 600px;
    width: 95%;
}

.question-box {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.score-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
}

.timer-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.timer-fill {
    height: 100%;
    background: #00ff88;
    width: 100%;
    transition: width 1s linear;
}

/* Results Table */
.table-glass {
    color: white;
}

.table-glass th,
.table-glass td {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile adjustments for keyboard */
@media (max-width: 768px) {
    .container.min-vh-100 {
        min-height: auto !important;
        height: 100vh;
        align-items: flex-start !important;
        padding-top: 10vh;
        overflow-y: auto;
    }

    .glass-panel {
        margin-bottom: 50px;
        /* Space for scrolling */
    }
}

/* Theme: Fire */
body.theme-fire {
    background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
}

body.theme-fire .btn-primary {
    background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
}

body.theme-fire .btn-primary:hover {
    background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
    box-shadow: 0 0 15px rgba(221, 36, 118, 0.5);
}

/* Fire Theme Text Overrides */
body.theme-fire,
body.theme-fire .text-white,
body.theme-fire .h5,
body.theme-fire .h1,
body.theme-fire .h2,
body.theme-fire .h4,
body.theme-fire .display-4,
body.theme-fire label,
body.theme-fire .form-label {
    color: #212529 !important;
}

body.theme-fire .text-white-50 {
    color: rgba(33, 37, 41, 0.7) !important;
}

body.theme-fire .glass-panel {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

body.theme-fire .glass-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #000;
}

body.theme-fire .glass-input::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

body.theme-fire .question-box {
    color: #000;
    text-shadow: none;
}

body.theme-fire .score-badge {
    color: #000;
    background: rgba(0, 0, 0, 0.1);
}

body.theme-fire .table-glass {
    color: #000;
}

body.theme-fire .table-glass th,
body.theme-fire .table-glass td {
    border-color: rgba(0, 0, 0, 0.2);
}

body.theme-fire .timer-bar {
    background: rgba(0, 0, 0, 0.2);
}
/* Floating Math Background */
.floating-math {
    position: fixed;
    bottom: -100px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
    pointer-events: none;
    z-index: -1;
    animation: floatUp linear infinite;
    white-space: nowrap;
}

body.theme-fire .floating-math {
    color: rgba(0, 0, 0, 0.15);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        bottom: -100px;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        bottom: 100%;
    }
}

