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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #87CEEB;
    font-family: Arial, sans-serif;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#hud {
    position: absolute;
    top: min(5vh, 20px);
    left: min(5vw, 20px);
    color: white;
    font-size: clamp(16px, 4vmin, 24px);
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

.game-title {
    font-size: clamp(24px, 6vmin, 36px);
    margin: 0 0 15px 0;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 
        3px 3px 0 #4285F4,
        -1px -1px 0 #4285F4,  
        1px -1px 0 #4285F4,
        -1px 1px 0 #4285F4,
        1px 1px 0 #4285F4;
}

#controls {
    position: absolute;
    top: min(5vh, 20px);
    right: min(5vw, 20px);
    display: flex;
    gap: min(2vw, 10px);
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #45a049;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: min(5vmin, 20px);
    border-radius: min(2vmin, 8px);
    text-align: center;
    color: white;
    font-size: clamp(16px, 4vmin, 24px);
    min-width: 320px;
}

#debug-overlay {
    position: absolute;
    bottom: min(5vh, 20px);
    left: min(5vw, 20px);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
}

.hidden {
    display: none;
}

.leaderboard-container {
    margin: 20px 0;
    text-align: center;
}

.leaderboard-container h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.leaderboard {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 15px;
    width: 300px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.leaderboard-entry .rank {
    color: #4CAF50;
    font-weight: bold;
    width: 40px;
}

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

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

.leaderboard-entry:first-child {
    background: rgba(255, 215, 0, 0.2);
}

.leaderboard-entry.no-scores {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;    background: none;
}

#footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: clamp(12px, 2.5vmin, 16px);
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    font-family: Arial, sans-serif;
    z-index: 1000;
    pointer-events: none;
}

@media (max-width: 480px) {

@media (max-width: 480px) {
    #game-container {
        width: 100%;
        height: 100vh;
    }
    
    canvas {
        border-radius: 0;
    }
    
    #hud {
        font-size: 20px;
    }
    
    button {
        padding: 6px 12px;
        font-size: 14px;
    }
}
