/* CHAOS CORE */
* {
    box-sizing: border-box;
    cursor: none;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #0f0;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Courier New', sans-serif; /* Worse font mix */
    overflow-x: hidden;
    perspective: 500px; /* Stronger perspective distortion */
    animation: hue-rotate-bg 5s infinite linear; /* Constantly changing colors */
}

@keyframes hue-rotate-bg {
    0% { filter: hue-rotate(0deg) contrast(1.2); }
    100% { filter: hue-rotate(360deg) contrast(1.2); }
}

/* CUSTOM CURSOR - BIGGER AND UGLIER */
.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255,255,0,1) 0%, rgba(255,0,0,1) 100%);
    border: 3px dashed #00f;
    border-radius: 0; /* Square cursor */
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 30px #f00;
    mix-blend-mode: difference; /* Inverts colors behind it */
    animation: spin-cursor 1s infinite linear;
}

@keyframes spin-cursor {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.cursor-follower.active {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
}

/* MATRIX BG */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

/* CONTAINER WITH SKEW */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
}

.skew-layout {
    animation: sway-container 3s infinite ease-in-out;
}

@keyframes sway-container {
    0% { transform: rotateZ(-1deg) scale(0.98); }
    50% { transform: rotateZ(1deg) scale(1.02); }
    100% { transform: rotateZ(-1deg) scale(0.98); }
}

/* HEADERS */
h1.glitch {
    font-size: 5rem;
    text-align: center;
    color: #ff00ff;
    text-shadow: 5px 5px 0px #00ff00;
    animation: glitch-heavy 0.2s infinite;
    transform: rotate(-5deg);
    margin-bottom: 50px;
}

@keyframes glitch-heavy {
    0% { transform: translate(0) skew(0deg); }
    20% { transform: translate(-5px, 5px) skew(10deg); }
    40% { transform: translate(5px, -5px) skew(-10deg); }
    60% { transform: translate(-5px, -5px) skew(5deg); }
    80% { transform: translate(5px, 5px) skew(-5deg); }
    100% { transform: translate(0) skew(0deg); }
}

/* JOKE CARDS - UNCOMFORTABLE STYLING */
.joke-card {
    background: rgba(0, 0, 50, 0.9);
    border: 5px solid #0f0;
    margin-bottom: 60px;
    padding: 30px;
    position: relative;
    box-shadow: 15px 15px 0px #f00, -10px -10px 0px #00f; /* Clashing shadows */
    transition: transform 0.1s;
    font-size: 1.3rem;
    overflow: hidden;
}

.joke-card:nth-child(even) {
    transform: rotate(2deg);
    border-color: #ff00ff;
    background: rgba(50, 0, 0, 0.9);
}

.joke-card:nth-child(odd) {
    transform: rotate(-2deg);
}

.joke-card:hover {
    z-index: 100;
    animation: shake-card 0.5s infinite;
}

@keyframes shake-card {
    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); }
}

.rainbow-border {
    border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) 1;
    animation: border-dance 0.5s infinite linear;
}

@keyframes border-dance {
    0% { border-width: 5px; }
    50% { border-width: 10px; }
    100% { border-width: 5px; }
}

h2 {
    background: yellow;
    color: red;
    display: inline-block;
    padding: 10px 20px;
    transform: rotate(-5deg) scale(1.1);
    margin-top: -50px;
    border: 3px dashed blue;
    box-shadow: 5px 5px 0 #000;
    font-family: 'Impact', sans-serif;
    letter-spacing: 2px;
}

.dialogue {
    margin: 15px 0;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
}

.dialogue:hover {
    color: #fff;
    background: #000;
    transform: scale(1.05);
}

.rating {
    text-align: right;
    font-size: 2rem;
    color: gold;
    text-shadow: 2px 2px red;
    animation: pulse-size 0.5s infinite;
}

@keyframes pulse-size {
    0%, 100% { font-size: 2rem; }
    50% { font-size: 2.5rem; }
}

/* CORNER ANIMATIONS */
.corner {
    position: fixed;
    z-index: 500;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    pointer-events: auto;
}

.top-left { top: 0; left: 0; animation: bounce-corner 2s infinite; }
.top-right { top: 0; right: 0; animation: bounce-corner 2.5s infinite; }
.bottom-left { bottom: 0; left: 0; }
.bottom-right { bottom: 0; right: 0; }

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

/* CUBE (TL) */
.spinning-cube {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 2s infinite linear; /* Faster spin */
}

.face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 0, 0.8);
    border: 5px solid yellow;
    color: blue;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    font-family: 'Arial Black', sans-serif;
}

.front  { transform: translateZ(40px); }
.back   { transform: rotateY(180deg) translateZ(40px); }
.right  { transform: rotateY(90deg) translateZ(40px); }
.left   { transform: rotateY(-90deg) translateZ(40px); }
.top    { transform: rotateX(90deg) translateZ(40px); }
.bottom { transform: rotateX(-90deg) translateZ(40px); }

/* VISITOR COUNTER */
.visitor-counter {
    background: red;
    color: yellow;
    font-size: 1.2rem;
    border: 5px ridge gold;
    padding: 10px;
}
.fast-blink { animation: blink 0.1s infinite; color: white; background: blue; }

/* LOADING */
.loading-zone {
    background: white;
    padding: 10px;
    border: 3px solid black;
    color: black;
}
.wavy-text {
    animation: wave 1s infinite;
}
@keyframes wave {
    0% { transform: translateX(0); }
    25% { transform: translateX(5px) rotate(5deg); }
    50% { transform: translateX(0) rotate(0); }
    75% { transform: translateX(-5px) rotate(-5deg); }
    100% { transform: translateX(0); }
}

/* RUNAWAY BTN */
#runaway-btn {
    font-size: 1.5rem;
    padding: 15px;
    background: linear-gradient(45deg, #f00, #ff0);
    border: 5px dashed #00f;
    color: #000;
    font-weight: 900;
    text-transform: uppercase;
    cursor: none; /* Inherit cursor none */
}

/* FOOTER */
.floating-icons {
    font-size: 40px;
    animation: float-icons 3s infinite ease-in-out;
}
@keyframes float-icons {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* SCROLLBAR - UGLY */
::-webkit-scrollbar { width: 30px; }
::-webkit-scrollbar-track { background: #ff00ff; background-image: linear-gradient(45deg, #ff00ff 25%, #000000 25%, #000000 50%, #ff00ff 50%, #ff00ff 75%, #000000 75%, #000000 100%); background-size: 20px 20px; }
::-webkit-scrollbar-thumb { background: #00ff00; border: 5px solid red; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #ffff00; }
