:root {
    --acid-green: #00FF00;
    --hot-pink: #FF00FF;
    --cyan: #00FFFF;
    --pure-yellow: #FFFF00;
    --death-black: #000000;
    --win95-gray: #c0c0c0;
    --alert-red: #FF0000;
    
    --font-serif: 'Times New Roman', Times, serif;
    --font-mono: 'Courier New', Courier, monospace;
    --font-display: 'Arial Black', Gadget, sans-serif;
}

* {
    box-sizing: border-box;
    cursor: crosshair;
}

::selection {
    background: var(--hot-pink);
    color: var(--pure-yellow);
}

body {
    background-color: var(--win95-gray);
    background-image: 
        repeating-linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
        repeating-linear-gradient(45deg, #ccc 25%, #f0f0f0 25%, #f0f0f0 75%, #ccc 75%, #ccc);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
    color: black;
    font-family: var(--font-serif);
    margin: 0;
    overflow-x: hidden;
    line-height: 1.2;
    padding-bottom: 0px;
    transition: all 0.5s ease;
}

/* --- UTILITY CHAOS --- */
.messy-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999;
    mix-blend-mode: exclusion;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.1"/%3E%3C/svg%3E');
}

/* FLOATING IMAGES */
.floater {
    position: fixed;
    z-index: 10001; 
    pointer-events: none;
    border: 3px solid var(--hot-pink);
    box-shadow: 5px 5px 0px var(--acid-green);
    mix-blend-mode: normal; 
}

/* --- THE ANTI-NAVBAR --- */
#chaos-nav {
    position: fixed;
    top: 15vh;
    left: 60px;
    width: 160px;
    background: var(--win95-gray);
    border: 3px outset white;
    box-shadow: 8px 8px 0px black;
    z-index: 10000;
    padding: 2px;
}

.nav-header {
    background: linear-gradient(90deg, navy, blue);
    color: white;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 10px;
    padding: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
    border: 1px solid white;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    font-family: var(--font-mono);
    text-decoration: none;
    color: blue;
    font-size: 14px;
    background: white;
    border: 2px inset grey;
    padding: 5px;
    text-align: center;
    transition: all 0.1s;
    cursor: pointer;
    display: block;
    font-weight: bold;
}

.nav-item:hover {
    background: var(--hot-pink);
    color: var(--pure-yellow);
    transform: skewX(-15deg) scale(1.05);
    box-shadow: 5px 5px 0px black;
}

.ca-style {
    background: black;
    color: var(--acid-green);
    border: 3px solid var(--acid-green);
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 10px;
    animation: pulse-border 1s infinite;
}

.ca-style:hover {
    background: var(--acid-green);
    color: black;
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 3px 3px 0px var(--hot-pink);
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
    background-image: url('/images/fkh-background.gif'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 5px dashed var(--hot-pink);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); 
    mix-blend-mode: hard-light;
    z-index: 1;
}

.title-box {
    background: rgba(0,0,0,0.8);
    border: 5px double var(--acid-green);
    padding: 40px;
    z-index: 10;
    transform: rotate(2deg);
    box-shadow: 15px 15px 0px var(--hot-pink);
    max-width: 90%;
    position: relative;
    animation: shake 3s infinite;
}

h1.glitch-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    text-transform: uppercase;
    margin: 0;
    color: white;
    text-shadow: 
        3px 3px 0px var(--alert-red), 
        -3px -3px 0px var(--cyan);
    line-height: 0.85;
}

.sub-mess {
    display: block;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    background: var(--pure-yellow);
    color: black;
    padding: 10px;
    width: 120%;
    margin-left: -10%;
    transform: rotate(-3deg);
    border: 3px solid black;
    font-weight: bold;
}

/* --- CUBE --- */
.cube-wrapper {
    position: absolute;
    right: 10%; bottom: 15%;
    perspective: 600px;
    z-index: 15;
}
.cube { width: 100px; height: 100px; transform-style: preserve-3d; animation: spin-chaos 4s infinite linear; }
.face {
    position: absolute; width: 100px; height: 100px;
    background: rgba(255, 0, 255, 0.5);
    border: 2px solid var(--acid-green);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: bold; color: white;
    font-size: 20px;
}
.f1 { transform: translateZ(50px); } .f2 { transform: rotateY(180deg) translateZ(50px); }
.f3 { transform: rotateY(90deg) translateZ(50px); } .f4 { transform: rotateY(-90deg) translateZ(50px); }
.f5 { transform: rotateX(90deg) translateZ(50px); } .f6 { transform: rotateX(-90deg) translateZ(50px); }
@keyframes spin-chaos { 0% { transform: rotateX(0) rotateY(0); } 100% { transform: rotateX(360deg) rotateY(360deg); } }

