/* ===== HYPERREAL DESERT MADNESS TRANSFORMATION ===== */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Hyperreal color palette - Impossible saturations */
    --neon-magenta: hsl(320, 100%, 50%);
    --cyber-cyan: hsl(180, 100%, 50%);
    --plasma-orange: hsl(15, 100%, 65%);
    --void-purple: hsl(270, 100%, 30%);
    --electric-yellow: hsl(60, 100%, 75%);
    --blood-red: hsl(0, 100%, 45%);
    --toxic-green: hsl(120, 100%, 40%);
    --chrome-silver: hsl(0, 0%, 75%);
    
    /* Reality distortion effects */
    --glitch-primary: hsl(320, 100%, 50%);
    --glitch-secondary: hsl(180, 100%, 50%);
    --corruption-alpha: 0.8;
    
    /* Dimensional variables */
    --reality-shift: 3px;
    --time-distortion: 0.1s;
    --space-compression: 1.2;
    
    /* Chromatic aberration */
    --chroma-r: 2px;
    --chroma-g: 0px;
    --chroma-b: -2px;
    
    /* Impossible physics */
    --gravity-reverse: -1;
    --dimension-fold: 45deg;
    
    /* Neural overload spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-madness: 5rem;
    
    /* Hyperfont sizes */
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-reality-break: 4rem;
    
    /* Impossible borders */
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-impossible: 50% 10% 50% 10%;
    
    /* Hyperreal shadows */
    --shadow-void: 0 0 20px var(--void-purple);
    --shadow-plasma: 0 0 30px var(--plasma-orange);
    --shadow-impossible: 
        0 0 10px var(--neon-magenta),
        0 0 20px var(--cyber-cyan),
        0 0 40px var(--electric-yellow),
        inset 0 0 10px var(--void-purple);
    
    /* Reality transitions */
    --transition-glitch: 0.05s ease-in-out;
    --transition-fold: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-reality: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Respect reduced motion (if they can handle this madness) */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Courier New', 'Arial Black', monospace;
    font-size: var(--font-size-base);
    line-height: 1.4;
    color: var(--electric-yellow);
    background: 
        radial-gradient(circle at 25% 25%, var(--neon-magenta) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, var(--cyber-cyan) 0%, transparent 50%),
        linear-gradient(135deg, var(--void-purple) 0%, var(--blood-red) 50%, var(--toxic-green) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    animation: reality-pulse 8s ease-in-out infinite;
    cursor: none; /* Custom cursor trail */
}

@keyframes reality-pulse {
    0%, 100% { filter: hue-rotate(0deg) saturate(1) contrast(1); }
    25% { filter: hue-rotate(90deg) saturate(1.5) contrast(1.2); }
    50% { filter: hue-rotate(180deg) saturate(2) contrast(1.5); }
    75% { filter: hue-rotate(270deg) saturate(1.5) contrast(1.2); }
}

/* Hyperreal Canvas Background */
.hyperreal-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    opacity: 0.7;
    filter: blur(0.5px);
    animation: canvas-distort 5s ease-in-out infinite;
}

@keyframes canvas-distort {
    0%, 100% { transform: scale(1) rotate(0deg); filter: blur(0.5px) hue-rotate(0deg); }
    50% { transform: scale(1.02) rotate(0.5deg); filter: blur(1px) hue-rotate(180deg); }
}

/* Parallax Desert Layers */
.desert-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -5;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.parallax-layer {
    position: absolute;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    animation: layer-shift 20s linear infinite;
}

.layer-1 {
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="desert1" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="3" fill="%23ff4500" opacity="0.6"/></pattern></defs><rect width="100" height="100" fill="url(%23desert1)"/></svg>'),
        radial-gradient(ellipse at bottom, var(--plasma-orange) 0%, transparent 70%);
    transform: translateZ(-100px) translateX(-10%);
    opacity: 0.4;
    animation-delay: 0s;
}

.layer-2 {
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            var(--neon-magenta) 10px,
            var(--neon-magenta) 11px
        ),
        radial-gradient(circle at top, var(--cyber-cyan) 0%, transparent 50%);
    transform: translateZ(-50px) translateX(-5%);
    opacity: 0.3;
    animation-delay: -5s;
    filter: blur(2px);
}

.layer-3 {
    background: 
        conic-gradient(from 0deg at 50% 50%, 
            var(--void-purple) 0deg, 
            var(--electric-yellow) 120deg, 
            var(--blood-red) 240deg, 
            var(--void-purple) 360deg);
    transform: translateZ(-150px) translateX(-15%);
    opacity: 0.2;
    animation-delay: -10s;
    filter: blur(3px);
}

