:root {
    --bg-color: #000000;
    --text-color: #ff0000;
    --accent-color: #8a0000;
    --accent-secondary: #333333;
    --glass-bg: rgba(20, 0, 0, 0.7);
    --glass-border: rgba(255, 0, 0, 0.2);
    --glass-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
    --font-heading: 'Rubik Glitch', system-ui;
    --font-body: 'Special Elite', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair;
    /* Visée pour tirer... */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    filter: contrast(1.2) brightness(0.8);
    cursor: none;
    /* Hide real cursor */
}

/* Cursed Cursor */
.cursed-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: url('https://cdn-icons-png.flaticon.com/512/2919/2919601.png') no-repeat center center;
    /* Spooky eye icon */
    background-size: contain;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    filter: drop-shadow(0 0 5px red);
}

/* BSOD Overlay */
.bsod {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0078d7;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    padding: 100px;
    z-index: 99999;
    font-size: 1.5rem;
    cursor: none;
}

.bsod p:first-child {
    font-size: 8rem;
    margin-bottom: 2rem;
}

.bsod .small {
    font-size: 1rem;
    font-family: monospace;
}

/* CRT & Noise Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 999;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('https://media.giphy.com/media/oEI9uBYSzLpBK/giphy.gif');
    /* Static noise gif placeholder */
    opacity: 0.05;
    z-index: 998;
    pointer-events: none;
}

/* Updated Globes to "Souls" */
.background-globes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 5s infinite ease-in-out alternate;
    /* Faster, erratic */
}

.globe-1 {
    width: 600px;
    height: 600px;
    background: #500000;
    /* Blood red */
    top: -20%;
    left: -20%;
}

.globe-2 {
    width: 500px;
    height: 500px;
    background: #1a1a1a;
    bottom: -10%;
    right: -10%;
    animation-delay: -2s;
}

.globe-3 {
    width: 300px;
    height: 300px;
    background: #ff0000;
    top: 40%;
    left: 40%;
    animation-duration: 0.5s;
    /* Spastic movement */
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(5px, -5px);
    }

    20% {
        transform: translate(-5px, 5px);
    }

    100% {
        transform: translate(20px, 30px);
    }
}

@keyframes flicker {
    0% {
        opacity: 0.9;
    }

    5% {
        opacity: 0.85;
    }

    10% {
        opacity: 0.95;
    }

    15% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.9;
    }
}

/* Layout */
.main-container {
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 2rem;
}

/* Alphabet Navigation Bar */
.alphabet-nav {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    padding: 1rem 2rem;
    overflow-x: auto;
    display: flex;
    align-items: center;
    box-shadow: 0 0 10px var(--accent-color);
    scrollbar-width: none;
}

.nav-track {
    display: flex;
    gap: 1rem;
    margin: 0 auto;
}

.nav-letter {
    color: #666;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.1s steps(2);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 2px 0 #ff0000, -2px 0 #00ffff;
}

.nav-letter:hover {
    color: #fff;
    background: #220000;
    transform: skewX(-20deg);
}

.nav-letter.active {
    color: var(--text-color);
    background: #000;
    font-weight: bold;
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--accent-color);
    animation: shake 0.5s infinite;
}

@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);
    }
}

/* Content Area */
.content-wrapper {
    background: var(--glass-bg);
    border: 2px solid var(--accent-color);
    border-radius: 0;
    /* Sharp edges */
    box-shadow: inset 0 0 50px #000;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    position: relative;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    perspective: 1000px;
    transform-style: preserve-3d;
    filter: sepia(0.5) contrast(1.5) saturate(0.5);
    /* Cursed filter */
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease-out;
    /* Jerky movement */
}

.text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem;
    position: relative;
    z-index: 10;
}

#mainLetter {
    font-family: 'Nosifer', cursive;
    /* Dripping font */
    font-size: 12rem;
    line-height: 1;
    color: #ff0000;
    background: none;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 0 10px #ff0000);
    animation: glitch-text 3s infinite linear alternate-reverse;
}

@keyframes glitch-text {
    0% {
        text-shadow: 2px 2px #000;
        transform: skewX(0);
    }

    20% {
        text-shadow: -2px -2px #000;
        transform: skewX(10deg);
    }

    40% {
        text-shadow: 2px -2px #000;
        transform: skewX(-5deg);
        filter: blur(2px);
    }

    60% {
        text-shadow: -2px 2px #000;
        transform: skewX(0);
        filter: blur(0);
    }

    80% {
        text-shadow: 3px 0 #000;
        transform: skewX(20deg);
    }

    100% {
        text-shadow: -3px 0 #000;
        transform: skewX(0);
    }
}

#mainWord {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 5px;
    margin-top: -1rem;
    margin-left: 1rem;
    color: #fff;
    text-transform: uppercase;
    font-family: 'Rubik Glitch', system-ui;
}

/* Direction Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    border: 2px solid var(--accent-color);
    border-radius: 0;
    width: 60px;
    height: 60px;
    color: var(--accent-color);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s ease;
    z-index: 20;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-color);
}

.prev {
    left: 2rem;
}

.next {
    right: 2rem;
}

/* Responsive */
@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    #mainLetter {
        font-size: 8rem;
    }

    .nav-btn {
        top: auto;
        bottom: 2rem;
        transform: none;
    }

    .prev {
        left: 20%;
    }

    .next {
        right: 20%;
    }
}

/* Animations JS classes */
.fade-in {
    animation: flash 0.2s steps(4) forwards;
    /* Harsh flash instead of fade */
}

@keyframes flash {
    0% {
        opacity: 0;
        filter: invert(1);
    }

    50% {
        opacity: 1;
        filter: invert(0);
    }

    75% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.slide-up {
    animation: twitch 0.5s ease-out forwards;
}

@keyframes twitch {
    0% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

.delay-1 {
    animation-delay: 0.1s;
}

/* Warning Overlay */
.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: auto;
}

.warning-content {
    text-align: center;
    color: red;
    font-family: var(--font-heading);
    max-width: 600px;
    padding: 2rem;
    border: 2px solid red;
    box-shadow: 0 0 50px red;
    background: #110000;
}

.warning-content h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: shake 2s infinite;
}

.warning-content p {
    font-family: var(--font-body);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #fff;
}

#enterBtn {
    background: #300;
    color: red;
    border: 1px solid red;
    padding: 1rem 3rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

#enterBtn:hover {
    background: red;
    color: black;
    box-shadow: 0 0 20px red;
}

/* Idle Horror Effect */
.idle-zoom {
    transition: transform 10s ease-in !important;
    transform: scale(2) rotate(5deg) !important;
    filter: brightness(0.7) contrast(1.5) !important;
}

body.idle-mode .scanlines {
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(255, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
}