/* --- SECTIONS --- */
#lore, #gallery, #market, #cta {
    padding: 100px 40px;
    position: relative;
    color: var(--acid-green);
    background-image: url('/images/fkh-background.gif'); 
    background-repeat: repeat;
    background-size: 150px 150px;
    background-blend-mode: hard-light;
}

#lore {
    background-color: black;
    clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
}

.content-box {
    border: 2px dashed var(--hot-pink);
    padding: 5px;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0,0,0,0.9);
    box-shadow: 10px 10px 0px var(--cyan);
}

.window-header {
    background: var(--hot-pink);
    color: white;
    padding: 5px;
    font-family: var(--font-mono);
    font-weight: bold;
    display: flex; justify-content: space-between;
    border-bottom: 2px solid white;
}

.window-body {
    padding: 30px;
    font-family: var(--font-serif);
    font-size: 1.5rem;
}

/* GALLERY SPECIFIC */
#gallery {
    background-color: #1a1a1a;
    animation: bg-shift 20s infinite linear;
}
@keyframes bg-shift { 0% { background-position: 0 0; } 100% { background-position: 150px 150px; } }

.pile-title {
    background: var(--pure-yellow);
    color: black;
    display: inline-block;
    padding: 15px 60px;
    font-family: var(--font-display);
    font-size: 3rem;
    transform: rotate(3deg);
    border: 5px solid black;
    margin-bottom: 50px;
    box-shadow: 10px 10px 0px var(--hot-pink);
}

.pile-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    gap: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border: 5px solid white;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.8);
    display: block;
}

/* MARKET SPECIFIC */
#market {
    padding: 50px 40px;
    background-color: #0a0a0a;
    border-top: 5px solid var(--acid-green);
    border-bottom: 5px solid var(--acid-green);
}

.market-container {
    max-width: 1000px;
    margin: 0 auto;
    border: 3px solid var(--hot-pink);
    background: black;
    padding: 5px;
    box-shadow: 15px 15px 0px var(--cyan);
    transform: rotate(-1deg);
}

.embed-wrapper { border: 2px solid white; }

/* CTA SPECIFIC */
#cta {
    padding: 100px 40px 200px 40px; 
    background-color: var(--alert-red);
    text-align: center;
    border-top: 20px solid black;
}

.warning-box {
    background: var(--pure-yellow);
    color: red;
    display: inline-block;
    padding: 50px;
    border: 10px dashed black;
    transform: rotate(-1deg);
    animation: shake 5s infinite;
}

.brutal-btn {
    background: white;
    border: 4px solid black;
    padding: 15px 30px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: black;
    margin: 10px;
    cursor: pointer;
    box-shadow: 5px 5px 0px var(--hot-pink);
    transition: 0.1s;
}
.brutal-btn:hover {
    background: var(--hot-pink);
    color: white;
    box-shadow: -5px -5px 0px black;
}

/* --- MARQUEE --- */
.marquee-bar {
    position: fixed;
    font-family: var(--font-mono);
    white-space: nowrap;
    z-index: 9999;
    font-weight: bold;
    font-size: 20px;
    overflow: hidden;
    animation: color-cycle 2s infinite; 
}

.top-fixed { 
    top: 0; left: 0; width: 100%; height: 35px;
    background: var(--hot-pink); color: var(--pure-yellow);
    border-bottom: 2px solid black;
    line-height: 35px;
}

.bottom-fixed { 
    bottom: 0; left: 0; width: 100%; height: 35px;
    background: black; color: var(--acid-green);
    border-top: 2px solid var(--hot-pink);
    line-height: 35px;
}

.left-vert {
    top: 0; left: 0; width: 35px; height: 100vh;
    background: var(--pure-yellow); color: red;
    border-right: 2px solid black;
    writing-mode: vertical-rl; 
    text-orientation: mixed;
    display: flex; align-items: center; justify-content: center;
}

.right-vert {
    top: 0; right: 0; width: 35px; height: 100vh;
    background: var(--cyan); color: black;
    border-left: 2px solid black;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex; align-items: center; justify-content: center;
}