@keyframes layer-shift {
    0% { transform: translateX(-10%) translateY(0%) rotateX(0deg); }
    25% { transform: translateX(5%) translateY(-2%) rotateX(1deg); }
    50% { transform: translateX(10%) translateY(0%) rotateX(0deg); }
    75% { transform: translateX(-5%) translateY(2%) rotateX(-1deg); }
    100% { transform: translateX(-10%) translateY(0%) rotateX(0deg); }
}

/* Floating Eyes - They watch everything */
.floating-eye {
    position: absolute;
    font-size: 3rem;
    animation: eye-track 6s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--blood-red));
    cursor: none;
    z-index: 5;
    user-select: none;
    pointer-events: none;
}

.eye-1 {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
    transform: rotate(15deg);
}

.eye-2 {
    top: 70%;
    right: 25%;
    animation-delay: -2s;
    transform: rotate(-20deg);
    font-size: 2.5rem;
}

.eye-3 {
    top: 40%;
    left: 60%;
    animation-delay: -4s;
    transform: rotate(10deg);
    font-size: 3.5rem;
}

@keyframes eye-track {
    0%, 100% { 
        transform: translateX(0) translateY(0) scale(1) rotate(0deg); 
        filter: drop-shadow(0 0 10px var(--blood-red));
    }
    25% { 
        transform: translateX(20px) translateY(-10px) scale(1.1) rotate(5deg); 
        filter: drop-shadow(0 0 15px var(--neon-magenta));
    }
    50% { 
        transform: translateX(-15px) translateY(15px) scale(0.9) rotate(-3deg); 
        filter: drop-shadow(0 0 20px var(--cyber-cyan));
    }
    75% { 
        transform: translateX(10px) translateY(-20px) scale(1.2) rotate(8deg); 
        filter: drop-shadow(0 0 25px var(--electric-yellow));
    }
}

/* Glitch Elements */
.glitch-element {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--glitch-primary), var(--glitch-secondary));
    animation: glitch-chaos 2s infinite;
    opacity: 0.7;
    mix-blend-mode: screen;
}

.glitch-1 {
    top: 25%;
    left: 10%;
    clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 20% 100%);
}

.glitch-2 {
    bottom: 30%;
    right: 15%;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    animation-delay: -1s;
}

@keyframes glitch-chaos {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.7;
        filter: hue-rotate(0deg);
    }
    10% { 
        transform: translate(-5px, 5px) scale(1.1); 
        opacity: 1;
        filter: hue-rotate(90deg);
    }
    20% { 
        transform: translate(10px, -10px) scale(0.9); 
        opacity: 0.5;
        filter: hue-rotate(180deg);
    }
    30% { 
        transform: translate(-8px, 3px) scale(1.2); 
        opacity: 0.8;
        filter: hue-rotate(270deg);
    }
    50% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.3;
        filter: hue-rotate(360deg);
    }
}

/* Impossible Structures */
.impossible-structure {
    position: absolute;
    width: 200px;
    height: 200px;
    background: 
        conic-gradient(from 45deg, 
            var(--chrome-silver) 0deg, 
            var(--void-purple) 90deg, 
            var(--neon-magenta) 180deg, 
            var(--cyber-cyan) 270deg, 
            var(--chrome-silver) 360deg);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: impossible-rotation 8s linear infinite;
    opacity: 0.6;
    filter: blur(1px);
}

.structure-1 {
    top: 10%;
    right: 20%;
}

.structure-2 {
    bottom: 20%;
    left: 30%;
    animation-direction: reverse;
    clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
}

@keyframes impossible-rotation {
    0% { 
        transform: rotate(0deg) perspective(500px) rotateX(0deg) rotateY(0deg); 
    }
    25% { 
        transform: rotate(90deg) perspective(500px) rotateX(45deg) rotateY(45deg); 
    }
    50% { 
        transform: rotate(180deg) perspective(500px) rotateX(90deg) rotateY(90deg); 
    }
    75% { 
        transform: rotate(270deg) perspective(500px) rotateX(135deg) rotateY(135deg); 
    }
    100% { 
        transform: rotate(360deg) perspective(500px) rotateX(180deg) rotateY(180deg); 
    }
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--electric-yellow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: screen;
    transition: none;
    opacity: 0;
}

/* Header - Hyperreal */
.header {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    animation: header-reality-break 10s ease-in-out infinite;
}

