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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    overflow: hidden;
    min-height: 100vh;
    max-height: 100vh;
}

/* Hide scrollbars completely */
body::-webkit-scrollbar,
#app::-webkit-scrollbar,
#game-content::-webkit-scrollbar,
#sidebar::-webkit-scrollbar {
    display: none;
}

body,
#app,
#game-content,
#sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#game-container {
    width: 800px;
    height: 600px;
    overflow-x: hidden;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 280px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 1000;
}

/* Header */
#header {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    text-align: center;
    border-bottom: 3px solid #FFD700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#header h1 {
    font-size: 3em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* Game Content */
#game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 320px 20px 40px;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    max-height: calc(100vh - 100px);
}

/* Menu Styles */
.menu-option {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 3px solid #FFD700;
    padding: 30px 60px;
    margin: 20px;
    border-radius: 15px;
    font-size: 3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 500px;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
}

.menu-option:hover {
    transform: scale(1.1) translateY(-5px);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.6);
}

.menu-option.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 165, 0, 0.4));
    border-color: #FFA500;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
}

/* Question Styles */
.question-text {
    font-size: 4em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    border: 3px solid #FFD700;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
    max-width: 1600px;
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Answer Styles */
.answer-box {
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.9), rgba(30, 30, 30, 0.9));
    padding: 50px 40px;
    border-radius: 20px;
    font-size: 2.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.answer-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.answer-box:hover::before {
    opacity: 1;
}

.answer-box:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 15px 50px rgba(255, 255, 255, 0.3);
}

.answer-red {
    border: 5px solid #ff4444;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.6), rgba(220, 20, 60, 0.4));
}

.answer-blue {
    border: 5px solid #4444ff;
    background: linear-gradient(135deg, rgba(0, 0, 139, 0.6), rgba(65, 105, 225, 0.4));
}

.answer-orange {
    border: 5px solid #ffaa00;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.6), rgba(255, 165, 0, 0.4));
}

.answer-green {
    border: 5px solid #44ff44;
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.6), rgba(50, 205, 50, 0.4));
}

.correct-answer {
    background: linear-gradient(135deg, rgba(0, 128, 0, 0.8), rgba(34, 139, 34, 0.6)) !important;
    border-color: #00ff00 !important;
    box-shadow: 0 0 60px rgba(0, 255, 0, 0.8) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 60px rgba(0, 255, 0, 0.8);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 80px rgba(0, 255, 0, 1);
    }
}

/* Results Container */
.results-container {
    margin-top: 50px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    width: 100%;
    max-width: 1600px;
    border: 3px solid #FFD700;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.results-container h2 {
    font-size: 3.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.player-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 15px;
    border-left: 8px solid #FFD700;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.player-result:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.player-name {
    font-weight: bold;
    font-size: 2.5em;
    min-width: 250px;
    color: #FFD700;
}

.answer-info {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0 40px;
    font-size: 2em;
}

.score-change {
    font-size: 2.5em;
    font-weight: bold;
    min-width: 150px;
    text-align: right;
}

.current-score {
    font-size: 2.2em;
    color: #FFD700;
    min-width: 250px;
    text-align: right;
    font-weight: bold;
}

.no-answer {
    font-size: 2em;
    color: #888;
    font-style: italic;
}

.question-status {
    text-align: center;
    font-size: 2em;
    margin-top: 40px;
    color: #aaa;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
}

/* Ready Container */
.ready-container {
    margin-top: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    border: 3px solid #FFD700;
}

.ready-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.ready-box {
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid #666;
}

.ready-box.ready {
    background: linear-gradient(135deg, rgba(0, 128, 0, 0.3), rgba(34, 139, 34, 0.2));
    border-color: #44ff44;
    box-shadow: 0 0 30px rgba(68, 255, 68, 0.5);
}

.ready-box.not-ready {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.2), rgba(50, 50, 50, 0.2));
    border-color: #666;
    animation: waiting-pulse 2s infinite;
}

@keyframes waiting-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Question Progress */
.question-progress {
    width: 100%;
    max-width: 1600px;
    margin-bottom: 30px;
    text-align: center;
}

