﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    overflow-x: hidden;
}

#playarea {
    display: none; /* hidden by default */
}


/*Splash*/
#splashScreen {
    opacity: 1;
    transition: opacity 1s ease; /* fade effect */
}

    #splashScreen.hidden {
        opacity: 0;
        pointer-events: none; /* allow clicks on game when faded */
    }

#gameContainer {
    opacity: 0;
    transition: opacity 1s ease; /* fade effect */
}

    #gameContainer.visible {
        opacity: 1;
    }

/* Main Menu Styles */
.main-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    padding: 20px;
    text-align: center;
}

.game-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 5rem;
    color: #FFD700;
    text-shadow: 4px 4px 0 #FF4500, 8px 8px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.menu-btn {
    padding: 18px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Luckiest Guy', cursive;
    letter-spacing: 1px;
}

    .menu-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
        background: linear-gradient(to bottom, #FF9B30, #FF5530);
    }

/* New styles for icon buttons */
.icon-btn-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.icon-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .icon-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
        background: linear-gradient(to bottom, #FF9B30, #FF5530);
    }

/* Footer Styles */
.footer {
    margin-top: auto;
    padding: 10px;
    text-align: center;
    width: 100%;
}

.powered-by {
    font-size: 1rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.explore-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
}

    .explore-link:hover {
        text-decoration: underline;
        color: #FF8C00;
    }

/* Game Container Styles */

.legend-text {
    font-size: inherit; /* use same font-size as Score HUD */
    color: #FFD700;
    text-align: center;
}


.legend-bar {
    justify-content: center;
    margin-top: -5px; /* pulls it close to the first HUD */
}



.game-ui {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    margin-bottom: 10px;
}





.game-controls {
    text-align: center;
    margin-top: 20px; /* pushes buttons further down */
}

    .game-controls .menu-btn {
        margin: 0 10px;
    }



/* Mission Briefing */
.mission-briefing {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    display: none;
}

.mission-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.mission-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.start-btn {
    padding: 12px 30px;
    font-size: 1.2rem;
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

    .start-btn:hover {
        background: linear-gradient(to bottom, #66BB6A, #388E3C);
        transform: scale(1.05);
    }

.start-btn-alt {
    padding: 12px 30px;
    font-size: 1.2rem;
    background: linear-gradient(to bottom, #FF4500, #B22222);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

    .start-btn-alt:hover {
        background: linear-gradient(to bottom, #FF6347, #C43030);
        transform: scale(1.05);
    }

/* Social Sharing */
.social-sharing {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    display: none;
}

.sharing-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.facebook {
    background: #3b5998;
}

.twitter {
    background: #1da1f2;
}

.whatsapp {
    background: #25d366;
}

.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icon:hover {
    transform: scale(1.1);
}

.close-btn {
    padding: 10px 25px;
    background: #FF4500;
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}

/* High Scores */
.high-scores {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    display: none;
}

.scores-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.scores-list {
    list-style: none;
    margin: 20px 0;
    padding: 0;
    font-family: monospace; /* keeps alignment */
}

    .scores-list li {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

        .scores-list li.scores-header {
            font-weight: bold;
            color: #FFD700;
            border-bottom: 2px solid #FFD700;
        }

    .scores-list .col {
        flex: 1;
        text-align: center;
    }


        .scores-list .col.name {
            text-align: left;
        }

        .scores-list .col.level {
            text-align: right;
        }

/* High Scores and Total Hits scrollable after 5 entries */
#scoresList,
#totalPlayerHitsList {
    max-height: calc(5 * 45px); /* ~5 items tall */
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #FFD700 rgba(255,255,255,0.1);
}

    /* WebKit scrollbar styling */
    #scoresList::-webkit-scrollbar,
    #totalPlayerHitsList::-webkit-scrollbar {
        width: 8px;
    }

    #scoresList::-webkit-scrollbar-track,
    #totalPlayerHitsList::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    #scoresList::-webkit-scrollbar-thumb,
    #totalPlayerHitsList::-webkit-scrollbar-thumb {
        background-color: #FFD700;
        border-radius: 4px;
    }

    /* Sticky header for all score lists */
    #scoresList .scores-header,
    #totalPlayerHitsList .scores-header,
    #activePlayersList .scores-header {
        position: sticky;
        top: 0;
        background: rgba(0, 0, 0, 0.95); /* match modal background */
        z-index: 5;
    }





/* Aiming Guide */
.aim-guide {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    display: none;
}


/* Game Over Screen */
.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    display: none;
}

.game-over-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.5rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.final-score {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.game-over-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.retry-btn, .menu-btn-over {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.retry-btn {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
}

.menu-btn-over {
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
}

    .retry-btn:hover, .menu-btn-over:hover {
        transform: scale(1.05);
    }

/* Level Complete Screen */
.level-complete {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    display: none;
}

.level-complete-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.level-stats {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.level-complete-buttons {
    display: flex;
    justify-content: center;
}


/* Pause Overlay */
.pause-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    z-index: 200;
    width: 90%;
    max-width: 400px;
    display: none;
    color: white;
}

.pause-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 15px;
}


/* Quit Confirmation */
.quit-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 300;
    width: 90%;
    max-width: 400px;
    display: none;
    color: white;
}

.quit-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #FF4500;
    margin-bottom: 15px;
}

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

