:root {
    --bg-color-main: #060a08;
    --text-primary: #e0f2e9;
    --text-green: #39ff14;
    --text-red: #ff1414;
    --fog-gray: rgba(100, 110, 105, 0.4);
    --dark-green: #0a1f11;
    --font-heading: 'Creepster', cursive;
    --font-body: 'Gothic A1', sans-serif;
}

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

body {
    background-color: var(--bg-color-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography & Utilities */
.hidden { display: none !important; }
.text-green { color: var(--text-green); text-shadow: 0 0 5px var(--text-green); }
.text-red { color: var(--text-red); text-shadow: 0 0 5px var(--text-red); }
.text-muted { color: #888; }
.btn-link { color: var(--text-green); text-decoration: none; border-bottom: 1px dotted var(--text-green); }
.btn-link:hover { text-shadow: 0 0 10px var(--text-green); }

/* --- 1. LANDING SCREEN --- */
#landing-screen {
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #0a1410 0%, #000 80%);
}

.background-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('misty_mountain_bg.png') center/cover no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.fog-container {
    position: absolute;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.fog-layer {
    position: absolute;
    width: 300%;
    height: 100%;
    background: transparent url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png') repeat-x;
    background-size: cover;
    opacity: 0.4;
    animation: fog-move 60s linear infinite;
}

.fog-2 {
    background: transparent url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png') repeat-x;
    background-size: cover;
    opacity: 0.2;
    animation: fog-move 40s linear infinite reverse;
}

@keyframes fog-move {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); } /* Uses wider width to loop */
}

.content-center {
    position: relative;
    z-index: 10;
    max-width: 600px;
    padding: 20px;
}

/* Text Stylings */
.main-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.glow-pulse { animation: pulse-glow 3s infinite alternate; }

@keyframes pulse-glow {
    0% { opacity: 0.8; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
    100% { opacity: 1; text-shadow: 0 0 30px rgba(100,255,150,0.5); }
}

.subtext {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0;
    margin-bottom: 40px;
    transition: opacity 2s ease-in;
}

/* Button */
.btn-ritual {
    background: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    padding: 10px 40px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 5px;
    position: relative;
    overflow: hidden;
}

.pulse-fast { animation: btn-pulse 1.5s infinite; }

@keyframes btn-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.btn-ritual:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-green);
    color: var(--text-green);
}

.btn-ritual.green-glow {
    border-color: var(--text-green);
    color: var(--text-green);
    margin-top: 20px;
    animation: green-btn-pulse 2s infinite;
}

@keyframes green-btn-pulse {
    0% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(57, 255, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); }
}

/* Post-chant stats */
#chant-stats { margin-top: 30px; font-family: var(--font-body); }
#global-count { font-size: 1.5rem; font-weight: bold; }
.mountain-msg { margin-top: 10px; font-style: italic; opacity: 0; }
.success-flash { animation: flash-green 1s forwards; }

@keyframes flash-green {
    0% { background: var(--text-green); color: black; opacity: 1; }
    100% { background: transparent; color: var(--text-green); opacity: 1;}
}


/* --- 2. MIDU WORLD --- */
#midu-world {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.panel {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0, 0, 0, 0.6);
    margin-bottom: 40px;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}
.panel:hover {
    transform: translateY(-5px);
    border-color: rgba(57, 255, 20, 0.2);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ccc;
    text-align: center;
}

/* Granny Panel */
.granny-panel { display: flex; align-items: center; gap: 30px; }
.granny-frame {
    width: 150px; height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
    background: #000;
}
#granny-avatar {
    width: 100%; height: 100%;
    background: url('nainai_granny.png') center/cover;
    animation: low-fps-shake 1s steps(4) infinite;
}
@keyframes low-fps-shake {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(2px, 1px) scale(1.02); }
    50% { transform: translate(-1px, -2px) scale(0.98); }
    75% { transform: translate(-3px, 0px) scale(1.01); }
    100% { transform: translate(0, 0) scale(1); }
}
.creepy-text-block { font-size: 1.1rem; line-height: 1.6; }
.flicker-slow { animation: flicker 4s infinite alternate; }
@keyframes flicker {
    0%, 100% { opacity: 1; } 50% { opacity: 0.6; } 60% { opacity: 0.9; }
}

