:root {
    --decay-red: #7a0000;
    --infection-yellow: #b0a43d;
    --bruise-purple: #3b1f3f;
    --static-white: #ffffffc0;
    --flesh-tone-1: #4d3f3f;
    --flesh-tone-2: #3d3232;
    --vein-blue: #1a2a5780;
    --void: #000000;

    --font-glitch: 'Rubik Glitch', 'Nosifer', cursive;
    --font-wetpaint: 'Rubik Wet Paint', 'Creepster', cursive;
    --font-gothic: 'UnifrakturMaguntia', cursive;
    --font-pixel: 'Pixelify Sans', 'Courier New', monospace;
    --font-handwritten: 'Yuji Syuku', serif;

    --fast: 0.1s;
    --medium: 0.5s;
    --slow: 2s;
    --glacial: 10s;
}

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

html.viewport-infected {

}

html.viewport-infected body {
    cursor: crosshair;
    overflow-x: hidden;
}

body.body-convulsing {
    background-color: var(--void);
    color: var(--static-white);
    font-family: var(--font-handwritten);
    line-height: 1.7;
    animation: body-convulse var(--medium) infinite steps(2, jump-none),
    color-shift-violent var(--slow) infinite ease-in-out alternate;
}

@keyframes body-convulse {
    0% { transform: translate(0, 0) skew(0) scale(1); }
    10% { transform: translate(-2px, 1px) skew(-0.5deg, 0.2deg) scale(1.001); }
    90% { transform: translate(1px, -2px) skew(0.3deg, -0.1deg) scale(0.999); }
    100% { transform: translate(0, 0) skew(0) scale(1); }
}
@keyframes color-shift-violent {
    0%, 100% { filter: hue-rotate(0deg) contrast(120%) brightness(1); }
    20% { filter: hue-rotate(20deg) contrast(150%) brightness(0.9); }
    40% { filter: hue-rotate(-10deg) contrast(180%) brightness(1.1); }
    60% { filter: hue-rotate(5deg) contrast(130%) brightness(0.8); }
    80% { filter: hue-rotate(-15deg) contrast(200%) brightness(1.2); }
}

body.body-convulsing {
    background-color: var(--void);
    color: var(--static-white);
    font-family: var(--font-handwritten);
    line-height: 1.7;
    animation: body-convulse var(--medium) infinite steps(2, jump-none),
    color-shift-violent var(--slow) infinite ease-in-out alternate;
}

.layer {
    position: fixed; inset: -5%; pointer-events: none; z-index: 1; width: 110%; height: 110%;
}
.screen-tear {
    background: linear-gradient(15deg, transparent 49.8%, var(--static-white) 49.8%, var(--static-white) 50.2%, transparent 50.2%);
    opacity: 0.15; animation: tear-shift 0.05s infinite linear; z-index: 5; mix-blend-mode: overlay;
}
@keyframes tear-shift { 0% { background-position: 0 0; } 100% { background-position: 20px -10px; } }
.vein-network {
    background-image: url('images/vein_pattern.png'); background-size: 300px 300px; opacity: 0.3; mix-blend-mode: multiply; filter: blur(0.5px); z-index: 2; animation: flesh-pulse-subtle 6s infinite ease-in-out alternate;
}
@keyframes flesh-pulse-subtle { 0% { transform: scale(1); opacity: 0.2; } 100% { transform: scale(1.01); opacity: 0.4; } }
.symbol-corruption {
    font-family: var(--font-gothic); font-size: 3em; color: var(--decay-red); opacity: 0.08; z-index: 3; text-align: center; line-height: 1; word-wrap: break-word; animation: symbol-flicker var(--fast) infinite steps(1, end);
}
.symbol-corruption::before { content: "⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎⛧︎︎⸸︎︎⛥︎︎⚸︎︎🜏︎︎"; position: absolute; inset: 0; filter: blur(1px); }
@keyframes symbol-flicker { 0% { transform: translate(1px, 1px) rotate(0.1deg); } 100% { transform: translate(-1px, -1px) rotate(-0.1deg); } }
.fast-static {
    background-image: url('images/fast_static_noise.gif'); opacity: 0.1; mix-blend-mode: screen; z-index: 4;
}
.color-bleed {
    background: linear-gradient(to bottom, var(--decay-red), transparent 30%), linear-gradient(to right, var(--bruise-purple), transparent 40%), linear-gradient(to top left, var(--infection-yellow), transparent 50%); opacity: 0.3; mix-blend-mode: color-burn; z-index: 6; filter: blur(15px); animation: color-shift-violent 5s infinite linear alternate;
}
.internal-screaming {
    background: var(--void); opacity: 0.8; z-index: 50; mix-blend-mode: difference; animation: scream-fade 15s infinite ease-in-out alternate;
}
@keyframes scream-fade { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.3; } }

