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

body {
    font-family: 'Bangers', cursive;
    min-height: 100vh;
    background: linear-gradient(180deg, #2d5a27 0%, #1a3a15 50%, #0d1f0a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.game-container {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(20px, 8vw, 36px);
    color: #FFD700;
    text-shadow: 3px 3px 0 #8B4513, 6px 6px 0 rgba(0,0,0,0.3);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.score-panel {
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.5);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid #8B4513;
}

.score, .arrows, .round {
    font-size: clamp(14px, 4vw, 20px);
    color: #fff;
}

.score span, .arrows span, .round span {
    color: #FFD700;
}

.target-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #8B4513;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

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

.power-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 25px;
    background: rgba(0,0,0,0.6);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #fff;
}

.power-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff00 0%, #ffff00 50%, #ff0000 100%);
    transition: width 0.05s linear;
    border-radius: 13px;
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.shoot-btn, .reset-btn {
    font-family: 'Bangers', cursive;
    font-size: clamp(18px, 5vw, 24px);
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 2px;
}

.shoot-btn {
    background: linear-gradient(180deg, #FF6B35 0%, #D4380D 100%);
    color: #fff;
    box-shadow: 0 6px 0 #8B2500, 0 10px 20px rgba(0,0,0,0.3);
}

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

.reset-btn {
    background: linear-gradient(180deg, #6B7280 0%, #4B5563 100%);
    color: #fff;
    box-shadow: 0 6px 0 #374151, 0 10px 20px rgba(0,0,0,0.3);
}

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

.shoot-btn:disabled {
    background: #666;
    box-shadow: none;
    cursor: not-allowed;
}

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

.touch-hint {
    margin-top: 8px;
    font-size: clamp(10px, 2.5vw, 14px);
    opacity: 0.7;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    border: 3px solid #FFD700;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(16px, 5vw, 24px);
    color: #FFD700;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: clamp(18px, 5vw, 28px);
    color: #fff;
    margin-bottom: 25px;
}

.modal-content span {
    color: #FF6B35;
}

@media (min-width: 768px) {
    .game-container {
        max-width: 600px;
    }

    .target-container {
        aspect-ratio: 4/3;
    }
}