@keyframes header-reality-break {
    0%, 100% { 
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg); 
        filter: drop-shadow(0 0 10px var(--electric-yellow));
    }
    25% { 
        transform: perspective(1000px) rotateX(5deg) rotateY(-2deg); 
        filter: drop-shadow(0 0 20px var(--neon-magenta));
    }
    50% { 
        transform: perspective(1000px) rotateX(-3deg) rotateY(3deg); 
        filter: drop-shadow(0 0 30px var(--cyber-cyan));
    }
    75% { 
        transform: perspective(1000px) rotateX(2deg) rotateY(-5deg); 
        filter: drop-shadow(0 0 25px var(--plasma-orange));
    }
}

.header__title {
    font-size: var(--font-size-3xl);
    font-weight: 900;
    color: var(--electric-yellow);
    margin-bottom: var(--space-sm);
    text-shadow: 
        3px 3px 0px var(--blood-red),
        -3px -3px 0px var(--cyber-cyan),
        0 0 20px var(--neon-magenta);
    animation: title-reality-shift 4s ease-in-out infinite;
}

@keyframes title-reality-shift {
    0%, 100% { 
        transform: translateX(0) translateY(0); 
        filter: blur(0px);
    }
    25% { 
        transform: translateX(2px) translateY(-1px); 
        filter: blur(0.5px);
    }
    50% { 
        transform: translateX(-1px) translateY(2px); 
        filter: blur(0px);
    }
    75% { 
        transform: translateX(-2px) translateY(-1px); 
        filter: blur(0.3px);
    }
}


.header__subtitle {
    font-size: var(--font-size-lg);
    color: var(--electric-yellow);
    font-weight: 700;
    margin-bottom: var(--space-md);
    animation: subtitle-flicker 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px var(--neon-magenta);
}

@keyframes subtitle-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
    75% { opacity: 0.9; }
    85% { opacity: 0.7; }
    95% { opacity: 1; }
}

.game-score {
    background: linear-gradient(135deg, var(--toxic-green), var(--electric-yellow));
    color: var(--void-purple);
    padding: var(--space-sm);
    border-radius: var(--border-radius);
    display: inline-block;
    font-weight: bold;
    box-shadow: var(--shadow-plasma);
    border: 3px solid var(--neon-magenta);
    animation: score-pulse 2s ease-in-out infinite;
    text-shadow: 0 0 5px var(--void-purple);
}

@keyframes score-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Main content */
.main {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--space-md) var(--space-xl);
    position: relative;
    z-index: 5;
}

/* Hyperreal Road Runner */
.road-runner {
    position: fixed;
    bottom: 20px;
    right: -100px;
    font-size: 2rem;
    animation: roadrunner-hyperreal 6s linear infinite;
    z-index: 15;
    filter: drop-shadow(0 0 20px var(--electric-yellow));
}

.roadrunner-glitch {
    animation: roadrunner-distort 0.3s ease-in-out infinite;
}

@keyframes roadrunner-hyperreal {
    0% { 
        right: -100px;
        transform: scaleX(1) rotateY(0deg);
    }
    15% { 
        right: 60%;
        transform: scaleX(1) rotateY(0deg);
    }
    25% { 
        right: 50%;
        transform: scaleX(1.5) rotateY(180deg);
    }
    35% { 
        right: 40%;
        transform: scaleX(0.5) rotateY(360deg);
    }
    50% { 
        right: 50%;
        transform: scaleX(-1) rotateY(540deg);
    }
    65% { 
        right: 60%;
        transform: scaleX(-1.2) rotateY(720deg);
    }
    85% { 
        right: -100px;
        transform: scaleX(-1) rotateY(900deg);
    }
    100% { 
        right: -100px;
        transform: scaleX(1) rotateY(1080deg);
    }
}

@keyframes roadrunner-distort {
    0%, 100% { 
        filter: hue-rotate(0deg) saturate(1); 
        text-shadow: 0 0 10px var(--electric-yellow);
    }
    50% { 
        filter: hue-rotate(180deg) saturate(2); 
        text-shadow: 0 0 20px var(--neon-magenta);
    }
}

/* Guest buttons - Disappearing Game */
.guest-buttons {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: var(--space-xl);
    perspective: 1000px;
}

.guest-btn {
    background: 
        linear-gradient(145deg, 
            var(--blood-red) 0%, 
            var(--neon-magenta) 30%, 
            var(--plasma-orange) 60%, 
            var(--electric-yellow) 100%);
    border: 4px solid var(--cyber-cyan);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    font-size: var(--font-size-xl);
    font-weight: 900;
    color: var(--electric-yellow);
    cursor: pointer;
    transition: all var(--transition-reality);
    box-shadow: var(--shadow-impossible);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-shadow: 
        2px 2px 0px var(--void-purple),
        -2px -2px 0px var(--toxic-green),
        0 0 15px var(--electric-yellow);
    font-family: 'Courier New', monospace;
    transform: rotate(-1deg) perspective(500px) rotateX(5deg);
    animation: button-reality-wave 8s ease-in-out infinite;
}