@keyframes color-cycle {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@media (max-width: 768px) {
    .left-vert, .right-vert { display: none; }
    
    #chaos-nav {
        top: auto; bottom: 0; left: 0; width: 100%;
        padding: 5px; box-shadow: 0px -5px 10px rgba(0,0,0,0.5);
        display: flex; flex-direction: column; border: none; border-top: 3px solid white;
    }
    
    .nav-header { display: none; } 
    .nav-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 5px; }
    .nav-item { font-size: 11px; padding: 8px 5px; flex: 1 1 auto; }
    .ca-style { margin-top: 0; flex-basis: 100%; }

    #hero { padding-top: 50px; border-bottom: none; }
    h1.glitch-title { font-size: 3.5rem; }
    .title-box { padding: 15px; width: 95%; max-width: 100%; }
    
    #lore, #gallery, #market, #cta { padding: 50px 10px; }
    
    .pile-container { grid-template-columns: repeat(2, 1fr); }

    .marquee-bar { font-size: 14px; }
    .bottom-fixed { bottom: auto; top: 35px; } 
}

/* =========================================
   MODE: YES / TRIPPY (COLOR SEIZURE)
========================================= */
body.trippy-mode {
    /* No whole page rotation, just color insanity */
    animation: none !important;
}

/* RAPID COLOR SWAP ON EVERYTHING */
body.trippy-mode * {
    animation: seizure-flash 0.1s infinite !important;
    border-style: solid !important;
}

/* Also shake specific containers for extra feeling */
body.trippy-mode .gallery-item, 
body.trippy-mode .content-box,
body.trippy-mode .title-box {
    animation: seizure-flash 0.1s infinite, shake 0.5s infinite !important;
}

@keyframes seizure-flash {
    0% { background-color: var(--hot-pink); color: var(--acid-green); border-color: var(--cyan); }
    25% { background-color: var(--pure-yellow); color: blue; border-color: red; }
    50% { background-color: var(--acid-green); color: black; border-color: var(--hot-pink); }
    75% { background-color: red; color: white; border-color: yellow; }
    100% { background-color: blue; color: var(--pure-yellow); border-color: var(--acid-green); }
}

/* =========================================
   MODE: NO / MINIMALIST (CLEAN)
========================================= */
body.plain-mode {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    padding: 0 !important;
    overflow-y: auto !important;
}

/* Reset all elements to clean style */
body.plain-mode * {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border: none !important;
    transform: none !important;
    animation: none !important;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    mix-blend-mode: normal !important;
    filter: none !important;
    opacity: 1 !important;
    border-radius: 0 !important;
}

/* HIDE CHAOS */
body.plain-mode .messy-layer, 
body.plain-mode .marquee-bar, 
body.plain-mode .floater, 
body.plain-mode .cube-wrapper,
body.plain-mode #spawn-zone,
body.plain-mode #chaos-nav {
    display: none !important;
}

/* LAYOUT FIXES FOR MINIMALIST */
body.plain-mode main {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

body.plain-mode section {
    margin-bottom: 60px !important;
    padding: 0 !important;
    background: white !important;
    border-bottom: 1px solid #ddd !important;
    padding-bottom: 40px !important;
    clip-path: none !important;
}

body.plain-mode h1, 
body.plain-mode h2 {
    text-transform: uppercase !important;
    letter-spacing: -1px !important;
    font-weight: 900 !important;
    margin-bottom: 20px !important;
}

body.plain-mode p {
    font-size: 18px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    max-width: 600px !important;
}

/* Clean up Gallery */
body.plain-mode .pile-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

body.plain-mode .gallery-item img {
    filter: grayscale(100%) !important; /* Black and White images */
    border: 1px solid #eee !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Clean up Buttons */
body.plain-mode button {
    border: 1px solid black !important;
    background: white !important;
    color: black !important;
    padding: 10px 20px !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    margin-right: 10px !important;
}

body.plain-mode button:hover {
    background: black !important;
    color: white !important;
}

/* Clean up Hero */
body.plain-mode #hero {
    min-height: 60vh !important;
    background: white !important;
    border: none !important;
    align-items: flex-start !important;
    justify-content: center !important;
}

body.plain-mode #hero::before { display: none !important; }

body.plain-mode .title-box {
    background: white !important;
    border: none !important;
    padding: 0 !important;
    transform: none !important;
}

body.plain-mode h1.glitch-title {
    color: black !important;
    font-size: 80px !important;
    line-height: 1 !important;
}

body.plain-mode .sub-mess {
    background: white !important;
    color: #666 !important;
    border: none !important;
    font-size: 14px !important;
    margin-top: 20px !important;
    transform: none !important;
    width: auto !important;
    margin-left: 0 !important;
}

/* Responsive clean */
@media (max-width: 768px) {
    body.plain-mode .pile-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    body.plain-mode h1.glitch-title {
        font-size: 40px !important;
    }
}