/* Project Woodpecker - Main Styles */
/* SM64-inspired UI with bold colors and simple shapes */

:root {
    /* Safe area insets for mobile devices (iOS notch, etc.) */
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

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

body {
    overflow: hidden;
    background: #000;
    font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height on iOS */
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ========================================
   HUD OVERLAY
   ======================================== */

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
}

#hud > * {
    pointer-events: auto;
}

/* Top Left - Title, Score & Round */
#top-left-hud {
    position: absolute;
    top: calc(20px + var(--safe-area-inset-top));
    left: calc(20px + var(--safe-area-inset-left));
}

#game-title {
    font-size: 24px;
    color: #ffcc00;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000;
    margin-bottom: 10px;
}

#score-display,
#round-display {
    font-size: 20px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 5px;
}

/* Difficulty Display */
#difficulty-info {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    border-left: 3px solid #ffcc00;
}

#difficulty-name {
    font-size: 16px;
    color: #ffcc00;
    text-shadow: 1px 1px 0 #000;
}

#difficulty-multiplier {
    font-size: 14px;
    color: #44cc44;
    text-shadow: 1px 1px 0 #000;
    background: rgba(68, 204, 68, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
}

#difficulty-multiplier.medium {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.2);
}

#difficulty-multiplier.high {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.2);
    animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 68, 68, 0.5); }
    50% { box-shadow: 0 0 15px rgba(255, 68, 68, 0.8); }
}

/* ========================================
   WIND INDICATOR
   ======================================== */

#wind-indicator {
    position: absolute;
    bottom: calc(20px + var(--safe-area-inset-bottom));
    left: calc(20px + var(--safe-area-inset-left));
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 10px;
    border: 3px solid #fff;
}

.wind-label {
    font-size: 14px;
    color: #fff;
    margin-bottom: 5px;
}

.wind-compass {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #446 0%, #223 100%);
    border-radius: 50%;
    border: 3px solid #88aaff;
    position: relative;
    margin: 0 auto 5px;
}

.wind-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 30px;
    background: linear-gradient(to top, #ff4444 0%, #ffcc00 100%);
    transform-origin: center bottom;
    transform: translate(-50%, -100%) rotate(0deg);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.wind-arrow::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid #ffcc00;
}

.wind-speed {
    font-size: 12px;
    color: #88ccff;
}

/* ========================================
   AIM INDICATOR / CROSSHAIR
   ======================================== */

#aim-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    pointer-events: none;
}

.crosshair-h,
.crosshair-v {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

.crosshair-h {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.crosshair-v {
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.crosshair-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: transparent;
    border: 2px solid #ff4444;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   MESSAGE DISPLAY
   ======================================== */

#message-display {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    color: #ffcc00;
    text-shadow: 4px 4px 0 #000, -2px -2px 0 #000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

#message-display.visible {
    opacity: 1;
}

#message-display.bullseye {
    color: #ffcc00;
    animation: bullseye-pulse 0.5s ease-in-out;
}

@keyframes bullseye-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
}

/* ========================================
   POWER BARS
   ======================================== */

#power-bars-container {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.power-bar-container {
    display: none;
    text-align: center;
}

.power-bar-container.active {
    display: block;
}

.power-bar-label {
    font-size: 18px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 8px;
}

.power-bar {
    width: 300px;
    height: 30px;
    background: linear-gradient(to bottom, #333 0%, #555 50%, #333 100%);
    border: 3px solid #fff;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    box-shadow: 4px 4px 0 #000;
}

.power-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to top, #ff4400, #ffcc00);
    transition: width 0.016s linear;
}

.power-bar-marker {
    position: absolute;
    top: -5px;
    left: 0%;
    width: 4px;
    height: 40px;
    background: #fff;
    transform: translateX(-50%);
    box-shadow: 2px 2px 0 #000;
    transition: left 0.016s linear;
}

/* Spin bar has different color */
#spin-power-container .power-bar-fill {
    background: linear-gradient(to top, #4444ff, #44ffff);
}

/* ========================================
   INSTRUCTIONS
   ======================================== */

#instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #ccc;
    text-shadow: 1px 1px 0 #000;
}

.key {
    display: inline-block;
    background: linear-gradient(to bottom, #555, #333);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    border: 2px solid #666;
    border-bottom-color: #222;
    font-size: 12px;
    margin: 0 2px;
}

/* ========================================
   SKIP REPLAY BUTTON
   ======================================== */

#skip-replay {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border: 2px solid #888;
    border-radius: 8px;
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#skip-replay:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #ffcc00;
    color: #ffcc00;
}

#skip-replay.hidden {
    display: none;
}

/* ========================================
   REPLAY CONTROLS
   ======================================== */

#replay-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 15px;
    border: 3px solid #ffcc00;
    display: none;
}

#replay-controls.visible {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.replay-title {
    font-size: 20px;
    color: #ffcc00;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 15px;
    text-align: center;
}

.replay-buttons {
    display: flex;
    gap: 10px;
}