@keyframes button-reality-wave {
    0%, 100% { 
        transform: rotate(-1deg) perspective(500px) rotateX(5deg) rotateY(0deg); 
        filter: hue-rotate(0deg);
    }
    25% { 
        transform: rotate(1deg) perspective(500px) rotateX(-3deg) rotateY(5deg); 
        filter: hue-rotate(90deg);
    }
    50% { 
        transform: rotate(-2deg) perspective(500px) rotateX(2deg) rotateY(-3deg); 
        filter: hue-rotate(180deg);
    }
    75% { 
        transform: rotate(0.5deg) perspective(500px) rotateX(-1deg) rotateY(2deg); 
        filter: hue-rotate(270deg);
    }
}

.guest-btn:nth-child(even) {
    transform: rotate(1deg) perspective(500px) rotateX(-5deg);
    animation-delay: -2s;
}

.guest-btn::before {
    content: '💥';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0;
    transition: all var(--transition-glitch);
    animation: spark-flicker 1s ease-in-out infinite;
}

@keyframes spark-flicker {
    0%, 100% { 
        opacity: 0; 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 5px var(--electric-yellow));
    }
    10% { 
        opacity: 1; 
        transform: scale(1.2) rotate(10deg);
        filter: drop-shadow(0 0 10px var(--neon-magenta));
    }
    20% { 
        opacity: 0.7; 
        transform: scale(0.8) rotate(-5deg);
        filter: drop-shadow(0 0 15px var(--cyber-cyan));
    }
}

.guest-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, 
            transparent, 
            var(--electric-yellow) 30%, 
            var(--neon-magenta) 50%, 
            var(--cyber-cyan) 70%, 
            transparent);
    transition: left var(--transition-fold);
    opacity: 0.8;
    mix-blend-mode: screen;
}

.guest-btn:hover::before,
.guest-btn:focus::before {
    opacity: 1;
    animation: spark-explosion 0.2s ease-out infinite;
}

@keyframes spark-explosion {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.5) rotate(90deg); }
    50% { transform: scale(2) rotate(180deg); }
    75% { transform: scale(1.3) rotate(270deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.guest-btn:hover::after,
.guest-btn:focus::after {
    left: 100%;
}

.guest-btn:hover,
.guest-btn:focus {
    background: 
        radial-gradient(circle at center, 
            var(--electric-yellow) 0%, 
            var(--neon-magenta) 30%, 
            var(--cyber-cyan) 60%, 
            var(--void-purple) 100%);
    color: var(--electric-yellow);
    transform: scale(1.15) rotate(0deg) perspective(500px) rotateX(0deg) rotateY(0deg);
    box-shadow: 
        0 0 30px var(--electric-yellow),
        0 0 60px var(--neon-magenta),
        var(--shadow-void);
    outline: none;
    animation: button-hyperreal-hover 0.3s ease-in-out infinite;
    filter: 
        brightness(1.5) 
        contrast(1.3) 
        hue-rotate(45deg);
}

@keyframes button-hyperreal-hover {
    0%, 100% { 
        transform: scale(1.15) rotate(0deg) translateZ(10px); 
    }
    50% { 
        transform: scale(1.2) rotate(2deg) translateZ(20px); 
    }
}

.guest-btn:active {
    transform: scale(0.9) perspective(500px) rotateX(45deg);
    animation: reality-shatter 0.1s ease-in-out infinite;
}

@keyframes reality-shatter {
    0%, 100% { 
        transform: scale(0.9) translateX(0) translateY(0); 
        filter: blur(0px);
    }
    25% { 
        transform: scale(0.85) translateX(-3px) translateY(2px); 
        filter: blur(1px);
    }
    50% { 
        transform: scale(0.9) translateX(3px) translateY(-2px); 
        filter: blur(0.5px);
    }
    75% { 
        transform: scale(0.88) translateX(-2px) translateY(-1px); 
        filter: blur(0.8px);
    }
}

.guest-btn:focus {
    outline: 4px solid var(--electric-yellow);
    outline-offset: 4px;
    box-shadow: 
        0 0 0 8px var(--neon-magenta),
        0 0 40px var(--electric-yellow),
        var(--shadow-impossible);
}

/* Modal - Hyperreal ACME Contraption */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: hsla(0, 0%, 0%, 0.6);
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fold);
    padding: var(--space-md);
    animation: none;
}

