* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 81, 186, 0.6) rgba(0, 0, 0, 0.2);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #222;
    font-family: Arial, sans-serif;
}

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

/* Adjusting the score display to align on the top right under the FPS display */
#game-status-display {
    position: fixed;
    top: 20px; /* Positioned below the FPS display */
    right: 10px; /* Aligned to the right side */
    width: auto; /* Adjust width to fit content */
    color: white;
    font-family: Arial, sans-serif;
    padding: 5px;
    display: flex;
    flex-direction: column; /* Arrange items vertically */
    align-items: flex-start; /* Align items to the left of the bar */
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.3); /* Almost transparent vertical bar */
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

#game-status-display > div {
    font-size: 14px; /* Reduced font size */
    margin: 2px 0; /* Spacing between items */
    padding: 2px 5px; /* Padding for better alignment */
    display: flex;
    align-items: center;
    gap: 5px; /* Space between icon and text */
}

#game-status-display i {
    font-size: 12px; /* Reduced icon size */
}

#fps-display {
    position: fixed;
    top: 5px;
    left: center;
    color: #0f0;
    font-family: monospace;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 100;
    pointer-events: none;
}

#total-score,
#timer-display {
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 5px;
    padding: 5px 10px;
    border-radius: 5px;
}

#timer-display.warning {
    color: #ff4444;
    animation: pulse 1s infinite;
}

#distance-display {
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 5px;
    padding: 5px 10px;
    border-radius: 5px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    background-image: url('/bouncy-dash-start.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.start-content {
    background-color: rgba(51, 51, 51, 0.7);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: white;
    max-width: 600px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    border: 2px solid #0051ba;
    animation: fadeIn 1.5s ease-out;
    backdrop-filter: blur(10px);
}

.title-section {
    margin-bottom: 30px;
    animation: slideDown 1s ease-out;
}

.main-title {
    color: #FFA500;
    font-size: 36px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.synopsis {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.synopsis-card {
    background: rgba(0, 81, 186, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    transition: transform 0.3s ease;
}

.synopsis-card:hover {
    transform: translateY(-5px);
}

.synopsis-card i {
    font-size: 2em;
    color: #ffd700;
    margin-bottom: 15px;
}

.synopsis-card p {
    font-size: 24px;
    line-height: 1.4;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.instructions {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.instruction-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
}

.instruction-section h3 {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-section h3 i {
    width: 20px;
}

.control-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.key-group {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.key {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 11px;
    font-family: monospace;
    color: #ffd700;
}

.description {
    color: #fff;
    font-size: 13px;
}

.start-prompt {
    font-size: 20px;
    color: #ffd700;
    margin-top: 20px;
    animation: pulse 2s infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.start-prompt i {
    font-size: 0.8em;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

#start-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    padding: 12px 24px;
    font-size: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

#start-button.selected {
    transform: scale(1.1);
    background-color: #45a049;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

/* Game Over Screen */
#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.game-over-content {
    background-color: rgba(51, 51, 51, 0.95);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid #FF5252;
    animation: bounceIn 0.8s ease-out;
}

.game-over-content h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.game-over-content h1 i {
    color: #FF5252;
}

.game-over-content p {
    font-size: 20px;
    margin-bottom: 15px;
}

#final-score {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 30px;
}

#final-highestscore {
    font-size: 22px;
    color: #a8aea9;
    margin-bottom: 30px;
}


#restart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    padding: 12px 24px;
    font-size: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#restart-button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

#restart-button.selected {
    transform: scale(1.1);
    background-color: #45a049;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

/* New restart prompt styles */
.restart-prompt {
    font-size: 22px;
    color: #4CAF50;
    margin: 20px 0;
    animation: pulse 2s infinite;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Floating buttons positioning and styling */
.floating-button {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: rgba(0, 81, 186, 0.8);
    border: 2px solid #ffd700;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(5px);
    top: 20px;
}

.floating-button:hover {
    transform: scale(1.1);
    background: rgba(0, 81, 186, 1);
}

#help-button {
    left: 20px;
}

#pause-button {
    left: 80px;
}

#ambient-toggle-button {
    left: 140px;
}

#ambient-toggle-button.muted {
    background: rgba(255, 82, 82, 0.8);
}

/* Fade transition effect */

/* Bounce in animation for game over screen */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: rgba(51, 51, 51, 0.95);
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #0051ba;
    scrollbar-gutter: stable;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    overflow-x: hidden;
    box-sizing: border-box;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.modal-header h2 {
    color: #ffd700;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #ffd700;
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 5px;
}

/* Help button */
.floating-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: rgba(0, 81, 186, 0.8);
    border: 2px solid #ffd700;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.floating-button:hover {
    transform: scale(1.1);
    background: rgba(0, 81, 186, 1);
}

/* Status change indicator */
#status-change-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    display: none;
    z-index: 1000;
}

