/* ========== GENERAL STYLES ========== */
:root {
    /* Default Theme Colors */
    --primary-color: #00c2ff;
    --secondary-color: #b967ff;
    --accent-color: #ff3e7f;
    --text-color: #ffffff;
    --background-primary: #0f1631;
    --background-secondary: #1b133e;
    --correct-color: #00ff8c;
    --incorrect-color: #ff3e4c;
    --shadow-color: rgba(0, 194, 255, 0.5);
    --glow-color: rgba(0, 194, 255, 0.7);
}

/* Theme Variables */
body.theme-cyberpunk {
    --primary-color: #ff2a6d;
    --secondary-color: #05ffa1;
    --accent-color: #fffc00;
    --background-primary: #1e0030;
    --background-secondary: #3b007d;
    --shadow-color: rgba(255, 42, 109, 0.5);
    --glow-color: rgba(255, 42, 109, 0.7);
}

body.theme-retro {
    --primary-color: #ff7f50;
    --secondary-color: #ffde59;
    --accent-color: #ff9e7a;
    --background-primary: #2d132c;
    --background-secondary: #4c1f41;
    --shadow-color: rgba(255, 127, 80, 0.5);
    --glow-color: rgba(255, 127, 80, 0.7);
}

body.theme-nature {
    --primary-color: #00cc88;
    --secondary-color: #88dd00;
    --accent-color: #ffcc00;
    --background-primary: #062626;
    --background-secondary: #0f4c4c;
    --shadow-color: rgba(0, 204, 136, 0.5);
    --glow-color: rgba(0, 204, 136, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%);
    overflow: hidden;
    height: 100vh;
    position: relative;
}

h1, h2, h3, .game-title {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========== BACKGROUND STARS ANIMATION ========== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#stars, #stars2, #stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

#stars {
    background-image: radial-gradient(2px 2px at 20px 30px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: animateStars 50s linear infinite;
}

#stars2 {
    background-image: radial-gradient(3px 3px at 50px 160px, #fff, rgba(0,0,0,0)),
                      radial-gradient(3px 3px at 90px 40px, #fff, rgba(0,0,0,0)),
                      radial-gradient(3px 3px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 400px 400px;
    opacity: 0.5;
    animation: animateStars 100s linear infinite;
}

#stars3 {
    background-image: radial-gradient(4px 4px at 200px 100px, rgba(255, 255, 255, 0.8), rgba(0,0,0,0)),
                      radial-gradient(4px 4px at 300px 50px, rgba(255, 255, 255, 0.8), rgba(0,0,0,0)),
                      radial-gradient(4px 4px at 400px 150px, rgba(255, 255, 255, 0.8), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 600px 600px;
    opacity: 0.7;
    animation: animateStars 150s linear infinite;
}

@keyframes animateStars {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-1000px);
    }
}

/* ========== BUTTONS & CONTROLS ========== */
button {
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background-color: rgba(30, 30, 60, 0.7);
    color: var(--text-color);
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    outline: none;
    position: relative;
    overflow: hidden;
}

button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

button:hover:before {
    left: 100%;
}

.primary-btn {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.primary-btn:hover {
    box-shadow: 0 0 20px var(--glow-color), 0 0 40px var(--glow-color);
    transform: translateY(-2px);
}

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

.secondary-btn:hover {
    background-color: var(--secondary-color);
    color: #000;
    box-shadow: 0 0 15px rgba(185, 103, 255, 0.5);
}

.danger-btn {
    background-color: transparent;
    border: 2px solid #ff3e4c;
    color: #ff3e4c;
}

.danger-btn:hover {
    background-color: #ff3e4c;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 62, 76, 0.5);
}

.audio-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.audio-btn, .theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    font-size: 18px;
    padding: 0;
}

.theme-selector {
    position: relative;
}

.theme-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: rgba(20, 20, 40, 0.9);
    border-radius: 10px;
    padding: 10px;
    display: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 101;
}

.theme-option {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    white-space: nowrap;
}

.theme-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========== GAME CONTAINER & SCREENS ========== */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 20px;
}

.game-screen.active {
    display: flex;
    opacity: 1;
    z-index: 10;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== LOBBY SCREEN ========== */
.lobby-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
    background-color: rgba(15, 22, 49, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.game-title {
    text-align: center;
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    margin-bottom: 20px;
    position: relative;
    animation: glowPulse 3s infinite alternate;
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    }
    100% {
        text-shadow: 0 0 15px var(--glow-color), 0 0 30px var(--glow-color), 0 0 45px var(--glow-color);
    }
}

.mode-selection, .join-room-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.mode-selection h2, .join-room-container h2 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 12px;
    background-color: rgba(30, 30, 60, 0.6);
}