@keyframes overlay-reality-distort {
    0%, 100% { 
        filter: none; 
    }
    50% { 
        filter: none; 
    }
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: 
        linear-gradient(135deg, 
            var(--electric-yellow) 0%, 
            var(--neon-magenta) 25%, 
            var(--cyber-cyan) 50%, 
            var(--void-purple) 75%, 
            var(--chrome-silver) 100%);
    border: 6px solid var(--electric-yellow);
    border-radius: var(--border-radius-impossible);
    box-shadow: var(--shadow-impossible);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: 
        scale(0.5) 
        translateY(100px) 
        rotate(-15deg) 
        perspective(1000px) 
        rotateX(45deg);
    transition: transform var(--transition-fold);
    animation: modal-reality-fold 3s ease-in-out infinite;
}

@keyframes modal-reality-fold {
    0%, 100% { 
        filter: 
            hue-rotate(0deg) 
            brightness(1) 
            contrast(1);
        border-color: var(--electric-yellow);
    }
    25% { 
        filter: 
            hue-rotate(90deg) 
            brightness(1.2) 
            contrast(1.1);
        border-color: var(--neon-magenta);
    }
    50% { 
        filter: 
            hue-rotate(180deg) 
            brightness(1.1) 
            contrast(1.3);
        border-color: var(--cyber-cyan);
    }
    75% { 
        filter: 
            hue-rotate(270deg) 
            brightness(1.3) 
            contrast(1.2);
        border-color: var(--void-purple);
    }
}

.modal-overlay.active .modal {
    transform: 
        scale(1) 
        translateY(0) 
        rotate(0deg) 
        perspective(1000px) 
        rotateX(0deg);
}

.modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: 
        radial-gradient(circle, 
            var(--blood-red) 0%, 
            var(--neon-magenta) 100%);
    border: 3px solid var(--electric-yellow);
    font-size: var(--font-size-2xl);
    color: var(--electric-yellow);
    cursor: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-glitch);
    z-index: 10;
    font-weight: bold;
    animation: close-button-pulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px var(--void-purple);
    box-shadow: var(--shadow-plasma);
}

@keyframes close-button-pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: var(--shadow-plasma);
    }
    50% { 
        transform: scale(1.1) rotate(180deg); 
        box-shadow: var(--shadow-impossible);
    }
}

.modal__close:hover,
.modal__close:focus {
    background: 
        radial-gradient(circle, 
            var(--electric-yellow) 0%, 
            var(--cyber-cyan) 100%);
    color: var(--void-purple);
    transform: rotate(360deg) scale(1.2);
    outline: none;
    animation: close-hyperreal-hover 0.2s ease-in-out infinite;
    box-shadow: 
        0 0 30px var(--electric-yellow),
        var(--shadow-impossible);
}

@keyframes close-hyperreal-hover {
    0%, 100% { transform: rotate(360deg) scale(1.2); }
    50% { transform: rotate(540deg) scale(1.3); }
}

.modal__content {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    text-align: left;
    background: hsla(0, 0%, 0%, 0.85);
    border-radius: var(--border-radius-impossible);
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    color: hsl(0, 0%, 98%);
}

.modal__avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto var(--space-lg);
    overflow: hidden;
    border: 8px solid var(--neon-magenta);
    box-shadow: var(--shadow-impossible);
    transform: rotate(-3deg);
    animation: avatar-reality-shift 6s ease-in-out infinite;
    position: relative;
}

@keyframes avatar-reality-shift {
    0%, 100% { 
        transform: rotate(-3deg) scale(1); 
        filter: hue-rotate(0deg) saturate(1);
        border-color: var(--neon-magenta);
    }
    25% { 
        transform: rotate(2deg) scale(1.05); 
        filter: hue-rotate(90deg) saturate(1.3);
        border-color: var(--cyber-cyan);
    }
    50% { 
        transform: rotate(-1deg) scale(0.95); 
        filter: hue-rotate(180deg) saturate(1.1);
        border-color: var(--electric-yellow);
    }
    75% { 
        transform: rotate(1deg) scale(1.02); 
        filter: hue-rotate(270deg) saturate(1.2);
        border-color: var(--blood-red);
    }
}

.modal__avatar::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: 
        conic-gradient(from 0deg, 
            var(--neon-magenta) 0deg, 
            var(--cyber-cyan) 120deg, 
            var(--electric-yellow) 240deg, 
            var(--neon-magenta) 360deg);
    z-index: -1;
    animation: avatar-glow-rotate 3s linear infinite;
}

@keyframes avatar-glow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: 
        saturate(1.5) 
        contrast(1.2) 
        brightness(1.1);
    animation: image-glitch 0.5s ease-in-out infinite;
}