#status-change-indicator.show {
    display: block;
    animation: fadeInOut 1.5s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    z-index: 100;
}

.is-mobile-device #mobile-controls {
    display: flex;
    justify-content: space-between;
}

.left-half {
    position:fixed;
    left: 60px;
    bottom: 60px;
    pointer-events: auto;
}

.action-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    pointer-events: auto;
}

.mobile-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-button:active {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(0.95);
}

.mobile-button i {
    pointer-events: none;
}

/* Show/hide based on device type */
.mobile-only {
    display: none;
}

.is-mobile-device .mobile-only {
    display: block;
}

.is-mobile-device .desktop-only {
    display: none;
}

/* Mobile-specific adjustments */
@media (hover: none) and (pointer: coarse) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: flex;
    }
    
    /* Adjust floating buttons positioning for mobile */
    .floating-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Adjust HUD for mobile */
    #game-status-display {
        font-size: 14px;
        padding: 8px;
    }
    
    /* Improve modal visibility on mobile */
    .modal-content {
        width: 90%;
        max-height: 80vh;
        padding: 15px;
    }
    
    .control-group {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* Responsive layout adjustments (not touch-specific) */
@media (max-width: 768px) {
    .start-content {
        margin: 20px;
        padding: 15px;
    }

    .synopsis-card {
        padding: 15px;
    }

    .synopsis-card p {
        font-size: 20px;
    }

    .start-prompt {
        font-size: 16px;
    }

    .main-title {
        font-size: 30px;
    }

    .modal-content {
        margin: 10px auto;
        width: 90%;
        max-height: 85vh;
        padding: 15px 15px 30px 15px;
    }
}

/* Pause Menu Styles */
#pause-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#pause-menu.show {
    display: flex;
}

.pause-content {
    background-color: rgba(20, 20, 20, 0.9);
    border: 2px solid #4CAF50;
    border-radius: 10px;
    width: 400px;
    padding: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.pause-content h1 {
    margin-top: 0;
    color: #4CAF50;
    font-size: 2rem;
    margin-bottom: 20px;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.8;
}

.menu-button:hover {
    background-color: #444;
    opacity: 1;
    transform: translateY(-2px);
}

.menu-button.selected {
    background-color: #4CAF50;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Add a brief highlight animation when mode changes */
@keyframes modeChange {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1); }
}

@keyframes modeChange {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Tab Styles for Help Modal */
.modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

.tab-btn {
    background: rgba(51, 51, 51, 0.8);
    border: none;
    padding: 8px 15px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    min-width: max-content;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn:hover {
    background: rgba(81, 81, 81, 0.8);
}

.tab-btn.active {
    background: #0051ba;
    border-bottom: 3px solid #ffd700;
    color: #ffffff;
    font-weight: 500;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Ensure content isolation */
#controls-tab:not(.active),
#game-description-tab:not(.active),
#about-tab:not(.active) {
    display: none !important;
}

/* About Tab Styles */
.about-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    padding: 0 5px;
}

.about-item {
    background: rgba(51, 51, 51, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.about-item h3 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-item p {
    margin: 0;
    line-height: 1.5;
}

.about-version-history {
    background: rgba(51, 51, 51, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 81, 186, 0.7) rgba(0, 0, 0, 0.2);
}

.about-version-history h3 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#version-history-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#version-history-list li {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

#version-history-list li:hover {
    background-color: rgba(0, 81, 186, 0.1);
}

#version-history-list li:last-child {
    border-bottom: none;
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    .about-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar Styles */
/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 81, 186, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 81, 186, 0.8);
    border-color: rgba(255, 215, 0, 0.4);
}

/* Specific scrollbar styling for the About tab version history */
.about-version-history::-webkit-scrollbar {
    width: 8px;
}

.about-version-history::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(0, 81, 186, 0.7), rgba(0, 51, 116, 0.7));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.about-version-history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, rgba(0, 81, 186, 0.9), rgba(0, 51, 116, 0.9));
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 81, 186, 0.6) rgba(0, 0, 0, 0.2);
}

