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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    overflow: hidden;
}

#game-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #ff6b6b;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    font-weight: bold;
}

#stats div {
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid #4ecdc4;
}

#health span {
    color: #ff6b6b;
}

#score span {
    color: #4ecdc4;
}

#monsters-killed span {
    color: #ffd93d;
}

#game-area {
    flex: 1;
    position: relative;
    background: linear-gradient(to bottom, #2c3e50, #34495e);
    cursor: none;
    overflow: hidden;
}

#player {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #4ecdc4, #45b7b8);
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
    transition: all 0.1s ease;
}

#player::after {
    content: '🛡️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
}

#crosshair {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #ff6b6b;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
    transform: translate(-50%, -50%);
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: #ff6b6b;
}

#crosshair::before {
    width: 2px;
    height: 20px;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

#crosshair::after {
    width: 20px;
    height: 2px;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
}

.monster {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url('monster.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.6));
}

.monster:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
}

.monster.damaged {
    animation: damage-flash 0.3s ease;
}

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

@keyframes damage-flash {
    0%, 100% { background: radial-gradient(circle, #e74c3c, #c0392b); }
    50% { background: radial-gradient(circle, #ffffff, #ff6b6b); }
}

.health-bar {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(to right, #ff6b6b, #4ecdc4);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.damage-number {
    position: absolute;
    color: #ff6b6b;
    font-weight: bold;
    font-size: 20px;
    pointer-events: none;
    animation: damage-rise 1s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes damage-rise {
    0% {
        opacity: 1;
        transform: translateY(0px);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px);
    }
}

#controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    text-align: center;
    border-top: 1px solid #4ecdc4;
}

#controls p {
    margin: 5px 0;
    font-size: 0.9rem;
}

#game-over, #victory {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid #ff6b6b;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

#victory {
    border-color: #4ecdc4;
}

#game-over h2, #victory h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#victory h2 {
    color: #4ecdc4;
}

#game-over h2 {
    color: #ff6b6b;
}

button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: linear-gradient(45deg, #45b7b8, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.hidden {
    display: none;
}

.explosion {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd93d, #ff6b6b, transparent);
    animation: explode 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}