* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    background: #000;
    color: #0ff;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    padding: 10px;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
}
.left-panel {
    display: none;
}
h1 {
    font-size: clamp(28px, 8vw, 60px);
    margin: 15px 0;
    color: #0ff;
    text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff;
    animation: neonPulse 1s infinite alternate;
}
@keyframes neonPulse {
    0% { text-shadow: 0 0 10px #0ff, 0 0 20px #0ff; }
    100% { text-shadow: 0 0 20px #0ff, 0 0 40px #0ff, 0 0 60px #0ff; }
}
.neon-btn {
    font-size: clamp(16px, 3vw, 26px);
    padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 35px);
    margin: 10px;
    background: linear-gradient(to right, #0ff, #00bcd4);
    border: none;
    border-radius: 15px;
    color: #000;
    cursor: pointer;
    box-shadow: 0 0 10px #0ff, 0 0 20px #00bcd4;
    transition: 0.3s;
    touch-action: auto;
    -webkit-tap-highlight-color: rgba(0, 255, 255, 0.3);
}
.neon-btn:hover, .neon-btn:active {
    transform: scale(1.1);
    box-shadow: 0 0 20px #0ff, 0 0 40px #00bcd4;
}
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999;
    padding: 20px;
    overflow-y: auto;
}
.popup-content {
    background: #001f2d;
    border: 3px solid #0ff;
    padding: 20px;
    max-width: 500px;
    margin: 50px auto;
    border-radius: 20px;
    color: #0ff;
    box-shadow: 0 0 20px #0ff;
}
.popup-content h2 {
    font-size: clamp(20px, 5vw, 32px);
    margin-bottom: 15px;
}
.popup-content p {
    font-size: clamp(14px, 3vw, 18px);
    line-height: 1.6;
    margin-bottom: 20px;
}
.game {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 7 / 4;
    margin: 20px auto;
    background: linear-gradient(180deg, #001f2d, #003844);
    border: 3px solid #0ff;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px #0ff;
    display: none;
}
#ball {
    width: 6%;
    aspect-ratio: 1;
    background: radial-gradient(circle, #0ff, #00bcd4);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 40px #0ff;
    animation: glowBall 2s infinite alternate;
}
@keyframes glowBall {
    0% { box-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff; }
    100% { box-shadow: 0 0 20px #0ff, 0 0 40px #0ff, 0 0 60px #0ff; }
}
canvas#stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}
.question {
    margin-top: 20px;
    font-size: clamp(18px, 4vw, 26px);
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
    padding: 0 10px;
}
#options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: clamp(10px, 2vw, 25px);
    padding: 0 10px;
}
.option-btn {
    font-size: clamp(18px, 4vw, 28px);
    padding: clamp(12px, 2vw, 18px) clamp(20px, 4vw, 35px);
    background: linear-gradient(to right, #0ff, #00bcd4);
    border: none;
    border-radius: 15px;
    color: #000;
    cursor: pointer;
    box-shadow: 0 0 10px #0ff, 0 0 20px #00bcd4;
    transition: 0.3s;
    touch-action: auto;
    -webkit-tap-highlight-color: rgba(0, 255, 255, 0.3);
    min-width: clamp(60px, 15vw, 80px);
}
.option-btn:hover, .option-btn:active {
    transform: scale(1.1);
    box-shadow: 0 0 20px #0ff, 0 0 40px #00bcd4;
}
.score {
    font-size: clamp(20px, 4vw, 28px);
    color: #0ff;
    text-shadow: 0 0 5px #0ff, 0 0 10px #00bcd4;
    margin: 20px 0;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    h1 {
        margin: 10px 0;
    }
    .game {
        margin: 10px auto;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    body {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: 1fr;
        gap: 20px;
        padding: 10px;
        align-items: center;
        justify-items: center;
        overflow: hidden;
    }
    h1, #startBtn, #howToBtn, #restartBtn2, .score:not(.left-panel .score) {
        display: none;
    }
    .left-panel {
        display: flex !important;
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        justify-content: center;
    }
    .left-panel .score {
        font-size: clamp(16px, 3vh, 22px);
        margin: 0;
    }
    .left-panel .neon-btn {
        font-size: clamp(12px, 2vh, 16px);
        padding: clamp(6px, 1vh, 10px) clamp(12px, 2vh, 20px);
        margin: 0;
    }
    .game {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        max-height: none;
        height: 80vh;
        width: auto;
        aspect-ratio: 7 / 4;
        align-self: center;
        justify-self: center;
    }
    .question {
        grid-column: 3;
        grid-row: 1;
        font-size: clamp(14px, 2.5vh, 18px);
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 10px;
        max-width: 200px;
    }
    #options {
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }
    .option-btn {
        width: 100%;
        min-width: 80px;
        font-size: clamp(14px, 2.5vh, 18px);
        padding: clamp(8px, 1.5vh, 12px) clamp(16px, 3vh, 24px);
    }
}