/* Name Entry Dialog */
.name-entry {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 400px;
    /* Flex layout */
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

    .name-entry.show {
        display: flex;
    }

.name-entry-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 10px;
}

.name-entry input,
.name-entry select {
    padding: 10px;
    font-size: 1.2rem;
    border: 2px solid #FF4500;
    border-radius: 10px;
    background-color: #333;
    color: white;
    text-align: center;
    width: 80%;
    max-width: 300px;
}


/* About Game Dialog */
/* About Dialog styled like Active Players list */
.about-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 200; /* higher than menu, same as scores */
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: none; /* hidden by default */
    flex-direction: column;
}


.about-list {
    list-style: none;
    margin: 15px 0;
    padding: 0;
    font-family: monospace;
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #FFD700 rgba(255, 255, 255, 0.1);
}

    .about-list li {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        gap: 10px;
    }

        .about-list li.about-header {
            font-weight: bold;
            color: #FFD700;
            border-bottom: 2px solid #FFD700;
            position: sticky;
            top: 0;
            background: rgba(0, 0, 0, 0.95);
            z-index: 5;
        }

    .about-list .label {
        flex: 1;
        text-align: left;
        color: #FFD700;
    }

    .about-list .value {
        flex: 2;
        text-align: right;
        color: #FFFFFF;
    }

    /* WebKit scrollbar styling */
    .about-list::-webkit-scrollbar {
        width: 8px;
    }

    .about-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .about-list::-webkit-scrollbar-thumb {
        background-color: #FFD700;
        border-radius: 4px;
    }


/* New: Settings Dialog styles */
.settings-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: left;
    z-index: 100;
    width: 90%;
    max-width: 400px;
    display: none;
}

.settings-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.5rem;
    color: #FFD700;
    margin-bottom: 25px;
    text-align: center;
}

.settings-option {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .settings-option label {
        font-size: 1.2rem;
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }

.volume-control {
    display: flex;
    flex-direction: row; /* Changed to row for horizontal layout */
    justify-content: space-between; /* Space out the slider and button */
    align-items: center;
    gap: 10px;
    width: 100%;
}

    .volume-control input[type="range"] {
        -webkit-appearance: none;
        width: 100%;
        height: 10px;
        background: #d3d3d3;
        outline: none;
        opacity: 0.7;
        transition: opacity .2s;
        border-radius: 5px;
    }

        .volume-control input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background: #FF4500;
            cursor: pointer;
            border-radius: 50%;
        }

        .volume-control input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background: #FF4500;
            cursor: pointer;
            border-radius: 50%;
        }

.mute-btn {
    width: 40px;
    height: 40px;
    background: #FF4500;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

    .mute-btn.muted {
        background: #555;
    }

    .mute-btn i {
        font-size: 1rem;
    }

/* How to Play Dialog */
.how-to-play-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: left;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    max-height: 80vh;
}

.how-to-play-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.5rem;
    color: #FFD700;
    margin-bottom: 25px;
    text-align: center;
}

.how-to-play-dialog h3 {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.5rem;
    color: #FF8C00;
    margin-top: 20px;
    margin-bottom: 10px;
}

