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

/* CSS Variables */
:root {
    --primary-dark: #0d0d0d;
    --secondary-dark: #1a1612;
    --tertiary-dark: #252016;
    --accent-green: #4a6741;
    --accent-rust: #8b4513;
    --accent-orange: #cc6600;
    --text-light: #f4f1e8;
    --text-dim: #b8b5a8;
    --text-muted: #8a8777;
    --danger-red: #8b0000;
    --ellie-blue: #4a5f7a;
    --abby-orange: #b8860b;
    --infection-yellow: #d4af37;
    --spore-green: #556b2f;
    --blood-red: #722f37;
}

/* Base Styles */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--primary-dark);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255,255,255,.01) 10px,
            rgba(255,255,255,.01) 20px
        ),
        radial-gradient(ellipse at top, rgba(90,124,78,0.05) 0%, transparent 50%);
}

/* Grunge overlay effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, transparent 50%, rgba(0,0,0,0.4) 100%),
        radial-gradient(circle at 80% 20%, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Atmospheric Spore Particles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.3), transparent);
    background-size: 200% 200%;
    animation: floatParticles 40s linear infinite;
}

@keyframes floatParticles {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-2000px) translateX(-100px); }
}

/* Glitch effect for hover states */
@keyframes glitch {
    0%, 100% {
        text-shadow:
            2px 2px 4px rgba(0,0,0,0.8),
            -1px -1px 0 rgba(139,69,19,0.5);
    }
    25% {
        text-shadow:
            -2px 2px 4px rgba(0,0,0,0.8),
            1px -1px 0 rgba(74,95,122,0.5);
    }
    50% {
        text-shadow:
            2px -2px 4px rgba(0,0,0,0.8),
            -1px 1px 0 rgba(184,134,11,0.5);
    }
    75% {
        text-shadow:
            -2px -2px 4px rgba(0,0,0,0.8),
            1px 1px 0 rgba(90,124,78,0.5);
    }
}

/* Header and Navigation */
header {
    background-color: var(--primary-dark);
    border-bottom: 2px solid var(--accent-rust);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    font-weight: normal;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Desktop Navigation */
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-green);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-green);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 2rem;
    position: relative;
    z-index: 2;
}

/* Common Utility Classes */
.section-title {
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    position: relative;
    font-weight: normal;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--accent-rust), transparent);
}

/* Achievement Notifications */
.achievement-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%);
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.8),
        0 0 40px rgba(90,124,78,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: right 0.5s ease;
    z-index: 10000;
    max-width: 350px;
}

.achievement-notification.show {
    right: 20px;
}

.achievement-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(90,124,78,0.5));
    animation: bounce 1s ease infinite;
}

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

.achievement-text {
    flex: 1;
}

.achievement-unlocked {
    color: var(--accent-green);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.achievement-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.achievement-description {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Enhanced button hover with pulse effect */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-rust), var(--accent-orange));
    color: var(--text-light);
    text-decoration: none;
    border: 2px solid transparent;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90,124,78,0.4);
    border-color: var(--accent-green);
    animation: pulse 1.5s ease infinite;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

@keyframes pulse {
    0% { box-shadow: 0 6px 20px rgba(90,124,78,0.4); }
    50% { box-shadow: 0 6px 30px rgba(90,124,78,0.6); }
    100% { box-shadow: 0 6px 20px rgba(90,124,78,0.4); }
}

/* Common Section Styles */
.section {
    background:
        linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(139,69,19,0.03) 20px,
            rgba(139,69,19,0.03) 22px
        );
    border: 1px solid rgba(139,69,19,0.4);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 4px 15px rgba(0,0,0,0.3);
}

.section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    position: relative;
}

/* Tablet and Mobile Styles */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.8);
        border-bottom: 2px solid var(--accent-rust);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-title {
        font-size: 1.4rem;
    }
}

/* Mobile-specific Styles */
@media (max-width: 768px) {
    .nav-title {
        font-size: 1.2rem;
    }

    header {
        padding: 0.75rem 0;
    }

    .container {
        padding-top: 70px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Easter Egg Styles */
.firefly {
    position: fixed;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffeb3b 0%, #ff9800 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffeb3b;
    animation: fly 10s linear infinite;
    z-index: 10000;
}

@keyframes fly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(100vw - 100%), calc(-100vh + 100%)) scale(0.5);
        opacity: 0;
    }
}

.easter-egg-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%);
    border: 3px solid var(--infection-yellow);
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    z-index: 10001;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow:
        0 0 100px rgba(212,175,55,0.5),
        0 0 50px rgba(212,175,55,0.3),
        inset 0 0 50px rgba(212,175,55,0.1);
}

.easter-egg-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.firefly-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(212,175,55,0.8));
    animation: flicker 2s ease infinite;
}

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

.message-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--infection-yellow);
    letter-spacing: 3px;
    text-shadow:
        0 0 20px rgba(212,175,55,0.8),
        2px 2px 4px rgba(0,0,0,0.9);
}

/* Achievement notification mobile adjustments */
@media (max-width: 768px) {
    .achievement-notification {
        right: -350px;
        left: auto;
        max-width: 280px;
        padding: 1rem;
    }

    .achievement-notification.show {
        right: 10px;
    }

    .easter-egg-message {
        padding: 2rem;
        width: 90%;
        max-width: 300px;
    }

    .message-text {
        font-size: 1.8rem;
    }
}