.progress-text {
    font-size: 1.8em;
    color: #FFD700;
    margin-bottom: 10px;
    font-weight: bold;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #FFD700;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Final Score Styles */
.final-score-container {
    width: 100%;
    max-width: 1600px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.winner-banner {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border-radius: 20px;
    border: 4px solid #FFD700;
    margin-bottom: 40px;
    animation: winnerPulse 2s infinite;
}

@keyframes winnerPulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.9);
    }
}

.trophy {
    font-size: 8em;
    animation: trophyBounce 1s ease-in-out infinite;
}

@keyframes trophyBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.winner-text {
    font-size: 4em;
    font-weight: bold;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.winner-name {
    font-size: 3.5em;
    font-weight: bold;
    color: white;
    margin: 10px 0;
}

.winner-score {
    font-size: 2.5em;
    color: #FFD700;
}

/* Podium */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 40px 0;
    perspective: 1000px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: podiumRise 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes podiumRise {
    from {
        opacity: 0;
        transform: translateY(100px) rotateX(20deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.podium-player {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 10px;
    min-width: 200px;
    text-align: center;
    border: 3px solid rgba(255, 215, 0, 0.5);
}

.medal {
    font-size: 4em;
    margin-bottom: 10px;
}

.podium-name {
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    margin: 10px 0;
}

.podium-score {
    font-size: 1.5em;
    color: #FFD700;
}

.podium-base {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.podium-rank {
    font-size: 3em;
    font-weight: bold;
    color: #000;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Rankings List */
.rankings-list {
    margin-top: 20px;
}

.rank-entry {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px 30px;
    margin: 15px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 15px;
    border-left: 6px solid #FFD700;
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rank-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #666, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.rank-name {
    flex: 1;
    font-size: 2em;
    font-weight: bold;
    color: white;
}

.rank-score {
    font-size: 2em;
    color: #FFD700;
    font-weight: bold;
}

/* Score Styles */
.score-entry {
    font-size: 2.5em;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border-left: 8px solid #FFD700;
}

/* Controller Debug Panel */
#controller-debug {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #FFD700;
    margin-bottom: 15px;
}

#controller-debug h3 {
    font-size: 1.1em;
    margin: 0;
    color: #FFD700;
}

.controllers-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.controller {
    background: rgba(50, 50, 50, 0.9);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
}

.ctrl-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFD700;
    font-size: 0.9em;
}

.ctrl-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    justify-items: center;
}

.btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #555;
    transition: all 0.2s;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.2);
}

.btn-buzz {
    grid-column: span 2;
    width: 40px;
    height: 40px;
    background: #444;
    margin-top: 3px;
}

/* Active States */
.btn-red.active {
    background: #ff4444;
    box-shadow: 0 0 15px #ff4444;
}

.btn-blue.active {
    background: #4444ff;
    box-shadow: 0 0 15px #4444ff;
}

.btn-orange.active {
    background: #ffaa00;
    box-shadow: 0 0 15px #ffaa00;
}

.btn-green.active {
    background: #44ff44;
    box-shadow: 0 0 15px #44ff44;
}

.btn-buzz.active {
    background: #ff0000;
    box-shadow: 0 0 20px #ff0000;
}

#debug-controls {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #FFD700;
}

#debug-controls h3 {
    font-size: 1.1em;
    margin: 0 0 10px 0;
    color: #FFD700;
}

#debug-controls button {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

#debug-controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: #FFD700;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px 60px;
    border-radius: 15px;
    border: 3px solid #FFD700;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .question-text {
        font-size: 3em;
    }

    .answer-box {
        font-size: 2em;
        min-height: 150px;
    }

    .player-name {
        font-size: 2em;
    }

    .answer-info {
        font-size: 1.6em;
    }
}

@media (max-width: 1000px) {
    .answers-grid {
        grid-template-columns: 1fr;
    }

    .question-text {
        font-size: 2.5em;
    }

    #header h1 {
        font-size: 2em;
    }
}