.about-version-history {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 81, 186, 0.7) rgba(0, 0, 0, 0.2);
}

/* Improve the modal content scrolling appearance */
.modal-content {
    scrollbar-gutter: stable;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Make version history list items more visually appealing */
#version-history-list li {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

#version-history-list li:hover {
    background-color: rgba(0, 81, 186, 0.1);
}

#version-history-list li:last-child {
    border-bottom: none;
}

/* Win Screen */
#levelup-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.levelup-container {
    background-color: rgba(51, 51, 51, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 2px solid #4CAF50;
    animation: bounceIn 0.8s ease-out;
}

.levelup-container h1 {
    color: #4CAF50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.levelup-text {
    font-size: 18px;
    margin: 10px 0;
}

#levelup-score {
    font-size: 1.8em;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}


#levelup-highestscore {
    font-size: 22px;
    color: #a8aea9;
    margin-bottom: 30px;
}




#levelup-score.new-high-score {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
    animation: pulse 2s infinite;
}

#levelup-bonus {
    font-size: 18px;
    color: #FFA500;
    margin-bottom: 20px;
}

#levelup-time {
    font-size: 18px;
    margin-bottom: 30px;
}

#levelup-restart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#levelup-restart-button:hover {
    background-color: #45a049;
}

#levelup-restart-button.selected {
    transform: scale(1.1);
    background-color: #45a049;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

/* Game Description Tab Styles */
.game-description-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #ffffff;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 5px;
}

.game-description-container h1 {
    color: #ffd700;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}

.game-description-container h2 {
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.game-description-container h3 {
    color: #ffd700;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.game-description-container p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.game-description-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.game-description-container li {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.game-description-container li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: #ffd700;
}

/* Responsive adjustments for Game Description */
@media (max-width: 600px) {
    .game-description-container h1 {
        font-size: 24px;
    }

    .game-description-container h2 {
        font-size: 20px;
    }

    .game-description-container h3 {
        font-size: 18px;
    }

    .game-description-container p,
    .game-description-container li {
        font-size: 14px;
    }
}

/* Leaderboard styles */
.leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #ffffff;
    width: 100%;
}

.leaderboard-container h3 {
    color: #ffd700;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.leaderboard-table {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 81, 186, 0.3);
    font-weight: bold;
    color: #ffd700;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.no-scores {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* High Score Animation */
@keyframes highScoreGlow {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                     0 0 30px rgba(255, 215, 0, 0.6),
                     0 0 40px rgba(255, 215, 0, 0.4);
    }
}

.new-high-score {
    color: #ffd700;
    animation: highScoreGlow 2s infinite;
}

/* Power Timer Styles */
#power-timers {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.power-timer {
    font-size: 14px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    display: flex;
    align-items: left;
    gap: 6px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    min-width: 70px; /* Ensures a minimum width */

}

.power-timer.active {
    opacity: 1;
    background: rgba(0, 81, 186, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: powerPulse 2s infinite;
}

@keyframes powerPulse {
    0%, 100% { 
        background: rgba(0, 81, 186, 0.4);
    }
    50% { 
        background: rgba(0, 81, 186, 0.6);
    }
}

#boostJump-timer i {
    color: #ffd700;
}

#speedBoost-timer i {
    color: #4CAF50;
}

#attackerFreeze-timer i {
    color: #00ffff;
}

/* Mission Title Styles */
#mission-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 32px;
    font-weight: bold;
    color: #ffd700;
    text-align: center;
    z-index: 1000;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5),
                 0 0 20px rgba(255, 215, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    animation: missionTitleZoom 5s ease-in-out forwards;
}

@keyframes missionTitleZoom {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* Level Selection Styles */

/* Help prompt styling */
.help-prompt {
    margin: 15px 0;
    font-size: 14px;
    color: #ffd700;
    text-align: center;
}

.help-prompt .key {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: monospace;
    color: #ffd700;
    margin: 0 3px;
}

#total-score {
    font-family: 'Arial', sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Update win screen score display to handle longer text */
#levelup-score {
    font-size: 1.8em;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}

/* Style for the 'Continue to Forest' button */
#levelup-restart-button {
    font-size: 1.2em;
    padding: 15px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#levelup-restart-button:hover {
    background-color: #45a049;
}

/* Social Media Buttons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
}

.social-button:hover {
    transform: scale(1.1);
    background-color: #555;
}

.social-button i {
    font-size: 1.2rem;
}