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

body {
    font-family: 'Bangers', cursive;
    min-height: 100vh;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8C8 50%, #7CB342 100%);
    overflow: hidden;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

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

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    gap: 20px;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(24px, 8vw, 64px);
    color: #FFD700;
    text-shadow: 4px 4px 0 #FF4444, 8px 8px 0 rgba(0,0,0,0.5);
    letter-spacing: 4px;
    text-align: center;
}

.tagline {
    font-size: clamp(16px, 4vw, 28px);
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.btn {
    font-family: 'Bangers', cursive;
    font-size: clamp(20px, 5vw, 32px);
    padding: 15px 50px;
    background: linear-gradient(180deg, #FF6B6B 0%, #EE4444 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: transform 0.2s, filter 0.2s;
    box-shadow: 0 6px 0 #AA2222, 0 10px 20px rgba(0,0,0,0.3);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #AA2222, 0 4px 10px rgba(0,0,0,0.3);
}

.instructions {
    font-size: clamp(12px, 3vw, 18px);
    color: #aaa;
    margin-top: 30px;
}

.score-final {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(16px, 4vw, 28px);
    color: #fff;
    margin: 20px 0;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

.hud-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(8px, 2vw, 12px);
    color: #FFD700;
    margin-bottom: 5px;
}

#score, #coins {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(14px, 4vw, 24px);
    color: #fff;
}

#touchControls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: none;
}

.touch-btn {
    font-family: 'Bangers', cursive;
    font-size: 24px;
    padding: 20px 60px;
    background: rgba(255, 107, 107, 0.8);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.touch-btn:active {
    transform: scale(0.95);
    background: rgba(255, 107, 107, 1);
}

.sound-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (hover: none) and (pointer: coarse) {
    #touchControls {
        display: block;
    }
}

@media (max-width: 600px) {
    #hud {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .hud-item {
        padding: 8px 15px;
    }
}
