* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Bangers', cursive;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 800px;
    max-height: 600px;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
    overflow: hidden;
}

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

.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.85);
    z-index: 100;
    padding: 20px;
    text-align: center;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(24px, 8vw, 48px);
    color: #FFD700;
    text-shadow: 4px 4px 0 #0066CC, 8px 8px 0 rgba(0,0,0,0.5);
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.screen .tagline {
    font-size: clamp(16px, 4vw, 24px);
    color: #00BFFF;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.screen .score-final,
.screen .rings-final {
    font-size: clamp(18px, 5vw, 28px);
    color: #fff;
    margin-bottom: 15px;
}

.screen .score-final span,
.screen .rings-final span {
    color: #FFD700;
}

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

.btn {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(14px, 4vw, 20px);
    padding: 15px 40px;
    background: linear-gradient(180deg, #FFD700 0%, #FF8C00 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 0 #CC6600, 0 10px 20px rgba(0,0,0,0.3);
}

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

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

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(8px, 2.5vw, 12px);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.hud-item:first-child .hud-label {
    color: #FFD700;
}

.hud-item:last-child .hud-label {
    color: #00BFFF;
}

.hud-item span:last-child {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(14px, 4vw, 24px);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    margin-top: 5px;
}

#touchControls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 50;
}

.touch-btn {
    font-family: 'Bangers', cursive;
    font-size: clamp(18px, 5vw, 24px);
    padding: 20px 60px;
    background: rgba(255, 215, 0, 0.9);
    color: #1a1a2e;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.1s, background 0.1s;
}

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

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

@media (min-width: 768px) {
    #touchControls {
        display: none;
    }
}

@media (max-width: 480px) {
    .screen h1 {
        letter-spacing: 2px;
    }
    
    .btn {
        padding: 12px 30px;
    }
}