@keyframes image-glitch {
    0%, 100% { 
        filter: 
            saturate(1.5) 
            contrast(1.2) 
            brightness(1.1) 
            hue-rotate(0deg);
    }
    50% { 
        filter: 
            saturate(2) 
            contrast(1.4) 
            brightness(1.2) 
            hue-rotate(10deg);
    }
}

.modal__avatar .initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    font-weight: 900;
    color: var(--electric-yellow);
    background: 
        radial-gradient(circle, 
            var(--blood-red) 0%, 
            var(--void-purple) 100%);
    text-shadow: 
        0 0 20px var(--neon-magenta),
        2px 2px 0 var(--cyber-cyan);
    animation: initials-reality-pulse 2s ease-in-out infinite;
}

@keyframes initials-reality-pulse {
    0%, 100% { 
        transform: scale(1); 
        text-shadow: 
            0 0 20px var(--neon-magenta),
            2px 2px 0 var(--cyber-cyan);
    }
    50% { 
        transform: scale(1.1); 
        text-shadow: 
            0 0 30px var(--electric-yellow),
            -2px -2px 0 var(--blood-red);
    }
}

.modal__title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: hsl(0, 0%, 98%);
    margin-bottom: var(--space-lg);
    text-shadow: none;
    animation: none;
}

@keyframes title-hyperreal-glitch {
    0%, 100% { 
        transform: translateX(0); 
        filter: blur(0px);
        text-shadow: 
            3px 3px 0px var(--void-purple),
            -3px -3px 0px var(--neon-magenta),
            0 0 30px var(--cyber-cyan);
    }
    10% { 
        transform: translateX(-2px); 
        filter: blur(1px);
        text-shadow: 
            -3px 3px 0px var(--blood-red),
            3px -3px 0px var(--electric-yellow),
            0 0 40px var(--toxic-green);
    }
    20% { 
        transform: translateX(2px); 
        filter: blur(0px);
        text-shadow: 
            3px 3px 0px var(--cyber-cyan),
            -3px -3px 0px var(--plasma-orange),
            0 0 35px var(--neon-magenta);
    }
}

.acme-invitation {
    background: 
        linear-gradient(135deg, 
            var(--electric-yellow) 0%, 
            var(--toxic-green) 50%, 
            var(--neon-magenta) 100%);
    border: 4px solid var(--cyber-cyan);
    border-radius: var(--border-radius-impossible);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    transform: rotate(1deg);
    box-shadow: var(--shadow-impossible);
    animation: invitation-reality-fold 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

@keyframes invitation-reality-fold {
    0%, 100% { 
        transform: rotate(1deg) perspective(500px) rotateX(0deg); 
        filter: hue-rotate(0deg);
    }
    25% { 
        transform: rotate(-0.5deg) perspective(500px) rotateX(5deg); 
        filter: hue-rotate(90deg);
    }
    50% { 
        transform: rotate(0.5deg) perspective(500px) rotateX(-3deg); 
        filter: hue-rotate(180deg);
    }
    75% { 
        transform: rotate(-1deg) perspective(500px) rotateX(2deg); 
        filter: hue-rotate(270deg);
    }
}

.acme-invitation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, 
            transparent, 
            var(--electric-yellow) 20%, 
            var(--neon-magenta) 40%, 
            var(--cyber-cyan) 60%, 
            var(--electric-yellow) 80%, 
            transparent);
    animation: invitation-scan 3s linear infinite;
    opacity: 0.3;
    mix-blend-mode: screen;
}

@keyframes invitation-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.invitation-text {
    font-size: var(--font-size-lg);
    line-height: 1.6;
    color: hsl(0, 0%, 98%);
    font-weight: 600;
    text-align: left;
    text-shadow: none;
    animation: none;
}
}

@keyframes text-reality-flicker {
    0%, 100% { 
        opacity: 1; 
        filter: blur(0px);
    }
    10% { 
        opacity: 0.9; 
        filter: blur(0.5px);
    }
    20% { 
        opacity: 1; 
        filter: blur(0px);
    }
    30% { 
        opacity: 0.95; 
        filter: blur(0.2px);
    }
}

/* Buttons - Hyperreal ACME contraption style */
.btn {
    border: 4px solid var(--electric-yellow);
    border-radius: var(--border-radius-impossible);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-base);
    font-weight: 700;
    cursor: none;
    transition: all var(--transition-reality);
    text-decoration: none;
    display: inline-block;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px currentColor;
    animation: button-ambient-glow 3s ease-in-out infinite;
    box-shadow: 
        0 0 20px currentColor,
        inset 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes button-ambient-glow {
    0%, 100% { 
        box-shadow: 
            0 0 20px currentColor,
            inset 0 0 10px rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 40px currentColor,
            inset 0 0 20px rgba(255, 255, 255, 0.2);
    }
}

