* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.prize-cta-row .play-again-btn {
    margin-top: 0; /* align with Submit details button in the same row */
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* green variant inside row */
    color: #fff;
}

.game-over-grid {
    display: flex;
    gap: 20px;
    text-align: left;
    margin: 6px 0 6px; /* Reduced from 10px to 6px (4px reduction) */
}

.game-over-grid .results-panel,
.game-over-grid .leaderboard-panel {
    flex: 1;
    background: #fbfbfb;
    border-radius: 12px;
    padding: 8px 16px 12px; /* Reduced top padding from 12px to 8px (4px reduction) */
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.game-over-grid .results-panel {
    max-height: none;
    overflow: visible;
}

.game-over-grid .results-panel h4,
.game-over-grid .leaderboard-panel h4 {
    margin-top: 0;
    margin-bottom: 0;
    color: #2c3e50;
}

.leaderboard-rows {
    max-height: 100px;
    overflow-y: auto;
}

.results-panel .results-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px; /* Added to control spacing */
}

.results-panel .final-time-inline {
    font-size: 1.6rem; /* Reduced from 1.8rem */
    font-weight: 700;
    color: #e74c3c;
    line-height: 1.2; /* Added to prevent text clipping */
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(180deg, #87CEEB 0%, #4682B4 100%);
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* Centers the game-container horizontally */
    align-items: center;   /* Centers the game-container vertically */
}

.game-container {
    /* --- NEW DIMENSIONS --- */
    width: 800px; /* Lock to 800px wide */
    height: 400px; /* Lock to 480px high */
    max-width: 100%; /* Ensure it still shrinks on small screens */
    max-height: 100%; /* Ensure it still shrinks on small screens */
    
    /* Keeping relevant properties */
    margin: 0;
    padding: 5px;
    display: flex;
    flex-direction: column;
    
    /* Removing or overriding old size rules */
    min-height: auto; /* Overrides the old 100vh */
}

/* --- 1. FULL-SCREEN OVERLAY --- */
#main-menu-modal {
    /* Locks the modal to the viewport */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Puts it above all game elements */
    z-index: 100; 
    
    /* Dark, semi-transparent background */
    background: rgba(0, 0, 0, 0.9); 
    
    /* Use Flexbox to center the content box inside */
    display: flex;
    justify-content: center;
    align-items: center;
}

.header {
    text-align: center;
    margin-bottom: 15px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding: 10px 0;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

.hud {
    position: absolute;
    top: 15px;                      /* Distance from top */
    left: 50%;                      /* Center horizontally */
    transform: translateX(-50%);    /* Perfect centering */
    display: flex;
    justify-content: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.6); /* Darker for better visibility */
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 100;                   /* Above game elements */
    pointer-events: none;           /* Don't block clicks */
}

.hud-item {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 100px;
}

.game-area {
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 10px;
    padding: 5px 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    flex: 1;
}

.water-track {
    height: 360px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-image:
        url('assets/images/water-sky-background.svg'),
        linear-gradient(180deg, #87CEEB 0%, #2E8B9E 100%);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center center;
}

.water-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(255,255,255,0.15) 50px,
        transparent 100px
    );
    animation: water-flow 1.5s linear infinite;
    z-index: 0;
}

.water-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('assets/images/shoreline-foreground.svg') repeat-x center top;
    background-size: 
        4096px 256px;
    background-position: 
        var(--scroll-offset, 0px) -90px,
        var(--scroll-offset, 0px) 0;
    z-index: 3;
    pointer-events: none;
    will-change: background-position; /* Optimize for animation */
}

@keyframes water-flow {
    0% { transform: translateX(0); }
    100% { transform: translateX(100px); }
}

@keyframes shoreline-scroll {}

.water-track.racing::after {
    animation: none; /* Disable auto-animation */
}

.lane-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        rgba(255,255,255,0.2) 1px,
        transparent 2px,
        transparent 100px
    );
    z-index: 2;
}

.racing-lanes {
    position: absolute;
    top: 144px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 20px 0;
}

.lane {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

.lane-label {
    position: absolute;
    left: 5px;
    top: 3px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
}

.boat {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    transition: left 0.1s ease-out;
    z-index: 10;
    filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.3));
}

.boat::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(196, 124, 65, 0.9));
    right: -22px;
    top: 58%;
    transform-origin: left center;
    transform: rotate(-45deg);
    opacity: 0;
    pointer-events: none;
}

.boat.rowing::after {
    animation: none !important;
    opacity: 0;
}

.boat-name {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translate(-50%, 0);
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    z-index: 0;
}

.player-boat .boat-name {
    background: rgba(52, 152, 219, 0.85);
}

