/* GENERAL RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* NAVBAR */
.race-navbar {
    width: 100%;
    background: linear-gradient(90deg, #232946 0%, #1c1f2a 100%);
    color: #fff;
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px #23294655;
    font-family: 'Montserrat', Arial, sans-serif;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.race-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}
.race-logo {
    height: 44px;
    width: 44px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 10px #23294655;
    object-fit: contain;
}
.race-navbar-title {
    font-size: 1.38rem;
    font-family: 'Orbitron', Arial, sans-serif;
    font-weight: 700;
    color: #ff6700;
    letter-spacing: 1px;
    text-shadow: 0 2px 14px #00968833;
}
.race-navbar-links {
    display: flex;
    gap: 2.1em;
    list-style: none;
    margin-top: 12px;
    margin-bottom: 0;
    padding: 0;
    align-items: center;
}
.nav-link {
    color: #fff;
    font-size: 1.07rem;
    font-weight: 600;
    padding: 10px 0;
    text-decoration: none;
    position: relative;
    transition: color 0.18s;
    border-radius: 4px;
}
.nav-link:hover, .nav-link:focus, .nav-link.active {
    color: #ff6700;
    background: rgba(255, 103, 0, 0.06);
}
.underline-anim::after {
    content: '';
    display: block;
    height: 2.5px;
    width: 0;
    background: linear-gradient(90deg, #ff6700 55%, #009688 100%);
    transition: width 0.27s cubic-bezier(.83,0,.17,1);
    border-radius: 2px;
    margin-top: 2px;
    position: absolute;
    left: 0;
}
.nav-link:hover.underline-anim::after, .nav-link:focus.underline-anim::after, .nav-link.active.underline-anim::after {
    width: 100%;
}

/* Hamburger for mobile */
.race-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 8px 12px 8px;
    z-index: 1101;
}
.race-hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 32px;
    height: 32px;
    gap: 6px;
}
.race-hamburger-icon span {
    display: block;
    height: 3px;
    width: 28px;
    background: #ff6700;
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(.83,0,.17,1);
}
.race-hamburger-icon.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.race-hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}
.race-hamburger-icon.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

@media (max-width: 900px) {
    .race-navbar {
        padding: 0.5rem 1rem;
    }
    .race-mobile-menu-toggle {
        display: block;
    }
    .race-navbar-links {
        display: none;
        flex-direction: column;
        gap: 0.2em;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        background: #232946;
        border-radius: 0 0 12px 12px;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 999;
        box-shadow: 0 4px 16px #23294666;
    }
    .race-navbar-links.show {
        display: flex;
    }
    .nav-link {
        padding: 13px 0 13px 10px;
        width: 100%;
    }
    .race-logo {
        height: 36px;
        width: 36px;
    }
    .race-navbar-title {
        font-size: 1.02rem;
    }
}

/* GAME ZONE */
body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 0;
}
.game-container {
    max-width: 1200px;
    margin: 30px auto 0 auto;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
}

.header {
    background: linear-gradient(to right, #FF512F, #DD2476);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Orbitron', Arial, sans-serif;
}

.header h1 {
    font-size: 2.15rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
    font-size: 1.2em;
}

.track-container-outer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 600px;
    max-height: 600px;
    margin: 0 auto;
}
.track-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.track-svg {
    width: 100%;
    height: 100%;
    position: absolute;
}

.car {
    width: 50px;
    height: 30px;
    position: absolute;
    transform-origin: center;
    transition: transform 0.3s linear;
    cursor: pointer;
}

.question-box {
    background: white;
    margin: 20px auto;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

#questionText {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

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

.answer {
    padding: 15px 25px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    box-shadow: 5px 5px 10px #d9d9d9, -5px -5px 10px #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.answer:hover, .answer:focus {
    transform: translateY(-2px);
    box-shadow: 7px 7px 15px #d9d9d9, -7px -7px 15px #ffffff;
}

.answer.correct {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
}

.answer.wrong {
    background: linear-gradient(145deg, #f44336, #e53935);
    color: white;
}

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

.control-button {
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.control-button:hover, .control-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    outline: none;
}

#replayButton {
    background: linear-gradient(145deg, #2196F3, #1976D2);
}

.score-change {
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    animation: floatUp 1s ease-out forwards;
    z-index: 10;
}
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* MOBILE & TABLET FRIENDLY */
@media (max-width: 900px) {
    .game-container { padding: 8px 2vw 8px 2vw; }
    .header h1 { font-size: 1.35rem;}
    .track-container-outer {
        max-width: 90vw;
        max-height: 90vw;
    }
    .car { width: 34px; height: 22px; }
    .question-box { max-width: 99vw; }
}
@media (max-width: 650px) {
    .track-container-outer {
        max-width: 95vw;
        max-height: 95vw;
    }
    .question-box { padding: 10px; }
    .header { padding: 12px; }
    .answer { padding: 10px 7px; font-size: 1em; }
}
@media (max-width: 500px) {
    .header h1 { font-size: 1.05rem;}
    .track-container-outer {
        max-width: 95vw;
        max-height: 95vw;
    }
    .answer-options { grid-template-columns: 1fr; gap: 8px;}
    .answer { padding: 8px 3px; font-size: 0.95em;}
    .stats { flex-direction: column; gap: 7px; font-size: 1em;}
    .buttons { flex-direction: column; gap: 10px;}
    .control-button { padding: 10px 10px; font-size: 1em;}
    .race-navbar-title { font-size: 1rem; }
}