@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Orbitron:wght@400;700;900&display=swap');

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

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #2a0f0f 100%);
    color: #ff4444;
    font-family: 'Orbitron', monospace;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ff4444;
    border-radius: 50%;
    animation: float 6s infinite linear;
    opacity: 0.7;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Glitch effect */
.glitch {
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); filter: hue-rotate(0deg); }
    20% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
    40% { transform: translate(-2px, -2px); filter: hue-rotate(180deg); }
    60% { transform: translate(2px, 2px); filter: hue-rotate(270deg); }
    80% { transform: translate(2px, -2px); filter: hue-rotate(360deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    border-bottom: 3px solid #ff4444;
    position: relative;
}

.title {
    font-family: 'Creepster', cursive;
    font-size: 4rem;
    color: #ff0000;
    text-shadow: 0 0 20px #ff4444, 0 0 40px #ff4444;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.subtitle {
    font-size: 1.5rem;
    color: #ffaaaa;
    font-weight: 700;
    letter-spacing: 3px;
}

.warning-banner {
    background: linear-gradient(45deg, #ff0000, #aa0000);
    padding: 20px;
    margin: 30px 0;
    border-radius: 10px;
    text-align: center;
    font-weight: 900;
    font-size: 1.2rem;
    animation: blink 1.5s infinite;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

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

.status-section {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    margin: 30px 0;
    border-radius: 15px;
    border: 2px solid #ff4444;
    box-shadow: inset 0 0 20px rgba(255, 68, 68, 0.2);
}

.creature-description {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
    margin: 40px 0;
}

.creature-image {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    border: 3px solid #ff4444;
    object-fit: cover;
    filter: sepia(100%) hue-rotate(0deg) saturate(2) contrast(1.2);
    animation: creepyGlow 3s infinite;
}

@keyframes creepyGlow {
    0%, 100% { 
        box-shadow: 0 0 20px #ff4444; 
        filter: sepia(100%) hue-rotate(0deg) saturate(2) contrast(1.2);
    }
    50% { 
        box-shadow: 0 0 40px #ff0000, 0 0 60px #ff4444; 
        filter: sepia(100%) hue-rotate(20deg) saturate(3) contrast(1.5);
    }
}

.survival-rules {
    background: rgba(20, 0, 0, 0.9);
    padding: 30px;
    margin: 30px 0;
    border-radius: 15px;
    border: 3px solid #ff6666;
}

.rule {
    background: rgba(0, 0, 0, 0.7);
    margin: 15px 0;
    padding: 20px;
    border-left: 5px solid #ff4444;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.rule:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateX(10px);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

.rule-number {
    color: #ff0000;
    font-weight: 900;
    font-size: 1.3rem;
    margin-right: 10px;
}

.emergency-contact {
    background: linear-gradient(135deg, #330000, #660000);
    padding: 30px;
    margin: 40px 0;
    border-radius: 15px;
    border: 3px solid #ff0000;
    text-align: center;
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.contact-info {
    font-size: 1.3rem;
    margin: 10px 0;
    color: #ffcccc;
}

.contact-link {
    color: #ff6666;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #ff0000;
    text-shadow: 0 0 10px #ff4444;
}

.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 3px solid #ff4444;
    margin-top: 50px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .title { font-size: 2.5rem; }
    .creature-description { 
        grid-template-columns: 1fr; 
        text-align: center;
    }
    .container { padding: 15px; }
}

/* Static noise overlay */
.noise::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: noise 0.2s infinite;
}

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

/* Game Styles */
.game-btn {
    background: linear-gradient(45deg, #ff0000, #aa0000, #ff4444);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 900;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: buttonPulse 2s infinite;
}

.game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 0, 0, 0.8); }
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.game-header {
    background: rgba(255, 0, 0, 0.2);
    padding: 10px 20px;
    border-bottom: 2px solid #ff4444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-game-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
}

.game-canvas {
    flex: 1;
    background: linear-gradient(180deg, #1a0a1a 0%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
}

.game-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-top: 2px solid #ff4444;
    text-align: center;
    color: #ff4444;
    font-family: 'Orbitron', monospace;
}

.protocol-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #ff4444;
    max-width: 600px;
    z-index: 1001;
    text-align: center;
    display: none;
    animation: emergencyFlash 1s infinite;
}

@keyframes emergencyFlash {
    0%, 100% { background: rgba(255, 0, 0, 0.9); }
    50% { background: rgba(255, 68, 68, 0.9); }
}

.player, .enemy {
    position: absolute;
    width: 40px;
    height: 60px;
    transition: all 0.1s ease;
}

.player {
    background: #00ff00;
    border-radius: 20px 20px 0 0;
    border: 2px solid #00aa00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.enemy {
    background-image: url('drevolaz.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    border: 2px solid #aa0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    animation: enemyGlow 2s infinite;
    filter: contrast(1.2) brightness(0.9) saturate(1.3);
}

@keyframes enemyGlow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
        filter: contrast(1.2) brightness(0.9) saturate(1.3);
    }
    50% { 
        box-shadow: 0 0 25px rgba(255, 0, 0, 1), 0 0 35px rgba(255, 0, 0, 0.6);
        filter: contrast(1.4) brightness(0.7) saturate(1.5) hue-rotate(10deg);
    }
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #ff4444;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    z-index: 100;
}

.protocol-action-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    margin: 10px;
    transition: all 0.3s ease;
}

.protocol-action-btn:hover {
    background: #ff0000;
    transform: scale(1.05);
}