.ai-boat .boat-name {
    background: rgba(231, 76, 60, 0.85);
}

.waka-sprite {
    width: 64px;
    height: 64px;
    display: block;
    transform: scale(1.1);        /* ← ADD THIS: 10% larger */
    transition: transform 0.2s ease-out;
    will-change: transform;
    max-width: 100%;
    height: auto;
}

.player-boat {
    filter: drop-shadow(2px 2px 4px rgba(52, 152, 219, 0.6));
}

.ai-boat {
    opacity: 0.9;
    filter: drop-shadow(2px 2px 4px rgba(231, 76, 60, 0.4));
}

/* Responsive styles for smaller screens */
@media (max-width: 800px) {
    .waka-sprite {
        transform-origin: center;
    }
}

.boat.rowing {
    animation: none !important;
}

@keyframes row-motion {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1) rotate(-2deg); }
    100% { transform: translateY(-50%) scale(1); }
}

@keyframes paddle-stroke {
    0% {
        transform: rotate(-45deg) translateY(0);
        opacity: 0.3;
    }
    40% {
        transform: rotate(-5deg) translateY(-2px);
        opacity: 1;
    }
    70% {
        transform: rotate(15deg) translateY(2px);
    }
    100% {
        transform: rotate(35deg) translateY(4px);
        opacity: 0;
    }
}

.row-splash {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(82, 196, 224, 0.9);
    right: -4px;
    bottom: 16px;
    opacity: 0;
    pointer-events: none;
}

.row-splash.splashing {
    animation: splash-arc 0.6s ease-out forwards;
}

@keyframes splash-arc {
    0% {
        transform: translate(0, 0) scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: translate(-8px, -10px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-12px, -20px) scale(0.4);
        opacity: 0;
    }
}

.finish-line {
    position: absolute;
    right: 9%;
    top: 72%;
    transform: translateY(-50%);
    width: 25px;  
    height: 350px;  
    background: url('../assets/images/finish-line.svg') no-repeat center center;
    background-size: contain;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.7));
}

.finish-line.active {
    animation: finish-line-pulse 2s infinite ease-in-out;
}

@keyframes finish-line-pulse {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
        opacity: 0.9;
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.9));
        opacity: 1;
    }
}

.finish-line.reached {
    animation: finish-line-celebration 1s ease-out, finish-line-pulse 2s infinite ease-in-out;
}

@keyframes finish-line-celebration {
    0% { 
        transform: translateY(-50%) scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    }
    15% { 
        transform: translateY(-50%) scale(1.1);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1));
    }
    30% { 
        transform: translateY(-50%) scale(0.98);
    }
    45% { 
        transform: translateY(-50%) scale(1.05);
    }
    60% { 
        transform: translateY(-50%) scale(0.99);
    }
    75% { 
        transform: translateY(-50%) scale(1.02);
    }
    100% { 
        transform: translateY(-50%) scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.7));
    }
}

.race-positions {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
}

.race-positions h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1rem;
}

.position-list {
    display: flex;
    justify-content: space-around;
    gap: 5px;
}

.position-item {
    background: rgba(52, 152, 219, 0.1);
    padding: 6px 8px;
    border-radius: 12px;
    font-weight: bold;
    color: #2c3e50;
    flex: 1;
    text-align: center;
    border: 2px solid transparent;
    font-size: 0.8rem;
}

.position-item.first {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #b8860b;
}

.position-item.second {
    background: rgba(192, 192, 192, 0.2);
    border-color: #c0c0c0;
    color: #696969;
}

.position-item.third {
    background: rgba(205, 127, 50, 0.2);
    border-color: #cd7f32;
    color: #8b4513;
}

.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 100;
}

