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

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    overflow: hidden;
    cursor: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background-image: url('circus_background.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

.game-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FF4444, #FFD700);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 100;
}

.game-title {
    font-size: 2.5rem;
    color: white;
    text-shadow: 3px 3px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.game-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000;
}

.stat-value {
    display: block;
    font-size: 2rem;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000;
}

.game-area {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 120px;
    overflow: hidden;
}

.crosshair {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: #FF4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

.crosshair::before {
    width: 40px;
    height: 3px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.crosshair::after {
    width: 3px;
    height: 40px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.target {
    position: absolute;
    width: 80px;
    height: 80px;
    cursor: crosshair;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.target:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.target.hit {
    animation: hitAnimation 0.5s ease-out forwards;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes hitAnimation {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.target img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none; /* Let clicks pass through to parent target div */
}

.bang-effect {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url('bang_effect.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 999;
    animation: bangAnimation 0.8s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes bangAnimation {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(180deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5) rotate(360deg); opacity: 0; }
}

.game-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4169E1, #32CD32);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}

.control-btn {
    background: linear-gradient(135deg, #FF8C00, #FF4444);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    text-shadow: 2px 2px 0px #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #FF4444, #FF8C00);
}

.control-btn:active {
    transform: translateY(0);
}

.instructions {
    color: white;
    font-size: 1.1rem;
    text-shadow: 2px 2px 0px #000;
    text-align: center;
}

.instructions strong {
    color: #FFD700;
}

.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: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 5px solid #FFD700;
}

.modal-content h2 {
    font-size: 3rem;
    color: white;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 20px;
}

.final-stats {
    margin: 20px 0;
}

.final-stats p {
    font-size: 1.5rem;
    color: white;
    text-shadow: 2px 2px 0px #000;
    margin: 10px 0;
}

.final-stats span {
    color: #FFD700;
    font-weight: bold;
}

.ammo-display {
    position: absolute;
    top: 120px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    padding: 15px;
    border-radius: 10px;
    color: white;
    z-index: 100;
}

.ammo-label {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #FFD700;
}

.ammo-bullets {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 120px;
}

.bullet {
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
}

.bullet.empty {
    background: #666;
    box-shadow: none;
}

.reload-hint {
    font-size: 0.8rem;
    color: #FF6B6B;
    text-align: center;
    margin-top: 10px;
    animation: blink 1s infinite;
}

.reload-hint.hidden {
    display: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Target-specific styles */
.target.duck { animation-duration: 2s; }
.target.rabbit { animation-duration: 2.5s; }
.target.bear { animation-duration: 3s; }
.target.elephant { animation-duration: 3.5s; }
.target.squirrel { animation-duration: 1.5s; }

/* Responsive design */
@media (max-width: 768px) {
    .game-title { font-size: 1.8rem; }
    .game-stats { gap: 15px; }
    .stat-value { font-size: 1.5rem; }
    .control-btn { padding: 10px 20px; font-size: 1rem; }
    .instructions { font-size: 0.9rem; }
}

