:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #ff0000;
    --text-color: #ffffff;
    --warning-color: #ff9900;
    --danger-color: #ff0000;
}

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

@keyframes flicker {
    0% { opacity: 0.8; }
    5% { opacity: 0.5; }
    10% { opacity: 0.9; }
    15% { opacity: 0.7; }
    20% { opacity: 1; }
    25% { opacity: 0.6; }
    30% { opacity: 0.8; }
    35% { opacity: 0.5; }
    40% { opacity: 0.9; }
    45% { opacity: 0.7; }
    50% { opacity: 1; }
    55% { opacity: 0.8; }
    60% { opacity: 0.6; }
    65% { opacity: 0.9; }
    70% { opacity: 0.7; }
    75% { opacity: 1; }
    80% { opacity: 0.5; }
    85% { opacity: 0.8; }
    90% { opacity: 0.6; }
    95% { opacity: 0.9; }
    100% { opacity: 0.7; }
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes blood-drip {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

body {
    font-family: 'Special Elite', cursive;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.blood-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 999;
    opacity: 0.5;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgpAZAAAACHRSTlMoADYx/zYx/4Ns3y8AAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAySURBVDjLY2AYBaNg8AJGZQYGZmUGBmYlBgYmJQYGRiUGBkYlBgZGJQYGRiUGBkYlGAAAn2IFbzpQ7VUAAAAASUVORK5CYII=');
    opacity: 0.05;
    animation: noise 0.5s steps(10) infinite;
    pointer-events: none;
    z-index: 1000;
}

/* Warning Overlay */
.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.warning-content {
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--warning-color);
    background-color: var(--secondary-color);
    max-width: 600px;
    position: relative;
    animation: glitch 0.3s infinite;
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: shake 0.5s infinite;
}

.typewriter-text p {
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    animation: typing 3.5s steps(40, end);
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

#enter-btn {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background-color: var(--warning-color);
    border: none;
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-family: 'Special Elite', cursive;
}

.btn-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    animation: glitch-anim 2s infinite;
    pointer-events: none;
}

/* Emergency Alert */
.emergency-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--danger-color);
    padding: 0.5rem;
    text-align: center;
    z-index: 100;
    animation: flicker 2s infinite;
}

.alert-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Navigation */
nav {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(5px);
}

.logo {
    font-family: 'Creepster', cursive;
    font-size: 2rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

nav a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav a:hover::before {
    transform: scaleX(1);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle" style="font-family: Arial;">WARNING</text></svg>');
    animation: backgroundPulse 4s ease-in-out infinite;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 1px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 0, 0, 0.05) 1px,
            transparent 2px,
            transparent 4px
        ),
        linear-gradient(
            135deg,
            rgba(0,0,0,0.8) 0%,
            rgba(128,0,0,0.2) 50%,
            rgba(0,0,0,0.8) 100%
        );
    filter: blur(1px);
    z-index: 2;
}

/* Fog effect */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: 
        linear-gradient(to right, 
            rgba(255,0,0,0.1) 0%,
            transparent 20%,
            rgba(255,0,0,0.1) 40%,
            transparent 60%,
            rgba(255,0,0,0.1) 80%,
            transparent 100%
        );
    animation: fogMove 30s linear infinite;
    z-index: 3;
}

.hero-content {
    text-align: center;
    z-index: 4;
    position: relative;
    padding: 2rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,0,0,0.3);
    box-shadow: 
        0 0 20px rgba(255,0,0,0.2),
        inset 0 0 20px rgba(255,0,0,0.2);
    animation: pulseBackground 4s ease-in-out infinite;
}

@keyframes fogMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes pulseBackground {
    0%, 100% {
        background: rgba(0,0,0,0.6);
    }
    50% {
        background: rgba(20,0,0,0.7);
    }
}

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

.glitch-text {
    font-family: 'Creepster', cursive;
    font-size: 5rem;
    color: var(--accent-color);
    text-shadow: 
        2px 2px 0px rgba(255,0,0,0.5),
        -2px -2px 0px rgba(0,255,255,0.5),
        0 0 20px rgba(255,0,0,0.5),
        0 0 40px rgba(255,0,0,0.3),
        0 0 60px rgba(255,0,0,0.2);
    animation: textGlitch 0.3s infinite;
}

@keyframes textGlitch {
    0% {
        text-shadow: 
            2px 2px 0px rgba(255,0,0,0.5),
            -2px -2px 0px rgba(0,255,255,0.5);
    }
    25% {
        text-shadow: 
            -2px 2px 0px rgba(255,0,0,0.5),
            2px -2px 0px rgba(0,255,255,0.5);
    }
    50% {
        text-shadow: 
            2px -2px 0px rgba(255,0,0,0.5),
            -2px 2px 0px rgba(0,255,255,0.5);
    }
    75% {
        text-shadow: 
            -2px -2px 0px rgba(255,0,0,0.5),
            2px 2px 0px rgba(0,255,255,0.5);
    }
    100% {
        text-shadow: 
            2px 2px 0px rgba(255,0,0,0.5),
            -2px -2px 0px rgba(0,255,255,0.5);
    }
}

.danger-meter {
    margin-top: 2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--danger-color);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.danger-meter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255,0,0,0.1) 50%,
        transparent 100%
    );
    animation: dangerPulse 2s ease-in-out infinite;
}

@keyframes dangerPulse {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    z-index: 4;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-family: 'Special Elite', cursive;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255,0,0,0.5);
}

.scroll-indicator i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

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

/* Dinosaur Cards */
.dinosaur-catalog {
    padding: 6rem 2rem;
    position: relative;
}

