* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
    user-select: none;
}

body {
    font-family: 'Comic Sans MS', 'Marker Felt', sans-serif;
    background: linear-gradient(135deg, #4a6cf7, #8b5cf6);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    max-height: 800px;
    background: #1a1a2e;
    overflow: hidden;
    touch-action: none;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f1a;
    touch-action: none;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.ui-element {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
    pointer-events: none;
}

#power-meter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    display: none;
    z-index: 5;
}

#power-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4d4d, #ffcc00, #4dff4d);
    border-radius: 10px;
    transition: width 0.1s;
}

#trajectory {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.trajectory-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

#reward-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 20px 30px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

#reward-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

#title {
    font-size: 42px;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px #ffcc00;
    color: #ffd700;
    animation: pulse 2s infinite;
}

.subtitle {
    font-size: 18px;
    text-align: center;
    max-width: 90%;
    margin-bottom: 30px;
    line-height: 1.5;
}

@keyframes pulse {
    0% {
        text-shadow: 0 0 10px #ffcc00;
    }

    50% {
        text-shadow: 0 0 20px #ff6b6b, 0 0 30px #ffcc00;
    }

    100% {
        text-shadow: 0 0 10px #ffcc00;
    }
}

.btn {
    background: linear-gradient(145deg, #ff6b6b, #ff4d4d);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 15px 40px;
    margin: 15px 0;
    width: 80%;
    max-width: 300px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

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

.btn-primary {
    background: linear-gradient(145deg, #4dcb73, #2ecc71);
}

.weapon-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.weapon-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.weapon-btn.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.level-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
}

.duck-count {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
}

.stun-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none;
    display: none;
}

.stun-active {
    display: block;
    animation: flash 0.5s;
}

@keyframes flash {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 150;
    display: none;
}

#game-over h2 {
    font-size: 48px;
    color: #ff4d4d;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.7);
}

.score-display {
    font-size: 36px;
    margin: 20px 0;
    color: #ffd700;
}

.instructions {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 15px;
    margin: 20px;
    text-align: center;
    max-width: 90%;
    font-size: 16px;
    line-height: 1.5;
}