/* Oracle Panel */
.oracle-readout {
    list-style: none;
    font-family: monospace;
    font-size: 1.2rem;
    line-height: 2;
}
.text-glitch {
    position: relative; display: inline-block;
}
.text-glitch::before, .text-glitch::after {
    content: 'UNKNOWN'; position: absolute; top: 0; left: 0; opacity: 0.8;
}
.text-glitch::before { color: #0ff; z-index: -1; animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite; }
.text-glitch::after { color: #f0f; z-index: -2; animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) reverse both infinite; }

@keyframes glitch-anim {
    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) }
}

/* Ritual */
.ritual-steps li { margin-bottom: 10px; font-size: 1.1rem; margin-left: 20px;}
.heavy { font-weight: 900; letter-spacing: 1px;}
.shake-inf { display: inline-block; animation: shake-tiny 0.8s infinite; }
@keyframes shake-tiny {
    0% { transform: translateY(0); } 50% { transform: translateY(-1px); } 100% { transform: translateY(0); }
}

/* Lore */
.lore-panel { text-align: center; border-color: transparent; background: transparent; }
.glow-text-intense { text-shadow: 0 0 10px var(--text-primary); font-weight: bold;}

/* Social Feed */
.social-panel { max-height: 300px; overflow-y: hidden; position: relative;}
.social-panel::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.feed-box { display: flex; flex-direction: column; gap: 15px; }
.feed-item {
    font-size: 0.9rem; padding: 10px; border-left: 2px solid var(--text-green);
    background: rgba(255,255,255,0.05); animation: fade-in-up 0.5s ease-out;
}
.feed-username { font-weight: bold; margin-bottom: 5px; color: #aaa;}
@keyframes fade-in-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Buy Panel */
.buy-panel { text-align: center; }
.creepy-heading { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 5px;}
.highlight-heading { font-size: 1.5rem; text-transform: uppercase; margin-bottom: 30px;}
.action-buttons { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px;}
.contract-box { padding: 15px; background: #111; border: 1px dashed #555; display: inline-block; font-family: monospace; font-size: 1.2rem;}
.btn-copy { background: #333; color: white; border: none; padding: 5px 10px; margin-left: 10px; cursor: pointer; border-radius: 3px;}
.btn-copy:hover { background: var(--text-green); color: black;}

/* Sound */
.sound-panel { text-align: center; }

/* JUMPSCARE */
#jumpscare-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: red;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    animation: horror-flicker 0.1s infinite;
}
#large-granny-face {
    width: 300px; height: 300px;
    background: url('nainai_granny.png') center/cover;
    filter: invert(1) contrast(2);
    border-radius: 50%;
    margin-bottom: 20px;
}
.jumpscare-text { font-family: 'Nosifer', sans-serif; font-size: 4rem; text-align: center; color: white;}

@keyframes horror-flicker {
    0% { background: black; } 50% { background: darkred; } 100% { background: black; }
}

/* Utility Animations */
.fade-in-screen { animation: screen-fade-in 2s forwards; }
@keyframes screen-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Header Stylings */
.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 30px; background: rgba(0, 0, 0, 0.85); box-shadow: 0 0 15px rgba(0,0,0,0.9);
    border-bottom: 2px solid rgba(57, 255, 20, 0.1); border-radius: 0 0 5px 5px;
    position: sticky; top: 0; z-index: 100;
}
.header-logo { font-family: var(--font-heading); font-size: 2.2rem; color: var(--text-primary); text-shadow: 0 0 10px rgba(100,255,150,0.3); }
.header-nav { display: flex; gap: 20px; }
