:root {
    --primary: #ff6700;
    --accent: #009688;
    --nav-bg: #232946;
    --dark: #1c1f2a;
}
body {
    background: linear-gradient(130deg, #232946 0%, #1c1f2a 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* Navigation Bar */
.lawbook-navbar {
    background: linear-gradient(90deg, #232946 0%, #1c1f2a 100%);
    box-shadow: 0 2px 12px #23294644;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 2rem;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo-container {
    display: flex;
    align-items: center;
}
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}
.logo {
    height: 44px;
    width: 44px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 10px #23294655;
    object-fit: contain;
}
.navbar-title {
    font-size: 1.38rem;
    font-family: 'Orbitron', Arial, sans-serif;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    text-shadow: 0 2px 14px #00968833;
}
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.07rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    position: relative;
    transition: color 0.18s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6700 55%, #009688 100%);
    transition: width 0.27s cubic-bezier(.83,0,.17,1);
    border-radius: 2px;
}
.nav-links a:hover, 
.nav-links a.active {
    color: var(--primary);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}
.mobile-menu-btn {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
}

/* Game Container */
.flappy-container {
    margin: 32px auto 0 auto;
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    box-shadow: 0 8px 40px #ff670055, 0 2px 10px #00968844;
    border: 2.5px solid #ff670033;
    padding: 16px 18px 10px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
}
.flappy-title {
    font-family: 'Orbitron', Arial, sans-serif;
    color: #ff6700;
    font-size: 2rem;
    margin: 8px 0 18px 0;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 2px 16px #00968855;
}
#board {
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 4px 32px #00968844, 0 2px 10px #ff670033;
    background-color: #181c26;
    max-width: 96vw;
    height: auto;
    width: 360px;
    height: 640px;
    background-image: url(./images/flappybirdbg.png);
    background-size: cover;
    background-position: center;
}

/* Quiz overlay */
#quiz-overlay {
    display: none;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 310px;
    background: rgba(34,42,62,0.95);
    box-shadow: 0 4px 32px #23294655;
    border-radius: 18px;
    border: 2.5px solid #ff670099;
    z-index: 10;
    padding: 32px 24px 24px 24px;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #fff;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.5s;
}
@keyframes fadeIn {
    from { opacity: 0;}
    to { opacity: 1;}
}
#quiz-overlay .quiz-question {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #ffcb05;
    text-shadow: 0 2px 12px #23294666;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.quiz-option {
    background: linear-gradient(90deg,#ff6700 60%,#009688 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.18s, transform 0.13s;
    box-shadow: 0 2px 9px #ff670033;
}
.quiz-option:hover, .quiz-option:focus {
    background: #009688;
    color: #fff;
    transform: translateY(-2.5px) scale(1.04);
}
.quiz-feedback {
    margin: 18px 0 0 0;
    font-size: 1.12rem;
    font-weight: 600;
    color: #fff;
    min-height: 24px;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 12px #23294677;
}
.quiz-feedback.correct { color: #4caf50; }
.quiz-feedback.incorrect { color: #ea2c2c; }
.quiz-next-btn {
    margin-top: 25px;
    padding: 10px 28px;
    border-radius: 10px;
    background: linear-gradient(90deg, #ff6700 40%, #009688 100%);
    color: #fff;
    font-size: 1.07rem;
    font-weight: 700;
    outline: none;
    border: none;
    box-shadow: 0 2px 12px #00968844;
    cursor: pointer;
    display: none;
    transition: background 0.18s, transform 0.13s;
}
.quiz-next-btn:active { transform: scale(0.97);}
.gameover-msg {
    font-size: 1.6rem;
    color: #ff6700;
    font-family: 'Orbitron', Arial, sans-serif;
    margin: 14px 0 0 0;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 18px #00968888;
    animation: flicker 1.6s infinite alternate;
}
@keyframes flicker {
    0% { filter: brightness(1);}
    50% { filter: brightness(1.22);}
    100% { filter: brightness(1);}
}

/* Game Overlay for Rules and Countdown */
.game-overlay {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(34,42,62,0.97);
    box-shadow: 0 4px 32px #23294655;
    border-radius: 18px;
    border: 2.5px solid #ff670099;
    padding: 36px 24px 28px 24px;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #fff;
    z-index: 20;
    min-width: 280px;
    max-width: 95vw;
    animation: fadeIn 0.5s;
}
.rules-title {
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 1.30rem;
    color: #ff6700;
    margin-bottom: 18px;
    letter-spacing: 1px;
}
.rules-list {
    text-align: left;
    margin: 0 auto 10px auto;
    padding: 0 0 0 1.2em;
    max-width: 370px;
    color: #fffde9;
    font-size: 1.04rem;
    line-height: 1.7;
}

/* Countdown Style */
#countdown-overlay {
    display: none;
    z-index: 20;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(24,28,38,0.95);
    border-radius: 20px;
    padding: 28px 36px;
    min-width: 140px;
    box-shadow: 0 8px 32px #00968866;
    text-align: center;
}
.countdown-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6700 60%, #009688 100%);
    border-radius: 50%;
    margin: 0 auto 14px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px #ff670066;
}
#countdown-number {
    font-size: 2.5rem;
    color: #fff;
    font-family: 'Orbitron', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}
.countdown-text {
    font-size: 1.11rem;
    color: #ffcb05;
    font-family: 'Orbitron', Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive Styles */
@media (max-width: 900px) {
    .lawbook-navbar {
        padding: 8px 1rem;
    }
    .mobile-menu-btn {
        display: block; /* Show only on mobile */
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin-left: 0;
    }
    .nav-links.show {
        display: flex;
    }
    .nav-links a {
        padding: 12px 15px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

@media (max-width: 500px) {
    .flappy-container { padding: 0 0 10px 0; }
    .flappy-title { font-size: 1.1rem;}
    #board { width: 99vw; height: 65vw; min-height: 350px;}
    #quiz-overlay, .game-overlay, #countdown-overlay { 
        width: 92vw; 
        padding: 18px 6vw 15px 6vw;
    }
    .rules-list { font-size: 0.98rem; }
    .countdown-circle { width: 60px; height: 60px; }
    #countdown-number { font-size: 2rem; }
    .logo { height: 36px; width: 36px; }
    .navbar-title { font-size: 1.2rem; }
}