.countdown-overlay:not(.active) {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.countdown-overlay.active {
    display: flex;
}

.countdown-display {
    font-size: 6rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: countdown-pulse 1s ease-in-out;
}

.countdown-display img {
    width: clamp(90px, 22vw, 200px);
    height: auto;
    display: block;
    animation: countdown-zoom 1s ease-in-out;
}

@keyframes countdown-zoom {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
    70% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

.result-medal {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes countdown-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown-display.go {
    color: #2ecc71;
    font-size: 4rem;
}

.countdown-display.final {
    animation: countdown-final 1s ease-in-out;
}

@keyframes countdown-final {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.instruction {
    margin-top: 20px;
    color: #7f8c8d;
    font-style: italic;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 10px;
    box-sizing: border-box;
}

.game-over-content {
    background: white;
    padding: 10px;
    border-radius: 15px;
    text-align: center;
    width: 800px;
    height: 400px;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin: 0;
    display: flex;
    flex-direction: column;
}

.game-over h2 {
    color: #2c3e50;
    margin: 5px 0 10px 0;
    font-size: 1.5rem;
}

.game-over .final-time {
    font-size: 2rem;
    color: #e74c3c;
    font-weight: bold;
    margin: 20px 0;
}

.play-again-btn {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
    transition: transform 0.2s ease;
}

.play-again-btn:hover {
    transform: translateY(-2px);
}

.prize-entry {
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid #ecf0f1;
    text-align: left;
    font-size: 0.85rem;
}

.prize-entry h4 {
    margin: 0 0 8px;
    color: #2c3e50;
    font-size: 1rem;
}

.prize-entry-byline-inline {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.prize-entry p {
    margin: 4px 0 10px;
    color: #6b7576;
}

.prize-entry-form-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 8px 0;
    flex-wrap: wrap;
}

.prize-entry-fields {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.prize-entry input[type="text"],
.prize-entry input[type="email"] {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    font-size: 0.85rem;
    min-width: 0;
    flex: 1;
    width: 150px;
}

.optin-row {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin-left: 0px;
    margin-top: 8px;
}

.optin-checkbox {
    width: 24px;
    height: 24px;
}

/* Promotional Snippets */
.promotional-snippets-container {
    margin: 20px 0;
    max-width: 100%;
}

.snippets-header {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.promo-snippet {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 150px;
}

.promo-snippet:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.promo-image {
    width: 120px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.promo-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.promo-title {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.3;
}

.promo-description {
    margin: 0 0 12px 0;
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
}

.promo-cta-btn {
    display: inline-block;
    background: #892c24;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    transition: background 0.3s ease;
    align-self: flex-start;
}

.promo-cta-btn:hover {
    background: #000000;
}

/* Specific rule for Play Again button */
.play-again-btn.promo-cta-btn {
    background: #059905aa !important;
    color: #fff !important;
}

.play-again-btn.promo-cta-btn:hover {
    background: #00cc00 !important;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.show-all-btn {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.show-all-btn:hover {
    background: #2980b9;
}

.optin-label {
    font-size: 0.85rem;
    color: #2c3e50;
    cursor: pointer;
    white-space: normal;    /* Add this from first definition */
}

.prize-cta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0 0;
    flex-wrap: wrap;
    justify-content: center;
}

.prize-note {
    font-size: 0.85rem;
    color: #2c3e50;
    margin-left: auto;
}

.prize-submit-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.prize-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.prize-status {
    margin-top: 8px;
    min-height: 1em;
    font-size: 0.8rem;
}

.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.info-modal.active {
    display: flex;
}

.info-modal-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    max-width: 650px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   LEADERBOARD MODAL STYLES
   ======================================== */

.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.leaderboard-modal.active {
    display: flex;
}

.leaderboard-modal-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modal-appear 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
}

.leaderboard-header h3 {
    margin: 0;
    color: white;
    font-size: 1.6rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leaderboard-body {
    padding: 25px;
    background: white;
    border-radius: 0 0 15px 15px;
    overflow-y: auto;
    flex: 1;
}

.leaderboard-status {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.status-indicator {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(149, 165, 166, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
}

.status-indicator.online {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.leaderboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #7f8c8d;
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid #ecf0f1;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.leaderboard-list {
    min-height: 200px;
}

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

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.leaderboard-entry:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leaderboard-entry.first {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-left-color: #f39c12;
}

.leaderboard-entry.second {
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
    border-left-color: #95a5a6;
}

.leaderboard-entry.third {
    background: linear-gradient(135deg, #fab1a0 0%, #e17055 100%);
    border-left-color: #d63031;
}

.entry-rank {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.entry-details {
    flex: 1;
    min-width: 0;
}

.entry-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-date {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 2px;
}

.entry-time {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
    white-space: nowrap;
}

.leaderboard-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.leaderboard-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.leaderboard-actions .btn.secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.leaderboard-actions .btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Scrollbar styling for leaderboard modal */
.leaderboard-body::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.leaderboard-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.leaderboard-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .leaderboard-modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .leaderboard-header h3 {
        font-size: 1.3rem;
    }
    
    .leaderboard-entry {
        padding: 10px;
        gap: 10px;
    }
    
    .entry-rank {
        font-size: 1.2rem;
        min-width: 30px;
    }
    
    .entry-name {
        font-size: 0.9rem;
    }
    
    .entry-time {
        font-size: 1rem;
    }
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.info-header h3 {
    margin: 0;
    color: white;
    font-size: 1.6rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.info-body {
    padding: 25px;
    line-height: 1.6;
    color: #2c3e50;
    background: white;
    border-radius: 0 0 15px 15px;
}

.info-body p {
    margin: 8px 0;
}

.info-body strong {
    color: #34495e;
}

.info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-icon {
    font-size: 2.5rem;
    position: absolute;
    top: -15px;
    right: 20px;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-section h4 {
    margin: 0 0 12px 0;
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 8px 0 8px 30px;
    position: relative;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-list li::before {
    content: "▸";
    position: absolute;
    left: 10px;
    color: #667eea;
    font-weight: bold;
}

.info-list kbd {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.info-tip {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
    color: #2c3e50;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
}

.info-tip strong {
    color: #d35400;
}

/* Scrollbar styling for info modal */
.info-modal-content::-webkit-scrollbar {
    width: 8px;
}

.info-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.info-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.info-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Leaderboard Styles */
.leaderboard-display {
    background: rgba(52, 152, 219, 0.05);
    padding: 11px 15px; /* Reduced from 15px to 11px (4px reduction) */
    border-radius: 10px;
    border: 2px solid #3498db;
}

.leaderboard-display h4 {
    color: #2c3e50;
    margin-bottom: 6px; /* Reduced from 10px to 6px (4px reduction) */
    font-size: 1.1rem;
}

.leaderboard-display p {
    text-align: left;
    padding: 3px 20px; /* Reduced from 5px to 3px (2px reduction) */
    margin: 2px 0; /* Reduced from 3px to 2px (1px reduction) */
    background: white;
    border-radius: 5px;
    color: #2c3e50;
    line-height: 1.3; /* Added to maintain readability */
}

.leaderboard-form {
    animation: form-appear 0.3s ease-out;
}

@keyframes form-appear {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard-form input:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.leaderboard-form button:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.leaderboard-form button:active {
    transform: translateY(0);
}

/* Minimal Controls */
.minimal-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.control-btn {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    user-select: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:active {
    background: rgba(255,255,255,0.4);
    transform: scale(0.95);
}

.left-btn {
    margin-right: auto;
}

.right-btn {
    margin-left: auto;
}

/* ----- NEW MENU STYLES ----- */
.main-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.9)),
        url('assets/images/water-sky-background.svg') center/cover;
    /* no animation -> static background */
}

.menu-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 800px;
    max-width: 800px;
    height: 400px;
    max-height: 400px;
    padding: 40px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* push CTAs toward bottom */
    align-items: center;
    background: url('assets/images/water-sky-background.svg') center/cover;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: menu-appear 0.5s ease-out;
}

.menu-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.menu-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.menu-title-images {
    position: absolute;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
    height: 280px; /* taller overlay area for larger title */
    pointer-events: none; /* don't block CTA button clicks */
}

.menu-title-img {
    max-width: 95%;
    max-height: 320px;
    height: auto;
    display: block;
    opacity: 1;            /* always visible */
    transform: scale(1.5);
}

.menu-title-img.active {
    animation: title-zoom 1.1s ease-out;
}

@keyframes title-zoom {
    0% {
        transform: scale(0.8);
    }
    40% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 30px auto 0;
    position: relative;
    min-height: 200px; /* Ensure there's space for the logo */
}

.twoa-logo-container {
    position: fixed;
    bottom: -20px;
    right: 50px;
    width: 150px;
    height: auto;
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    pointer-events: auto;
}

.twoa-logo-container:hover {
    opacity: 1;
    transform: scale(1.05);
}

.twoa-logo {
    width: 120%;
    height: auto;
    display: block;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn.primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.menu-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid #3498db;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

.menu-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3rem;
}

@keyframes menu-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Promotional Snippets Styles */
.promo-snippets-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.promo-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.promo-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.promo-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

.snippets-header {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.snippets-grid.show-all {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.promo-snippet {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-snippet:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.promo-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.promo-snippet.compact .promo-image {
    height: 120px;
}

.promo-content {
    padding: 15px;
}

.promo-title {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.promo-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.promo-cta-btn {
    display: inline-block;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.promo-cta-btn:hover {
    background: linear-gradient(45deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.show-all-btn {
    width: 100%;
    padding: 12px 20px;
    background: #ecf0f1;
    border: 2px solid #3498db;
    color: #3498db;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-all-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Orientation Prompt */
.orientation-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
}

.orientation-content {
    text-align: center;
    padding: 30px;
}

.rotate-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: rotate-device 2s infinite ease-in-out;
}

@keyframes rotate-device {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

@media (max-width: 768px) and (orientation: portrait) {
    .orientation-prompt {
        display: flex;
    }
    .main-menu, .game-container {
        display: none !important;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .orientation-prompt {
        display: none;
    }
    .main-menu, .game-container {
        display: block;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .info-modal {
        padding: 10px;
    }

    .info-modal-content {
        max-width: 100%;
    }

}