.mode-btn i {
    font-size: 24px;
    color: var(--primary-color);
}

.room-join-form {
    display: flex;
    gap: 10px;
}

#roomCodeInput {
    flex: 1;
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    font-family: 'Exo 2', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

#roomCodeInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

.player-profile {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.avatar-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 15px var(--shadow-color);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-options {
    display: flex;
    gap: 10px;
}

.avatar-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
}

.avatar-option:hover, .avatar-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name input {
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    font-family: 'Exo 2', sans-serif;
    text-align: center;
    outline: none;
    min-width: 200px;
}

.player-name input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

/* ========== WAITING ROOM ========== */
.waiting-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
    background-color: rgba(15, 22, 49, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.waiting-container h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.room-info {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-code {
    display: flex;
    align-items: center;
    gap: 10px;
}

#displayRoomCode {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--accent-color);
    letter-spacing: 3px;
}

#copyRoomCode {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 14px;
    padding: 0;
}

.player-list, .team-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.player-list h3, .team h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.player-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
}

.player-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.player-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-container {
    display: flex;
    gap: 20px;
}

.team {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
}

.team-blue {
    background-color: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.team-red {
    background-color: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.team-players {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.waiting-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* ========== QUIZ SCREEN ========== */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 15px 20px;
}

.quiz-info {
    display: flex;
    gap: 20px;
}

.question-counter, .quiz-timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
}

.quiz-timer {
    color: var(--accent-color);
}

.quiz-timer.warning {
    color: #ffcc00;
    animation: pulse 1s infinite;
}

.quiz-timer.danger {
    color: #ff3e4c;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.quiz-score {
    display: flex;
    align-items: center;
    gap: 15px;
}

.score-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.boost-badge {
    background-color: var(--accent-color);
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--accent-color);
    }
    100% {
        box-shadow: 0 0 20px var(--accent-color);
    }
}

.race-track-container {
    margin-bottom: 30px;
}

.race-track {
    height: 60px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.finish-line {
    position: absolute;
    right: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        #fff,
        #fff 5px,
        #000 5px,
        #000 10px
    );
}

.player-car {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: left 0.5s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 2;
}

.question-container {
    background-color: rgba(15, 22, 49, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.question-text {
    margin-bottom: 30px;
    text-align: center;
}

.question-text h2 {
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--text-color);
}

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

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.option-btn {
    padding: 15px;
    border-radius: 12px;
    background-color: rgba(30, 30, 60, 0.6);
    color: var(--text-color);
    text-align: left;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    min-height: 70px;
}

.option-btn:hover {
    background-color: rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-2px);
}

.option-btn.correct {
    background-color: var(--correct-color);
    color: #000;
    animation: correctPulse 1s;
}

.option-btn.incorrect {
    background-color: var(--incorrect-color);
    animation: incorrectShake 0.5s;
}

@keyframes correctPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 140, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 255, 140, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 140, 0);
    }
}

@keyframes incorrectShake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-5px);
    }
    40%, 80% {
        transform: translateX(5px);
    }
}

.true-false-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tf-option {
    padding: 30px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.true-option {
    background-color: rgba(0, 200, 83, 0.2);
    border: 2px solid rgba(0, 200, 83, 0.5);
}

.false-option {
    background-color: rgba(255, 62, 76, 0.2);
    border: 2px solid rgba(255, 62, 76, 0.5);
}

.sorting-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sort-item {
    padding: 15px;
    background-color: rgba(30, 30, 60, 0.6);
    border-radius: 10px;
    cursor: move;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.sort-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.3);
}

.sort-item i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.fill-blank-text {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.blank {
    display: inline-block;
    width: 120px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 0 5px;
    vertical-align: middle;
}

.blank.filled {
    background-color: rgba(var(--primary-color-rgb), 0.3);
    color: var(--text-color);
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.blank-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.blank-option {
    padding: 10px 15px;
    background-color: rgba(30, 30, 60, 0.6);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.blank-option:hover {
    background-color: rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-2px);
}

#essayAnswer {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    font-family: 'Exo 2', sans-serif;
    resize: vertical;
    margin-bottom: 15px;
}

#essayAnswer:focus {
    border-color: var(--primary-color);
    outline: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.boost-btn {
    background-color: var(--accent-color);
    color: #000;
    font-weight: bold;
}

.boost-btn:hover {
    box-shadow: 0 0 20px var(--accent-color);
}

.skip-btn {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========== RESULTS SCREEN ========== */
.results-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
    background-color: rgba(15, 22, 49, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
}

.results-container h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--glow-color);
}