.section-title {
    text-align: center;
    font-family: 'Creepster', cursive;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.dino-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease;
}

.dino-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.dino-card {
    background-color: rgba(26, 26, 26, 0.9);
    padding: 2rem;
    border: 1px solid var(--accent-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dino-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 0, 0, 0.1));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.dino-card:hover::before {
    transform: translateX(0);
}

/* Gallery Section */
.evidence-gallery {
    padding: 4rem 2rem;
    background-color: var(--secondary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: scale(1.02) rotate(-1deg);
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0.8) 10px,
        rgba(255, 0, 0, 0.1) 10px,
        rgba(255, 0, 0, 0.1) 20px
    );
    opacity: 0.3;
}

/* Specific dinosaur placeholder backgrounds */
.image-placeholder.t-rex {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle">T-REX</text></svg>');
}

.image-placeholder.raptor {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle">RAPTOR</text></svg>');
}

.image-placeholder.indominus {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle">INDOMINUS</text></svg>');
}

.image-placeholder.dilophosaurus {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle">DILOPHOSAURUS</text></svg>');
}

.image-placeholder.pteranodon {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle">PTERANODON</text></svg>');
}

.image-placeholder.mosasaurus {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50%" y="50%" font-size="14" fill="red" text-anchor="middle">MOSASAURUS</text></svg>');
}

.classified {
    position: absolute;
    top: 20px;
    right: -35px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-family: 'Special Elite', cursive;
    font-size: 0.8rem;
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: flicker 2s infinite;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay h3 {
    font-family: 'Special Elite', cursive;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.image-overlay p {
    font-size: 0.9rem;
    margin: 2px 0;
    opacity: 0.8;
}

.timestamp {
    font-family: 'Courier New', monospace;
    color: var(--warning-color);
    font-size: 0.8rem;
}

/* Film grain effect for images */
.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgpAZAAAACHRSTlMoADYx/zYx/4Ns3y8AAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAySURBVDjLY2AYBaNg8AJGZQYGZmUGBmYlBgYmJQYGRiUGBkYlBgZGJQYGRiUGBkYlGAAAn2IFbzpQ7VUAAAAASUVORK5CYII=');
    opacity: 0.3;
    mix-blend-mode: overlay;
    animation: grain 0.8s steps(1) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0) }
    10% { transform: translate(-5%, -5%) }
    20% { transform: translate(5%, 5%) }
    30% { transform: translate(3%, -3%) }
    40% { transform: translate(-3%, 3%) }
    50% { transform: translate(2%, -2%) }
    60% { transform: translate(-2%, 2%) }
    70% { transform: translate(1%, -1%) }
    80% { transform: translate(-1%, 1%) }
    90% { transform: translate(0%, 0%) }
}

/* Survival Guide Section */
.survival-guide {
    padding: 4rem 2rem;
    background-color: var(--primary-color);
}

.survival-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.survival-tip {
    background-color: rgba(26, 26, 26, 0.9);
    padding: 2rem;
    border: 1px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.survival-tip h3 {
    color: var(--warning-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.survival-tip ul {
    list-style: none;
}

.survival-tip li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.survival-tip li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
    color: var(--warning-color);
}

/* Active Threats Section */
.active-threats {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--danger-color);
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.threat-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--danger-color);
    padding-bottom: 1rem;
}

.threat-level {
    margin-top: 1rem;
}

.threat-level .blink {
    color: var(--danger-color);
    font-family: 'Special Elite', cursive;
    font-size: 1.2rem;
    animation: blink 1s infinite;
}

.threat-meter {
    width: 100%;
    height: 20px;
    background: rgba(255, 0, 0, 0.1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 90%;
    background: linear-gradient(90deg, 
        var(--danger-color) 0%,
        #ff0000 50%,
        var(--danger-color) 100%);
    animation: meterPulse 2s ease-in-out infinite;
}

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

.incident-feed {
    max-height: 400px;
    overflow-y: auto;
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.incident-entry {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-left: 3px solid var(--accent-color);
}

.incident-entry.emergency {
    border-left: 3px solid var(--danger-color);
    background: rgba(255, 0, 0, 0.1);
    animation: emergencyPulse 2s infinite;
}

@keyframes emergencyPulse {
    0%, 100% { background: rgba(255, 0, 0, 0.1); }
    50% { background: rgba(255, 0, 0, 0.2); }
}

.timestamp {
    display: block;
    color: var(--warning-color);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.casualty-counter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.counter-item {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--danger-color);
}

.counter-item h3 {
    color: var(--warning-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.counter-item .count {
    font-size: 2.5rem;
    color: var(--danger-color);
    font-family: 'Special Elite', cursive;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.emergency-protocols {
    background: rgba(255, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid var(--danger-color);
    margin-top: 2rem;
}

.emergency-protocols h3 {
    color: var(--danger-color);
    margin-bottom: 1rem;
    font-family: 'Special Elite', cursive;
}

.emergency-protocols ul {
    list-style: none;
    padding: 0;
}

.emergency-protocols li {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-left: 3px solid var(--danger-color);
    font-family: 'Special Elite', cursive;
}

/* Custom scrollbar for incident feed */
.incident-feed::-webkit-scrollbar {
    width: 8px;
}

.incident-feed::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.incident-feed::-webkit-scrollbar-thumb {
    background: var(--danger-color);
    border-radius: 4px;
}

.incident-feed::-webkit-scrollbar-thumb:hover {
    background: #ff0000;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.footer-warning {
    margin-top: 1rem;
}

.blink {
    animation: blink 1s infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 3rem;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    .dino-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