.btn--primary {
    background: 
        linear-gradient(135deg, 
            var(--blood-red) 0%, 
            var(--neon-magenta) 100%);
    color: var(--electric-yellow);
    transform: rotate(-1deg);
}

.btn--secondary {
    background: 
        linear-gradient(135deg, 
            var(--cyber-cyan) 0%, 
            var(--void-purple) 100%);
    color: var(--electric-yellow);
    transform: rotate(1deg);
}

.btn:hover,
.btn:focus {
    transform: scale(1.1) rotate(0deg) translateZ(10px);
    outline: none;
    animation: button-hyperreal-interaction 0.3s ease-in-out infinite;
    filter: 
        brightness(1.3) 
        saturate(1.5) 
        hue-rotate(30deg);
    box-shadow: 
        0 0 50px currentColor,
        0 0 100px var(--neon-magenta),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes button-hyperreal-interaction {
    0%, 100% { 
        transform: scale(1.1) rotate(0deg) translateZ(10px); 
    }
    50% { 
        transform: scale(1.15) rotate(1deg) translateZ(15px); 
    }
}

.btn:active {
    transform: scale(0.95) translateZ(-5px);
    animation: button-reality-collapse 0.1s ease-in-out;
}

@keyframes button-reality-collapse {
    0% { transform: scale(0.95) translateZ(-5px); }
    50% { transform: scale(0.9) translateZ(-10px); }
    100% { transform: scale(0.95) translateZ(-5px); }
}

.modal__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

/* Instructions - Hyperreal style */
.instructions {
    margin-top: var(--space-lg);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-fold);
    background: 
        linear-gradient(135deg, 
            hsla(270, 100%, 30%, 0.9) 0%, 
            hsla(320, 100%, 50%, 0.8) 100%);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.instructions.active {
    opacity: 1;
    max-height: 1000px;
    padding: var(--space-lg);
    border: 2px solid var(--electric-yellow);
    box-shadow: var(--shadow-plasma);
}

.instructions__content {
    color: var(--electric-yellow);
    animation: content-reality-flicker 2s ease-in-out infinite;
}

@keyframes content-reality-flicker {
    0%, 100% { opacity: 1; }
    90% { opacity: 0.9; }
    95% { opacity: 1; }
    97% { opacity: 0.95; }
}

.instructions__content h1,
.instructions__content h2,
.instructions__content h3 {
    color: var(--neon-magenta);
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 15px currentColor;
}

.instructions__content p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.instructions__content ol,
.instructions__content ul {
    margin-left: var(--space-md);
    margin-bottom: var(--space-sm);
}

.instructions__content li {
    margin-bottom: var(--space-xs);
}

.instructions__content code {
    background: var(--void-purple);
    color: var(--electric-yellow);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px currentColor;
}

.instructions__content pre {
    background: var(--void-purple);
    color: var(--electric-yellow);
    padding: var(--space-sm);
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: var(--space-sm);
    border: 1px solid var(--neon-magenta);
    box-shadow: 0 0 20px var(--void-purple);
}

/* Utility and accessibility styles */
.error-message {
    background: 
        linear-gradient(135deg, 
            var(--blood-red) 0%, 
            var(--plasma-orange) 100%);
    color: var(--electric-yellow);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    border: 2px solid var(--neon-magenta);
    margin: var(--space-sm) 0;
    text-align: center;
    font-weight: bold;
    animation: error-pulse 1s ease-in-out infinite;
    text-shadow: 0 0 10px var(--void-purple);
}

@keyframes error-pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 20px var(--blood-red);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 0 40px var(--neon-magenta);
    }
}