.how-to-play-dialog p {
    line-height: 1.6;
    font-size: 1rem;
    color: #FFFFFF;
}
/* Add CSS for centering the button in the dialog */
.dialog-footer {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .game-title {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .menu-btn {
        padding: 12px 25px;
        font-size: 1.2rem;
    }

    .icon-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .game-ui {
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }



    .mission-briefing, .social-sharing, .high-scores, .game-over, .level-complete, .pause-overlay, .quit-confirm, .name-entry, .about-dialog, .settings-dialog, .how-to-play-dialog {
        width: 95%;
        padding: 20px;
    }

    .mission-title, .sharing-title, .scores-title, .game-over-title, .level-complete-title, .pause-title, .quit-title, .name-entry-title, .about-title, .settings-title, .how-to-play-title {
        font-size: 1.5rem;
    }

    .menu-buttons {
        gap: 15px;
        margin: 20px 0;
    }
}



/* Improved Name + Country Entry Styling */


.name-entry h2 {
    margin: 0;
    font-size: 20px;
    color: #FFD700;
}

.name-entry .input-group {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 320px;
}

.name-entry label {
    margin-bottom: 6px;
    font-size: 14px;
    color: #fff;
    text-align: left;
}

.name-entry input,
.name-entry select {
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    text-align: center;
}

    .name-entry input:focus,
    .name-entry select:focus {
        outline: 2px solid #FFD700;
    }

/* Improved Name + Country Entry Styling */


.name-entry h2 {
    margin: 0;
    font-size: 20px;
    color: #FFD700;
}

.name-entry .input-group {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 320px;
}

.name-entry label {
    margin-bottom: 6px;
    font-size: 14px;
    color: #fff;
    text-align: left;
}

.name-entry input,
.name-entry select {
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    text-align: center;
}

    .name-entry input:focus,
    .name-entry select:focus {
        outline: 2px solid #FFD700;
    }





/* Add these styles to your existing styles.css */

/* Extra small screen optimizations */
@media (max-width: 360px) {
    .game-title {
        font-size: 2.2rem !important;
        text-shadow: 2px 2px 0 #FF4500, 4px 4px 0 rgba(0, 0, 0, 0.2) !important;
        margin-bottom: 1rem !important;
    }

    .menu-btn {
        padding: 10px 20px !important;
        font-size: 1rem !important;
        border-radius: 30px !important;
    }

    .icon-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
    }

    .game-ui {
        flex-direction: column !important;
        gap: 5px !important;
        padding: 8px !important;
        font-size: 0.8rem !important;
    }

        .game-ui > div {
            width: 100%;
            display: flex;
            justify-content: space-between;
        }

    /* Adjust all dialog sizes */
    .mission-briefing,
    .social-sharing,
    .high-scores,
    .game-over,
    .level-complete,
    .pause-overlay,
    .quit-confirm,
    .name-entry,
    .about-dialog,
    .settings-dialog,
    .how-to-play-dialog {
        width: 95% !important;
        padding: 15px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .mission-title,
    .sharing-title,
    .scores-title,
    .game-over-title,
    .level-complete-title,
    .pause-title,
    .quit-title,
    .name-entry-title,
    .about-title,
    .settings-title,
    .how-to-play-title {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }

    /* Improve form elements for small screens */
    .name-entry input,
    .name-entry select {
        font-size: 14px;
        padding: 8px;
    }

    /* Better button spacing */
    .menu-buttons {
        gap: 10px !important;
    }

    /* Adjust legend text */
    .game-canvas + div {
        font-size: 0.7rem !important;
        padding: 5px !important;
    }
}

/* Improved orientation overlay */


#orientationOverlay::before {
    content: "↔️";
    font-size: 3rem;
}

/* Better canvas scaling for all mobile devices */
@media (max-width: 600px) {


    .game-container {
        padding: 5px;
    }
}

/* High contrast mode for better visibility */
@media (prefers-contrast: high) {
    .menu-btn {
        border: 2px solid white !important;
    }

    .game-ui {
        background: rgba(0, 0, 0, 0.9) !important;
        border: 1px solid white;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ---- CLEANED SECTIONS ---- */

/* Game Canvas */
.game-canvas {
    width: 95vw;
    max-width: 1280px;
    max-height: 720px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(to bottom, #87CEEB, #E0F7FA);
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .game-canvas {
        width: 100vw;
        height: auto;
        max-height: 50vh;
    }
}

/* Name Entry */
.name-entry {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px;
}

    .name-entry.show {
        display: flex;
    }

    .name-entry h2 {
        margin: 0;
        font-size: 20px;
        color: #FFD700;
    }

    .name-entry .input-group {
        display: flex;
        flex-direction: column;
        width: 80%;
        max-width: 320px;
    }

    .name-entry label {
        margin-bottom: 6px;
        font-size: 14px;
        color: #fff;
        text-align: left;
    }

    .name-entry input,
    .name-entry select {
        padding: 10px;
        border-radius: 8px;
        border: none;
        font-size: 16px;
        text-align: center;
    }

        .name-entry input:focus,
        .name-entry select:focus {
            outline: 2px solid #FFD700;
        }

/* Orientation Overlay */
#orientationOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-align: center;
    z-index: 10000;
    padding: 20px;
    flex-direction: column;
    gap: 20px;
}

    #orientationOverlay::before {
        content: "↔️";
        font-size: 3rem;
    }


/* === Responsive scaling fixes === */
#gameContainer {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

#gameCanvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .game-title {
        font-size: 3rem;
    }

    .menu-btn {
        font-size: 1.2rem;
        padding: 14px 25px;
    }

    .icon-btn {
        width: 50px;
        height: 50px;
    }

    .mission-briefing,
    .high-scores,
    .social-sharing,
    .game-over,
    .level-complete,
    .pause-overlay,
    .quit-confirm,
    .name-entry,
    .about-dialog,
    .settings-dialog {
        width: 95%;
        max-width: 350px;
        font-size: 0.9rem;
    }
}

/* --- Mobile optimizations for smaller screens --- */
@media (max-width: 480px) {
    /* Scale down the main game title */
    .game-title {
        font-size: 2.5rem;
    }

    /* Adjust button sizes for touch targets */
    .menu-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* Adjust icon button sizes */
    .icon-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    /* Scale down mission briefing text */
    .mission-title, .sharing-title, .scores-title, .game-over-title, .level-complete-title {
        font-size: 1.5rem;
    }

    .mission-text, .game-over p, .level-complete p {
        font-size: 1rem;
    }

    /* Make sure the UI elements don't get too close to the screen edges */
    .game-ui {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        padding: 5px;
    }

}