.replay-btn {
    background: linear-gradient(to bottom, #555, #333);
    color: #fff;
    border: 3px solid #666;
    border-bottom-color: #222;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s, background 0.1s;
}

.replay-btn:hover {
    background: linear-gradient(to bottom, #666, #444);
    transform: translateY(-2px);
}

.replay-btn:active {
    transform: translateY(1px);
}

.replay-btn.primary {
    background: linear-gradient(to bottom, #44aa44, #228822);
    border-color: #55bb55;
    border-bottom-color: #116611;
}

.replay-btn.primary:hover {
    background: linear-gradient(to bottom, #55bb55, #339933);
}

/* ========================================
   QUIT GAME BUTTON
   ======================================== */

#quit-game-button {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #cc4444, #882222);
    color: #fff;
    border: 3px solid #dd5555;
    border-bottom-color: #661111;
    padding: 8px 16px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    transition: background 0.1s, box-shadow 0.1s;
    display: none;
    pointer-events: auto;
    z-index: 50;
}

#quit-game-button.visible {
    display: block;
}

#quit-game-button:hover {
    background: linear-gradient(to bottom, #dd5555, #993333);
    box-shadow: 3px 5px 0 #000;
}

#quit-game-button:active {
    box-shadow: 3px 1px 0 #000;
}

/* ========================================
   START SCREEN
   ======================================== */

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #224488 0%, #112244 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#start-screen.hidden {
    display: none;
}

.start-content {
    text-align: center;
    padding: 40px;
}

.start-content h1 {
    font-size: 64px;
    color: #ffcc00;
    text-shadow: 6px 6px 0 #000, -2px -2px 0 #000;
    margin-bottom: 10px;
}

.start-subtitle {
    font-size: 24px;
    color: #fff;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 40px;
}

/* Player Name Input */
.player-name-input {
    margin-bottom: 30px;
}

.player-name-input label {
    display: block;
    font-size: 18px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 10px;
}

.player-name-input input {
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #ffcc00;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 24px;
    padding: 12px 20px;
    text-align: center;
    width: 280px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.player-name-input input:focus {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

.player-name-input input::placeholder {
    color: #888;
}

.start-instructions {
    margin-bottom: 40px;
}

.start-instructions p {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 10px;
}

.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.start-btn {
    background: linear-gradient(to bottom, #44cc44, #228822);
    color: #fff;
    border: 4px solid #55dd55;
    border-bottom-color: #116611;
    padding: 20px 40px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 6px 6px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 6px 9px 0 #000;
}

.start-btn:active {
    transform: translateY(2px);
    box-shadow: 6px 4px 0 #000;
}

.secondary-btn {
    background: linear-gradient(to bottom, #555, #333);
    color: #fff;
    border: 3px solid #666;
    border-bottom-color: #222;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 6px 0 #000;
    background: linear-gradient(to bottom, #666, #444);
}

.secondary-btn:active {
    transform: translateY(1px);
    box-shadow: 4px 3px 0 #000;
}

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

.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(to bottom, #224488 0%, #112244 100%);
    border: 4px solid #ffcc00;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    font-size: 32px;
    color: #ffcc00;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 20px;
    flex-shrink: 0;
}

#modal-leaderboard-list {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    text-align: left;
}

#modal-leaderboard-list::-webkit-scrollbar {
    width: 6px;
}

#modal-leaderboard-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

#modal-leaderboard-list::-webkit-scrollbar-thumb {
    background: #ffcc00;
    border-radius: 3px;
}

#modal-leaderboard-list .leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #444;
    color: #ccc;
    font-size: 14px;
}

#modal-leaderboard-list .leaderboard-entry:last-child {
    border-bottom: none;
}

#modal-leaderboard-list .rank {
    width: 35px;
    font-weight: bold;
}

#modal-leaderboard-list .rank.gold { color: #ffd700; }
#modal-leaderboard-list .rank.silver { color: #c0c0c0; }
#modal-leaderboard-list .rank.bronze { color: #cd7f32; }

#modal-leaderboard-list .name {
    flex: 1;
    margin-left: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#modal-leaderboard-list .score {
    font-weight: bold;
    color: #fff;
}

.modal-content .start-btn {
    flex-shrink: 0;
    padding: 15px 30px;
    font-size: 18px;
}

/* ========================================
   GAME OVER SCREEN
   ======================================== */

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    overflow-y: auto;
    padding: var(--safe-area-inset-top) var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);
}

#game-over-screen.visible {
    display: flex;
}

.gameover-content {
    text-align: center;
    padding: 20px;
    max-height: 100%;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gameover-content .start-btn {
    flex-shrink: 0;
    margin-top: 15px;
}

.gameover-content h1 {
    font-size: 48px;
    color: #ff4444;
    text-shadow: 4px 4px 0 #000;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.final-score {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.score-label {
    font-size: 16px;
    color: #ccc;
}

#final-score-value {
    font-size: 56px;
    color: #ffcc00;
    text-shadow: 3px 3px 0 #000;
}

/* Player Rank */
#player-rank {
    font-size: 20px;
    color: #44cc44;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 10px;
    flex-shrink: 0;
}

#player-rank.top-3 {
    color: #ffcc00;
    font-size: 24px;
}