.static-overlay-inf {
    position: fixed; top: -10%; left: -10%; width: 120%; height: 120%;
    background-image: url('images/tv_static_more_aggressive.gif');
    opacity: 0.08;
    pointer-events: none;
    z-index: 55;
    animation: shake-subtle 8s infinite linear alternate;
}
.vignette-overlay-inf {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, var(--void) 95%);
    pointer-events: none;
    z-index: 56;
}

@keyframes breath {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.015); opacity: 1; }
}
@keyframes pulse-red {
    0%, 100% { text-shadow: 0 0 5px var(--decay-red), 0 0 10px var(--decay-red), 0 0 15px #cc0000, 0 0 20px #800000, 1px 1px 2px var(--void); color: #ff4d4d; }
    50% { text-shadow: 0 0 8px var(--infection-yellow), 0 0 18px var(--decay-red), 0 0 25px #cc0000, 0 0 35px #800000, 1px 1px 2px var(--void); color: #ff6666; }
}
@keyframes pulse-red-intense {
    0%, 100% { transform: scale(1); text-shadow: 0 0 6px var(--decay-red), 0 0 12px var(--decay-red), 0 0 20px #d10000, 0 0 30px #8a0000, 2px 2px 3px var(--void); color: #ff6666; }
    50% { transform: scale(1.05); text-shadow: 0 0 10px var(--infection-yellow), 0 0 20px var(--decay-red), 0 0 35px #d10000, 0 0 50px #8a0000, 2px 2px 3px var(--void); color: #ff8080; }
}
@keyframes shake-subtle {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(1px, -1px) rotate(-0.1deg); }
    50% { transform: translate(-1px, 1px) rotate(0.1deg); }
    75% { transform: translate(1px, 1px) rotate(0.2deg); }
}
@keyframes spin {
    from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}
@keyframes spin-reverse {
    from { transform: rotate(360deg); } to { transform: rotate(0deg); }
}
@keyframes fade-out-slowly {
    0% { opacity: 0.7; } 50% { opacity: 0.4; } 100% { opacity: 0.1; }
}
@keyframes glitch-anim-heavy {
    0% { text-shadow: .06em 0 0 var(--decay-red), -.03em -.04em 0 var(--vein-blue), .03em .04em 0 var(--bruise-purple); }
    5% { text-shadow: .06em 0 0 var(--decay-red), -.03em -.04em 0 var(--vein-blue), .03em .04em 0 var(--bruise-purple); }
    6% { text-shadow: -.06em -.03em 0 var(--decay-red), .03em .03em 0 var(--vein-blue), -.06em -.04em 0 var(--bruise-purple); }
    100% { text-shadow: -.06em 0 0 var(--decay-red), .03em .04em 0 var(--vein-blue), -.03em -.04em 0 var(--bruise-purple); }
}
@keyframes glitch-clip1 {
    0% { clip: rect(12px, 9999px, 99px, 0); } 20% { clip: rect(35px, 9999px, 72px, 0); } 40% { clip: rect(88px, 9999px, 5px, 0); } 60% { clip: rect(57px, 9999px, 60px, 0); } 80% { clip: rect(23px, 9999px, 88px, 0); } 100% { clip: rect(80px, 9999px, 54px, 0); }
}
@keyframes glitch-clip2 {
    0% { clip: rect(77px, 9999px, 33px, 0); } 20% { clip: rect(40px, 9999px, 12px, 0); } 40% { clip: rect(25px, 9999px, 70px, 0); } 60% { clip: rect(90px, 9999px, 45px, 0); } 80% { clip: rect(10px, 9999px, 75px, 0); } 100% { clip: rect(50px, 9999px, 22px, 0); }
}
@keyframes text-twitch {
    0% { transform: translate(0.5px, -0.5px); } 50% { transform: translate(-0.5px, 0.5px); } 100% { transform: translate(0.5px, -0.5px); }
}
@keyframes rotate-erratic {
    0% { transform: rotate(0deg); } 20% { transform: rotate(-3deg); } 50% { transform: rotate(5deg); } 80% { transform: rotate(-1deg); } 100% { transform: rotate(0deg); }
}
@keyframes text-fade-out { 0% { opacity: 0.7; } 100% { opacity: 0; } }
@keyframes char-decay {
    0% { opacity: 0.1; transform: translate(0, 0) scale(1); filter: blur(2px); }
    50% { opacity: 0.4; transform: translate(5px, -5px) scale(1.02); filter: blur(0.5px); }
    100% { opacity: 0.2; transform: translate(-5px, 5px) scale(0.98); filter: blur(3px); }
}


.main-wrapper {
    max-width: 700px;
    margin: 8vh auto;
    padding: 30px 20px;
    background: rgba(5, 0, 0, 0.85);
    border: 1px solid var(--decay-red);
    box-shadow: 0 0 25px 5px var(--bruise-purple),
    inset 0 0 15px rgba(0, 0, 0, 0.9);
    position: relative;
    z-index: 60;
    overflow: hidden;
    animation: shake-subtle 15s infinite linear alternate;
    mix-blend-mode: normal;
}
.main-wrapper::after {
    content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px;
    background: repeating-linear-gradient(-45deg, rgba(122, 0, 0, 0.02), rgba(122, 0, 0, 0.02) 2px, transparent 2px, transparent 6px);
    z-index: -1; pointer-events: none; animation: shake-subtle 12s infinite linear;
}

.site-header {
    text-align: center; margin-bottom: 50px; padding-bottom: 30px;
    border-bottom: 2px dashed var(--decay-red); position: relative;
}
.header-spiral-container {
    position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
    width: 120px; height: 120px; opacity: 0.6; z-index: 0;
    filter: drop-shadow(0 0 5px var(--decay-red));
    animation: rotate-erratic 20s infinite linear alternate;
}
.header-spiral { width: 100%; height: 100%; }
.header-spiral:hover { opacity: 0.9; }

.main-title {
    font-family: var(--font-glitch);
    font-size: clamp(2.5em, 8vw, 4.5em);
    color: var(--infection-yellow);
    letter-spacing: 5px; margin-top: 40px; position: relative; z-index: 1;
    text-shadow: 0 0 5px var(--void), 0 0 10px var(--void), 0 0 15px var(--decay-red), 0 0 25px var(--bruise-purple);
}
.glitch-heavy {
    position: relative; display: inline-block;
    animation: glitch-anim-heavy 1s infinite linear alternate-reverse;
}
.glitch-heavy::before, .glitch-heavy::after {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 0, 0, 0.85);
    overflow: hidden; clip: rect(0, 0, 0, 0); z-index: 1;
}
.glitch-heavy::before { left: 2px; text-shadow: -1px 0 var(--decay-red); animation: glitch-clip1 2s infinite linear alternate-reverse; }
.glitch-heavy::after { left: -2px; text-shadow: 1px 0 var(--vein-blue); animation: glitch-clip2 3s infinite linear alternate-reverse; }


.subtitle {
    font-family: var(--font-handwritten);
    color: var(--static-white); opacity: 0.7; font-size: 1.1em; margin-top: 5px; letter-spacing: 1px;
}
.breathing-text { animation: breath 6s infinite ease-in-out alternate; display: inline-block; }

.header-eye {
    position: absolute; bottom: -25px; right: 10%; width: 50px; height: auto;
    filter: grayscale(50%) brightness(0.8) contrast(120%) blur(0.5px); opacity: 0.7;
    transition: filter 0.5s, opacity 0.5s, transform 0.5s;
}
.header-eye:hover {
    filter: grayscale(0%) brightness(1) contrast(150%) blur(0px); opacity: 1; transform: scale(1.1);
}
.pulsating-element { animation: pulse-red 3s infinite ease-in-out; transform-origin: center center; }

.content-flow { }
.content-block { margin-bottom: 40px; padding: 10px 0; }

.content-block h2 {
    font-family: var(--font-wetpaint);
    color: var(--static-white); opacity: 0.9;
    font-size: clamp(1.8em, 5vw, 2.5em);
    margin-bottom: 20px; text-align: center; letter-spacing: 3px; position: relative;
    text-shadow: 1px 1px 0 var(--void), 0 0 8px var(--decay-red);
    animation: text-twitch 0.5s infinite linear;
}
.marker-symbol {
    color: var(--decay-red); font-size: 0.8em; margin: 0 10px; display: inline-block;
    animation: shake-subtle 5s infinite linear alternate;
    font-family: var(--font-gothic);
}

.content-block p {
    color: #b0b0b0c0;
    font-size: 1.1em; line-height: 1.8; margin-bottom: 15px;
    text-align: justify; hyphens: auto;
    font-family: var(--font-handwritten);
    filter: blur(0.2px);
}
.handwritten-font {
    font-family: var(--font-handwritten);
    font-style: italic; color: #999999b0;
}
.yuji-font { font-family: var(--font-handwritten); color: #a5a5a5b0; }
.font-pixel { font-family: var(--font-pixel); }
.font-wetpaint { font-family: var(--font-wetpaint); }
.font-gothic { font-family: var(--font-gothic); }

.cranberry-red {
    color: var(--infection-yellow);
    font-weight: bold;
    text-shadow: 0 0 4px var(--decay-red), 0 0 8px var(--decay-red), 1px 1px 1px var(--void);
    animation: pulse-red 2.5s infinite ease-in-out;
    display: inline-block;
}
.pulsating-text { animation: pulse-red 2s infinite ease-in-out alternate; }
.intense-pulse { animation: pulse-red-intense 1.5s infinite ease-in-out; }

.server-name {
    color: var(--infection-yellow);
    font-family: var(--font-pixel);
    background-color: var(--flesh-tone-2);
    padding: 0 3px;
    border: 1px dotted var(--decay-red);
    opacity: 0.8;
}

.image-insertion { margin: 30px 0; position: relative; }
.horror-image-wrapper {
    border: 3px solid var(--flesh-tone-1);
    padding: 5px; background: var(--void);
    box-shadow: 0 0 10px var(--bruise-purple);
    display: flex; justify-content: center; align-items: center;
}
.dead-zone-image {
    position: relative;
    width: clamp(200px, 60vw, 400px);
    height: clamp(150px, 45vw, 300px);
    z-index: 14; overflow: hidden;
    border: 5px solid var(--void);
    outline: 2px dashed var(--decay-red); outline-offset: 3px;
    transform: rotate(2deg) scale(0.95);
    animation: intense-shake 2s infinite cubic-bezier(0.17, 0.67, 0.83, 0.67) alternate;
}
@keyframes intense-shake {
    0%, 100% { transform: translate(0, 0) rotate(2deg) scale(0.95); }
    50% { transform: translate(-4px, 2px) rotate(-1deg) scale(0.96); }
}
.image-layer { position: absolute; inset: 0; background-size: cover; background-position: center; }
.glitch-layer-1 {
    background: linear-gradient(var(--vein-blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--infection-yellow) 1px, transparent 1px);
    background-size: 4px 4px; opacity: 0.6; mix-blend-mode: overlay;
    animation: full-screen-glitch 0.1s infinite steps(2, end);
}
@keyframes full-screen-glitch {
    0% { transform: translate(2px, 1px); } 100% { transform: translate(-1px, -2px); }
}
.glitch-layer-2 {
    background: radial-gradient(circle, var(--bruise-purple) 10%, transparent 50%);
    opacity: 0.4; mix-blend-mode: screen;
    animation: flesh-pulse-subtle 1s infinite linear;
}
.image-overlay-text {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-wetpaint);
    color: rgba(255, 255, 255, 0.6); font-size: 1.8em;
    text-shadow: 0 0 5px var(--void), 0 0 10px var(--decay-red);
    pointer-events: none; opacity: 0; transition: opacity 0.5s ease;
    z-index: 15;
}
.image-insertion:hover .image-overlay-text { opacity: 1; }

.ritual-instructions {
    background: var(--flesh-tone-2);
    border-top: 1px solid var(--decay-red); border-bottom: 1px solid var(--decay-red);
    padding: 20px 15px;
    mix-blend-mode: normal; /* Changed from multiply */
    box-shadow: 0 0 8px rgba(176, 164, 61, 0.15); /* Optional subtle glow */
}
.arg-riddle-embedded p {
    font-family: var(--font-pixel);
    font-size: 1em;
    color: #b0b0b0c0; /* Made less dim */
}
.glitchy-secret {
    font-weight: bold; color: var(--infection-yellow);
}
.redacted {
    background-color: var(--void); color: var(--void); user-select: none; padding: 0 2px;
}
.corrupted-code {
    background: var(--void); border: 1px dashed var(--flesh-tone-1); padding: 2px 5px;
    color: #9a9a9a; font-size: 0.9em; word-spacing: -2px; user-select: all; /* Slightly brighter */
    font-family: var(--font-pixel);
}
.hidden-clue-container { text-align: center; margin-top: 15px; }
.hidden-clue {
    display: inline-block; font-size: 0.6em;
    color: #0a0000;
    letter-spacing: 0px; cursor: help; user-select: none; transition: color 0.3s;
}
.hidden-clue::selection { color: var(--infection-yellow); background: var(--decay-red); }

.rotating-symbol-container { text-align: center; margin: 25px 0; }
.rotating-element {
    width: 60px; height: 60px; display: inline-block;
    filter: invert(10%) brightness(0.9) drop-shadow(0 0 3px var(--decay-red));
    animation: spin 15s infinite linear; transition: filter 0.4s, transform 0.4s;
}
.rotating-element:hover {
    filter: invert(0%) brightness(1.2) drop-shadow(0 0 6px var(--infection-yellow));
    animation-play-state: paused; transform: scale(1.2);
}
.endless-spiral-container {
    position: relative;
    margin: 40px auto;
    width: clamp(150px, 30vw, 250px); height: clamp(150px, 30vw, 250px);
    z-index: 12; mix-blend-mode: lighten;
    animation: rotate-erratic var(--glacial) infinite linear reverse,
    shake-subtle var(--medium) infinite linear;
}
.fading-spiral { width: 100%; height: 100%; }
.decaying-svg-text {
    font-family: var(--font-pixel);
    font-size: 5px; fill: var(--static-white);
    opacity: 0.7; animation: text-fade-out 15s infinite linear;
}
.decaying-svg-text textPath { letter-spacing: 2px; }
.path-char { display: inline-block; animation: char-decay 5s infinite linear alternate; }
.path-char:nth-child(1) { animation-delay: 0s; }
.path-char:nth-child(2) { animation-delay: -0.2s; }
.path-char:nth-child(3) { animation-delay: -0.4s; }
.path-char:nth-child(4) { animation-delay: -0.6s; }
.path-char:nth-child(5) { animation-delay: -0.8s; }
.path-char:nth-child(6) { animation-delay: -1.0s; }
.path-char:nth-child(7) { animation-delay: -1.2s; }

.site-footer {
    margin-top: 50px; text-align: center; padding: 20px 10px;
    border-top: 1px solid var(--flesh-tone-2); position: relative;
}
.fading-text {
    color: var(--flesh-tone-1); font-size: 0.9em; letter-spacing: 1px;
    animation: fade-out-slowly 10s infinite alternate ease-in-out;
    font-family: var(--font-handwritten);
}
.cult-link {
    display: inline-block; margin-top: 15px;
    font-family: var(--font-wetpaint);
    color: var(--decay-red); text-decoration: none;
    border: 1px solid var(--bruise-purple); padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5); transition: all 0.4s ease;
    transform: skew(-5deg);
}
.cult-link:hover {
    color: var(--infection-yellow); background: var(--flesh-tone-2);
    border-color: var(--decay-red); text-shadow: 0 0 5px var(--decay-red);
    transform: scale(1.05) skew(-5deg);
}
.footer-decay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(to right, transparent, var(--bruise-purple), var(--decay-red), var(--bruise-purple), transparent);
    filter: blur(3px); opacity: 0.6;
}

.cursor-reactor { position: fixed; inset: 0; z-index: 0; }
.cursor-reactor:hover ~ .main-wrapper {

}
.cursor-reactor:hover ~ .layer.color-bleed {
    opacity: 0.6 !important; filter: blur(10px) !important;
    animation-duration: 2s !important;
}
.cursor-reactor:hover ~ .main-wrapper .glitch-heavy {
    animation-duration: 0.5s !important;
}
.cursor-reactor:hover ~ .main-wrapper .dead-zone-image .glitch-layer-1 {
    opacity: 0.9 !important; animation-duration: 0.05s !important;
}

@media (max-width: 768px) {
    :root {

    }
    .main-wrapper { margin: 5vh 10px; padding: 20px 15px; max-width: 95%; }
    .main-title { font-size: clamp(2em, 7vw, 3.5em); letter-spacing: 3px; }
    .content-block h2 { font-size: clamp(1.5em, 4vw, 2em); }
    .content-block p { font-size: 1em; }
    .dead-zone-image { width: clamp(150px, 80vw, 300px); height: clamp(120px, 60vw, 250px); }
    .endless-spiral-container { width: clamp(120px, 40vw, 200px); height: clamp(120px, 40vw, 200px); }

}
