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

body {
    font-family: 'Courier New', monospace;
    background-color: #000;
    color: #0f0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Monitor Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 255, 0, 0.1) 50%,
        transparent 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanline 0.1s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.game-container {
    background-color: #001100;
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px #0f0;
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #0f0;
    padding-bottom: 10px;
}

.header h1 {
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
    margin-bottom: 10px;
}

.stats {
    display: flex;
    justify-content: space-around;
    font-size: 14px;
}

.stats span {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.game-area {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#game-board {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    line-height: 1;
    white-space: pre;
    background-color: #000;
    border: 1px solid #0f0;
    padding: 10px;
    box-shadow: inset 0 0 10px #0f0;
}

.controls {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #0f0;
    padding-top: 10px;
}

.controls p {
    margin-bottom: 10px;
    color: #0f0;
}

button {
    background-color: #001100;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #0f0;
    color: #000;
    box-shadow: 0 0 10px #0f0;
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #001100;
    border: 2px solid #0f0;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 20px #0f0;
    z-index: 1001;
}

.game-over h2 {
    color: #f00;
    text-shadow: 0 0 10px #f00;
    margin-bottom: 15px;
}

.game-over p {
    color: #0f0;
    margin-bottom: 20px;
}

/* Game elements styling */
.player {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.enemy {
    color: #f00;
    text-shadow: 0 0 5px #f00;
}

.enemy-red {
    color: #f00;
    text-shadow: 0 0 5px #f00;
}

.enemy-orange {
    color: #ff8000;
    text-shadow: 0 0 5px #ff8000;
}

.enemy-yellow {
    color: #ff0;
    text-shadow: 0 0 5px #ff0;
}

.enemy-purple {
    color: #8000ff;
    text-shadow: 0 0 5px #8000ff;
}

.enemy-pink {
    color: #ff0080;
    text-shadow: 0 0 5px #ff0080;
}

.enemy-cyan {
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
}

.enemy-magenta {
    color: #f0f;
    text-shadow: 0 0 5px #f0f;
}

.enemy-lime {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.bullet {
    color: #ff0;
    text-shadow: 0 0 5px #ff0;
}

.wall {
    color: #888;
}

.exit {
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
}

.path {
    color: #000;
}

/* Animation for shooting */
@keyframes shoot {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 0; }
}

.shooting {
    animation: shoot 0.2s ease-out;
}

/* Life lost animations */
@keyframes playerDeath {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.5) rotate(90deg); opacity: 0.8; }
    50% { transform: scale(0.5) rotate(180deg); opacity: 0.6; }
    75% { transform: scale(1.2) rotate(270deg); opacity: 0.4; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes enemyAttack {
    0% { transform: scale(1); color: inherit; }
    25% { transform: scale(1.5); color: #fff; }
    50% { transform: scale(2); color: #ff0; }
    75% { transform: scale(1.5); color: #fff; }
    100% { transform: scale(1); color: inherit; }
}

@keyframes screenFlash {
    0% { background-color: rgba(255, 0, 0, 0); }
    50% { background-color: rgba(255, 0, 0, 0.7); }
    100% { background-color: rgba(255, 0, 0, 0); }
}

@keyframes lifeLostText {
    0% { 
        opacity: 0; 
        transform: scale(0.5) translateY(50px); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) translateY(0px); 
    }
    100% { 
        opacity: 0; 
        transform: scale(0.8) translateY(-50px); 
    }
}

.player-death {
    animation: playerDeath 1s ease-out;
}

.enemy-attack {
    animation: enemyAttack 1s ease-out;
}

.screen-flash {
    animation: screenFlash 1s ease-out;
}

.life-lost-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #f00;
    text-shadow: 0 0 20px #f00, 0 0 40px #f00;
    z-index: 1002;
    pointer-events: none;
    animation: lifeLostText 2s ease-out;
}

.maze-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
} 