/* Leaderboard Section */
#leaderboard-section {
    margin: 10px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px solid #ffcc00;
    width: 100%;
    max-width: 350px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#leaderboard-section h2 {
    font-size: 20px;
    color: #ffcc00;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 10px;
    flex-shrink: 0;
}

#leaderboard-list {
    text-align: left;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 5px;
}

/* Custom scrollbar for leaderboard */
#leaderboard-list::-webkit-scrollbar {
    width: 6px;
}

#leaderboard-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

#leaderboard-list::-webkit-scrollbar-thumb {
    background: #ffcc00;
    border-radius: 3px;
}

#leaderboard-list::-webkit-scrollbar-thumb:hover {
    background: #ffdd44;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #444;
    color: #ccc;
    font-size: 14px;
}

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

.leaderboard-entry.current-player {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
    border-radius: 5px;
}

.leaderboard-entry .rank {
    width: 30px;
    font-weight: bold;
}

.leaderboard-entry .rank.gold { color: #ffd700; }
.leaderboard-entry .rank.silver { color: #c0c0c0; }
.leaderboard-entry .rank.bronze { color: #cd7f32; }

.leaderboard-entry .name {
    flex: 1;
    margin-left: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-entry .score {
    font-weight: bold;
    color: #fff;
}

.leaderboard-loading,
.leaderboard-error {
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* ========================================
   SCORE POP ANIMATION
   ======================================== */

.score-pop {
    animation: score-pop 0.3s ease-out;
}

@keyframes score-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #ffcc00; }
    100% { transform: scale(1); }
}

/* ========================================
   SLOW MOTION INDICATOR
   ======================================== */

.slow-mo-indicator {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ff4444;
    text-shadow: 2px 2px 0 #000;
    opacity: 0;
    transition: opacity 0.3s;
}

.slow-mo-indicator.visible {
    opacity: 1;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
    .start-content h1 {
        font-size: 36px;
    }

    .start-subtitle {
        font-size: 18px;
    }

    .power-bar {
        width: 200px;
    }

    #message-display {
        font-size: 32px;
    }

    .replay-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   MOBILE SUPPORT
   ======================================== */

/* Visibility helpers */
.hidden {
    display: none !important;
}

.mobile-only {
    display: none !important;
}

.mobile-device .mobile-only {
    display: block !important;
}

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

/* Mobile Throw Button */
#mobile-throw-button {
    position: absolute;
    bottom: calc(80px + var(--safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #44cc44, #228822);
    border: 5px solid #55dd55;
    border-bottom-color: #116611;
    box-shadow: 0 6px 0 #116611, 0 10px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    transition: transform 0.1s, box-shadow 0.1s;
    z-index: 50;
}

#mobile-throw-button.pressed {
    transform: translateX(-50%) translateY(4px);
    box-shadow: 0 2px 0 #116611, 0 6px 15px rgba(0, 0, 0, 0.3);
}

.throw-button-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.throw-text {
    font-size: 20px;
    font-weight: bold;
}

.throw-hint {
    font-size: 9px;
    opacity: 0.8;
    margin-top: 2px;
}

/* Mobile Instructions */
#mobile-instructions {
    position: absolute;
    bottom: calc(20px + var(--safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #ccc;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    white-space: nowrap;
}

/* Mobile start screen instructions */
.start-instructions.mobile-only p {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 10px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px), (pointer: coarse) {
    /* Adjust power bar position to not overlap throw button */
    .mobile-device #power-bars-container {
        bottom: calc(220px + var(--safe-area-inset-bottom));
    }

    /* Make power bar wider on mobile for easier visibility */
    .mobile-device .power-bar {
        width: 260px;
        height: 35px;
    }

    .mobile-device .power-bar-marker {
        height: 45px;
        top: -5px;
    }

    /* Larger touch targets for replay buttons */
    .mobile-device .replay-btn {
        padding: 15px 18px;
        font-size: 14px;
    }

    /* Adjust quit button on mobile */
    .mobile-device #quit-game-button {
        top: auto;
        bottom: calc(20px + var(--safe-area-inset-bottom));
        right: calc(20px + var(--safe-area-inset-right));
        left: auto;
        transform: none;
    }

    /* Adjust skip replay button on mobile - move to left side */
    .mobile-device #skip-replay {
        right: auto;
        left: calc(20px + var(--safe-area-inset-left));
        bottom: calc(20px + var(--safe-area-inset-bottom));
    }

    /* Smaller wind indicator on mobile */
    .mobile-device #wind-indicator {
        padding: 8px 10px;
    }

    .mobile-device .wind-compass {
        width: 45px;
        height: 45px;
    }

    /* Adjust replay controls for mobile */
    .mobile-device .replay-buttons {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    /* Game over screen responsive */
    .gameover-content h1 {
        font-size: 36px;
        margin-bottom: 10px;
    }

    #final-score-value {
        font-size: 42px;
    }

    #leaderboard-section {
        max-width: 300px;
        padding: 12px;
    }

    #leaderboard-section h2 {
        font-size: 18px;
    }

    .start-btn {
        padding: 15px 30px;
        font-size: 18px;
    }
}