.focus-trap-start,
.focus-trap-end {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.loading {
    animation: hyperreal-spin 1s linear infinite;
    color: var(--electric-yellow);
    text-shadow: 0 0 20px currentColor;
}

@keyframes hyperreal-spin {
    0% { 
        transform: rotate(0deg) scale(1); 
        filter: hue-rotate(0deg);
    }
    25% { 
        transform: rotate(90deg) scale(1.1); 
        filter: hue-rotate(90deg);
    }
    50% { 
        transform: rotate(180deg) scale(1); 
        filter: hue-rotate(180deg);
    }
    75% { 
        transform: rotate(270deg) scale(0.9); 
        filter: hue-rotate(270deg);
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        filter: hue-rotate(360deg);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --electric-yellow: hsl(60, 100%, 90%);
        --void-purple: hsl(270, 100%, 10%);
        --neon-magenta: hsl(320, 100%, 70%);
        --cyber-cyan: hsl(180, 100%, 70%);
    }
}

/* Print styles */
@media print {
    .desert-scene,
    .floating-eye,
    .glitch-element,
    .impossible-structure,
    .cursor-trail,
    .road-runner {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .modal {
        box-shadow: none;
        border: 2px solid black;
    }
}

/* Reality break animations for maximum madness */
@keyframes reality-break {
    0% { 
        transform: matrix(1, 0, 0, 1, 0, 0); 
        filter: blur(0px) hue-rotate(0deg);
    }
    10% { 
        transform: matrix(1.1, 0.1, -0.1, 1.1, 5, -3); 
        filter: blur(1px) hue-rotate(45deg);
    }
    20% { 
        transform: matrix(0.9, -0.1, 0.1, 0.9, -3, 5); 
        filter: blur(0.5px) hue-rotate(90deg);
    }
    30% { 
        transform: matrix(1.05, 0.05, -0.05, 1.05, 2, -2); 
        filter: blur(0.8px) hue-rotate(135deg);
    }
    40% { 
        transform: matrix(0.95, -0.05, 0.05, 0.95, -2, 2); 
        filter: blur(0.3px) hue-rotate(180deg);
    }
    50% { 
        transform: matrix(1, 0, 0, 1, 0, 0); 
        filter: blur(0px) hue-rotate(225deg);
    }
    60% { 
        transform: matrix(1.02, 0.02, -0.02, 1.02, 1, -1); 
        filter: blur(0.4px) hue-rotate(270deg);
    }
    70% { 
        transform: matrix(0.98, -0.02, 0.02, 0.98, -1, 1); 
        filter: blur(0.6px) hue-rotate(315deg);
    }
    80% { 
        transform: matrix(1.01, 0.01, -0.01, 1.01, 0.5, -0.5); 
        filter: blur(0.2px) hue-rotate(360deg);
    }
    90% { 
        transform: matrix(0.99, -0.01, 0.01, 0.99, -0.5, 0.5); 
        filter: blur(0.1px) hue-rotate(405deg);
    }
    100% { 
        transform: matrix(1, 0, 0, 1, 0, 0); 
        filter: blur(0px) hue-rotate(450deg);
    }
}

/* Apply reality break to the entire page occasionally */
body.reality-break {
    animation: reality-break 0.5s ease-in-out;
}

/* Caught button styles - Permanently accessible invitations */
.guest-btn.caught {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    opacity: 0.8 !important;
    transform: scale(0.9) !important;
    animation: caught-button-glow 3s ease-in-out infinite;
    box-shadow: 
        0 0 20px var(--guest-primary, var(--neon-magenta)),
        inset 0 0 10px var(--guest-secondary, var(--cyber-cyan));
    border: 2px solid var(--guest-primary, var(--electric-yellow)) !important;
}

@keyframes caught-button-glow {
    0%, 100% { 
        box-shadow: 
            0 0 20px var(--guest-primary, var(--neon-magenta)),
            inset 0 0 10px var(--guest-secondary, var(--cyber-cyan));
    }
    50% { 
        box-shadow: 
            0 0 30px var(--guest-primary, var(--neon-magenta)),
            inset 0 0 15px var(--guest-secondary, var(--cyber-cyan)),
            0 0 40px var(--guest-primary, var(--neon-magenta))40;
    }
}

.guest-btn.caught:hover {
    transform: scale(0.95) !important;
    opacity: 1 !important;
}

/* Guest theme support for modals */
.modal {
    --guest-primary: var(--neon-magenta);
    --guest-secondary: var(--cyber-cyan);
}

.modal[style*="--guest-primary"] {
    border-color: var(--guest-primary) !important;
}

.modal[style*="--guest-primary"] .modal__title {
    color: hsl(0, 0%, 98%);
    text-shadow: none;
}

.modal[style*="--guest-primary"] .modal__close {
    border-color: var(--guest-primary);
    color: var(--guest-primary);
}

.modal[style*="--guest-primary"] .modal__close:hover {
    background: 
        radial-gradient(circle, 
            var(--guest-primary) 0%, 
            var(--guest-secondary) 100%);
}

/* Improved initials styling for guest themes */
.modal__avatar .initials {
    color: var(--guest-primary, var(--electric-yellow));
    border-color: var(--guest-secondary, var(--neon-magenta));
}

/* Caught invitations gallery container */
.caught-gallery {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 200px;
}

.caught-gallery .guest-btn {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    margin: 0 !important;
}