    /* Color Palette & Variables */
    :root {
        --header-bg: #A00000; /* Dark Red */
        --nav-bg: #FFBF00;    /* Golden Yellow/Orange */
        --text-light: #FFFFFF;
        --text-dark: #011440;
        --text-header: #A00000;
        --correct-color: #28a745;
        --incorrect-color: #dc3545;
        --button-hover: #FFA500;
        --card-bg: rgb(255, 215, 153);
        --flip-duration: 0.6s;
        --main-font: "Trebuchet MS", sans-serif;
    }

    /* Universal Box Sizing */
    html { box-sizing: border-box; }
    *, *::before, *::after { box-sizing: inherit; }

    body {
        font-family: var(--main-font);
        background: linear-gradient(to right, rgb(255, 159, 0), rgb(255, 215, 153), rgb(255, 159, 0));
        color: var(--text-dark);
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        margin: 0;
        padding: 15px;
    }

    .game-container {
        background-color: var(--card-bg);
        padding: 25px 30px;
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        text-align: center;
        max-width: 500px;
        width: 100%;
        /* Add margin for audio notice on mobile */
        margin-bottom: 100px; /* Ensure space at bottom */
    }

    .title-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        margin-bottom: 25px;
        flex-wrap: wrap; /* Allow wrapping on small screens */
    }

    .game-logo {
        height: 90px; /* Adjust based on your logo */
        width: auto;
        max-width: 100px; /* Prevent logo from being too large */
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        transition: transform 0.3s ease;
    }

    .game-logo:hover {
        transform: scale(1.05);
    }

    h1#game-title {
        display: inline-block;
        background-image: linear-gradient(to bottom, var(--nav-bg), var(--button-hover));
        padding: 12px 20px;
        border-radius: 50px;
        margin: 0;
        font-size: clamp(1.2em, 4vw, 1.8em); /* Adjusted size */
        font-weight: 600;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        white-space: normal; /* Allow title wrapping */
        color: var(--text-dark); /* Ensure text color contrasts */
        text-align: center;
    }

    .score-board {
        background-color: var(--header-bg);
        color: var(--text-light);
        padding: 12px 15px;
        border-radius: 25px;
        margin: 0 auto 30px auto;
        max-width: 300px;
        font-size: 1.15em;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
        font-weight: 700;
    }

    /* --- Flip Card Styles --- */
    .flip-card {
        background-color: transparent;
        width: 100%;
        max-width: 400px;
        height: 250px;
        perspective: 1000px;
        margin: 0 auto 25px auto;
    }

    .flip-card-inner {
        position: relative;
        width: 100%;
        height: 100%;
        text-align: center;
        transition: transform var(--flip-duration) ease;
        transform-style: preserve-3d;
        box-shadow: 0 6px 12px rgba(0,0,0,0.1);
        border-radius: 12px;
        background-color: #eee;
    }

    .flip-card-inner.is-flipped {
        transform: rotateY(180deg);
    }

    .flip-card-front, .flip-card-back {
        position: absolute;
        width: 100%;
        height: 100%;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        border-radius: 12px;
        overflow: hidden;
        display: flex; /* Use flex to center content */
        align-items: center;
        justify-content: center;
    }

    .flip-card-front img {
        /* Adjustments for better image display */
        width: auto; /* Let width adjust */
        height: auto; /* Let height adjust */
        max-width: 100%; /* Limit width */
        max-height: 100%; /* Limit height */
        object-fit: contain; /* Scale while preserving aspect ratio */
        background-color: #ddd; /* Background shown while loading */
    }

    .flip-card-back {
        background-color: var(--header-bg);
        color: white;
        transform: rotateY(180deg);
        flex-direction: column; /* Keep column layout */
        padding: 20px;
    }

    .feedback-text {
        font-size: clamp(1.4em, 4vw, 1.6em);
        font-weight: 700;
    }
    .feedback-text.correct { color: #aaffaa; }
    .feedback-text.incorrect { color: #ffaaaa; }
    .correct-answer-text {
         font-size: clamp(1em, 3vw, 1.1em);
         margin-top: 10px;
         color: #eee;
    }

    /* --- Button Styles --- */
    .button-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

    /* Media query remains the same for button layout */
    @media (min-width: 480px) {
        .button-container {
            flex-direction: column; /* Keep as column */
            gap: 12px;
        }
    }

    .choice-button {
        background-image: linear-gradient(to bottom, var(--nav-bg), var(--button-hover));
        color: #503000;
        border: 1px solid #d8a600;
        padding: 12px 10px; /* Adjusted padding */
        border-radius: 25px;
        cursor: pointer;
        font-size: 0.9em; /* Adjusted font size */
        font-weight: 700;
        transition: all 0.2s ease;
        flex-grow: 1;
        box-shadow: 0 3px 5px rgba(0,0,0,0.1);
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
        min-height: 50px; /* Minimum height */
        display: flex; /* Use flex to center text vertically */
        align-items: center;
        justify-content: center;
        text-align: center;
        word-break: break-word; /* Allow long words to break */
        white-space: normal; /* Allow text wrapping */
        line-height: 1.3; /* Adjust line height for wrapped text */
    }

    .choice-button:hover {
        background-image: linear-gradient(to top, var(--nav-bg), var(--button-hover));
        box-shadow: 0 4px 7px rgba(0,0,0,0.15);
        transform: translateY(-1px);
    }

    .choice-button:active {
         transform: translateY(1px) scale(0.99);
         box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    }

    .choice-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background-image: none;
        background-color: #ccc;
        box-shadow: none;
        transform: none;
        color: #777;
    }

    /* --- Restart Button --- */
    #restart-button {
        background-image: linear-gradient(to bottom, var(--header-bg), #800000);
        color: var(--text-light);
        border: 1px solid #600;
        padding: 12px 30px;
        border-radius: 25px;
        cursor: pointer;
        font-size: 1.1em;
        font-weight: 700;
        transition: all 0.2s ease;
        margin-top: 30px;
        display: inline-block;
        box-shadow: 0 3px 5px rgba(0,0,0,0.15);
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
        /* Add margin bottom for mobile spacing */
        margin-bottom: 20px;
    }

    #restart-button:hover {
         background-image: linear-gradient(to top, var(--header-bg), #800000);
         box-shadow: 0 4px 7px rgba(0,0,0,0.2);
         transform: translateY(-1px);
    }

     #restart-button:active {
         transform: translateY(1px);
         box-shadow: 0 1px 2px rgba(0,0,0,0.15);
     }

    /* --- End Game Message --- */
    #end-game-message {
        margin-top: 25px;
        padding: 30px;
        background: linear-gradient(135deg, var(--nav-bg), #FFD700);
        border-radius: 15px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        animation: fadeIn 0.5s ease-out;
        /* Ensure content inside is centered */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    
    .celebration-title {
        color: var(--header-bg);
        font-size: clamp(1.4em, 4.5vw, 1.9em);
        white-space: nowrap; /* Prevent wrapping */
        margin: 0 0 15px;
        font-weight: 700;
        text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.4);
        letter-spacing: 0.5px;
        /* Add overflow handling just in case */
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%; /* Ensure it respects container padding */
    }

    .celebration-score {
        color: var(--text-dark);
        font-size: clamp(1.2em, 4vw, 1.6em); /* Responsive */
        margin: 15px 0; /* Adjusted margin */
        font-weight: 700;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    }

    .celebration-text {
        color: var(--text-dark);
        font-size: clamp(1em, 3vw, 1.2em); /* Responsive */
        line-height: 1.5; /* Adjusted line height */
        margin: 10px 0 0; /* Adjusted margin */
        padding: 0 10px;
        max-width: 90%; /* Prevent text from becoming too wide */
    }

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

    /* --- Audio Controls --- */
    .audio-controls {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }

    .audio-button {
        background: linear-gradient(to bottom, var(--nav-bg), var(--button-hover));
        color: var(--text-dark);
        border: 1px solid rgba(0, 0, 0, 0.1);
        padding: 8px 15px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.9em;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: all 0.2s ease;
    }

    .audio-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    }

    .audio-button:active {
        transform: translateY(1px);
    }

    .audio-notice {
        position: fixed;
        bottom: 65px; /* Position above button */
        right: 20px;
        font-size: 0.8em;
        color: #666;
        background: rgba(255, 255, 255, 0.9);
        padding: 5px 10px;
        border-radius: 15px;
        display: none; /* Initially hidden */
        z-index: 1001; /* Above controls */
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }


    /* Responsive adjustments for audio controls */
    @media (max-width: 768px) {
        .audio-controls {
            bottom: 15px; /* Adjust position */
            right: 50%;
            transform: translateX(50%); /* Center horizontally */
        }

        .audio-button {
            font-size: 0.8em;
            padding: 6px 12px;
        }

        .audio-notice {
            bottom: 60px; /* Position above centered button */
            right: 50%;
            transform: translateX(50%);
            text-align: center;
            white-space: nowrap;
        }
    }
    