.final-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px var(--shadow-color);
    animation: scoreReveal 1s ease-out;
}

@keyframes scoreReveal {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#finalScoreDisplay {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.score-text {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.leaderboard-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.leaderboard-container h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 30px;
    height: 200px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.5s ease;
}

.first-place {
    height: 180px;
    z-index: 3;
    transform: translateY(-20px);
    animation: firstPlace 1s ease-out;
}

.second-place {
    height: 140px;
    z-index: 2;
    animation: secondPlace 1s ease-out 0.2s backwards;
}

.third-place {
    height: 100px;
    z-index: 1;
    animation: thirdPlace 1s ease-out 0.4s backwards;
}

@keyframes firstPlace {
    0% {
        transform: translateY(180px);
    }
    70% {
        transform: translateY(-40px);
    }
    100% {
        transform: translateY(-20px);
    }
}

@keyframes secondPlace {
    0% {
        transform: translateY(140px);
    }
    70% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes thirdPlace {
    0% {
        transform: translateY(100px);
    }
    70% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.trophy-icon {
    position: absolute;
    top: -25px;
    font-size: 24px;
}

.gold {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.silver {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.7);
}

.bronze {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.7);
}

.podium-block {
    width: 80px;
    height: 40px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: 5px 5px 0 0;
    box-shadow: 0 0 15px rgba(0, 194, 255, 0.5);
}

.first-place .podium-block {
    height: 60px;
    background-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.second-place .podium-block {
    background-color: #c0c0c0;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.third-place .podium-block {
    background-color: #cd7f32;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    margin: 10px 0;
}

.first-place .player-avatar {
    width: 70px;
    height: 70px;
    border-color: #ffd700;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name {
    font-size: 1rem;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.first-place .player-name {
    font-weight: bold;
    color: #ffd700;
}

.full-leaderboard {
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 5px;
}

.entry-rank {
    width: 30px;
    font-weight: bold;
    color: var(--primary-color);
}

.entry-player {
    display: flex;
    align-items: center;
    flex: 1;
}

.entry-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.entry-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-score {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    font-weight: bold;
}

.results-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* ========== FEEDBACK OVERLAYS ========== */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.feedback-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.feedback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.feedback-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.feedback-text {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
}

.correct {
    background-color: rgba(0, 255, 140, 0.2);
    border: 3px solid var(--correct-color);
    box-shadow: 0 0 30px var(--correct-color);
    animation: correctFeedback 0.5s;
}

.correct .feedback-icon,
.correct .feedback-text {
    color: var(--correct-color);
    text-shadow: 0 0 10px rgba(0, 255, 140, 0.7);
}

.points-gained {
    font-size: 1.8rem;
    color: #fff;
    background-color: rgba(0, 255, 140, 0.4);
    padding: 5px 15px;
    border-radius: 20px;
    animation: pointsAnimation 1s;
}

@keyframes pointsAnimation {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.incorrect {
    background-color: rgba(255, 62, 76, 0.2);
    border: 3px solid var(--incorrect-color);
    box-shadow: 0 0 30px var(--incorrect-color);
    animation: incorrectFeedback 0.5s;
}

.incorrect .feedback-icon,
.incorrect .feedback-text {
    color: var(--incorrect-color);
    text-shadow: 0 0 10px rgba(255, 62, 76, 0.7);
}

.correct-answer {
    font-size: 1.2rem;
    color: #fff;
    margin-top: 15px;
    max-width: 80%;
}

@keyframes correctFeedback {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes incorrectFeedback {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-10px);
    }
    40%, 80% {
        transform: translateX(10px);
    }
}

/* ========== FIREWORKS CANVAS ========== */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    pointer-events: none;
}

/* ========== UTILITIES ========== */
.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .true-false-options {
        grid-template-columns: 1fr;
    }
    
    .room-join-form {
        flex-direction: column;
    }
    
    .mode-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .team-container {
        flex-direction: column;
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 20px;
    }
    
    .podium-place {
        transform: none !important;
    }
    
    .first-place, .second-place, .third-place {
        height: auto;
        animation: none;
    }
}
