/* ============================================
   SOUL OBSERVATORY - Immersive Long Page Portal
   Ironhill (Breathing) + Stripe Tacit (Order)
   ============================================ */

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

:root {
    /* Surface World (Bright Museum Mode - Pure White) */
    --surface-bg: #FFFFFF;
    --surface-bg-alt: #FAFAFA;
    --surface-text: #0A0A0A;
    --surface-text-light: #333333;
    --surface-grid: rgba(0, 0, 0, 0.04);
    --surface-card-bg: rgba(255, 255, 255, 0.95);
    --surface-card-border: rgba(0, 0, 0, 0.08);
    --surface-accent: #1A1A1A;
    
    /* Upside World (Dark Weird Mode) */
    --upside-bg: #0A0A0F;
    --upside-bg-alt: #151520;
    --upside-text: #FF0044;
    --upside-text-light: #FF4488;
    --upside-grid: rgba(0, 255, 65, 0.15);
    --upside-card-bg: rgba(0, 255, 65, 0.05);
    --upside-card-border: rgba(0, 255, 65, 0.3);
    --upside-accent: #00FF41;
    
    /* Aura Effect (Mouse Follow) */
    --mx: 50%;
    --my: 50%;
    
    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 8rem 2rem;
    --card-gap: 2rem;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--surface-text);
    background-color: #FFFFFF;
    overflow-x: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
}

body.surface-world {
    background-color: #FFFFFF;
    color: var(--surface-text);
}

/* ============================================
   Scroll Snap - One Screen Per Section
   ============================================ */

.main {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-text-light) transparent;
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}

/* 主世界：禁用 CSS scroll-snap，使用 JS 控制（更流畅） */
body.surface-world .main {
    scroll-snap-type: none;
}

/* 里世界：启用 CSS scroll-snap */
body.upside-world .main {
    scroll-snap-type: y mandatory;
}

.main::-webkit-scrollbar {
    width: 8px;
}

.main::-webkit-scrollbar-track {
    background: transparent;
}

.main::-webkit-scrollbar-thumb {
    background: var(--surface-text-light);
    border-radius: 4px;
}

.section {
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--section-padding);
}

/* ============================================
   Real Mist Background (The River Scene)
   ============================================ */

.real-mist-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.mist-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('river-scene.jpg'); /* 用户需要将图片放在项目根目录 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px) saturate(80%) brightness(1.1);
    transition: filter 0.3s ease;
    will-change: filter;
    opacity: 0.4;
}

/* Film Grain (胶片噪点) */
.film-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Floating Mist Layers (动态薄雾) */
.floating-mist {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mist-layer {
    position: absolute;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    filter: blur(60px);
    opacity: 0.6;
}

.mist-layer-1 {
    animation: mist-drift-1 25s ease-in-out infinite;
    top: -10%;
    left: -10%;
}

.mist-layer-2 {
    animation: mist-drift-2 30s ease-in-out infinite;
    top: -10%;
    left: -10%;
    animation-delay: -10s;
}

.mist-layer-3 {
    animation: mist-drift-3 35s ease-in-out infinite;
    top: -10%;
    left: -10%;
    animation-delay: -20s;
}

@keyframes mist-drift-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(5%, -3%) scale(1.05);
        opacity: 0.7;
    }
    66% {
        transform: translate(-3%, 5%) scale(0.95);
        opacity: 0.5;
    }
}

@keyframes mist-drift-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-5%, 3%) scale(1.1);
        opacity: 0.7;
    }
}

@keyframes mist-drift-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(3%, -5%) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translate(-3%, 5%) scale(1.05);
        opacity: 0.5;
    }
}

/* Clouds (云朵效果) */
.clouds-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.surface-world .clouds-container {
    opacity: 1;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    filter: blur(40px);
    opacity: 0.7;
    animation: cloud-drift linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    filter: blur(30px);
}

.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud::after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 10px;
}

/* 不同大小的云朵 */
.cloud-small {
    width: 80px;
    height: 40px;
    animation-duration: 40s;
}

.cloud-medium {
    width: 120px;
    height: 60px;
    animation-duration: 50s;
}

.cloud-large {
    width: 180px;
    height: 90px;
    animation-duration: 60s;
}

.cloud-extra-large {
    width: 240px;
    height: 120px;
    animation-duration: 70s;
}

@keyframes cloud-drift {
    0% {
        transform: translateX(-200px) translateY(0);
        opacity: 0.5;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(calc(100vw + 200px)) translateY(-50px);
        opacity: 0.5;
    }
}

/* 不同高度的云朵 */
.cloud-layer-1 {
    top: 10%;
    animation-delay: 0s;
}

.cloud-layer-2 {
    top: 25%;
    animation-delay: -10s;
}

.cloud-layer-3 {
    top: 40%;
    animation-delay: -20s;
}

.cloud-layer-4 {
    top: 55%;
    animation-delay: -30s;
}

.cloud-layer-5 {
    top: 70%;
    animation-delay: -15s;
}

.cloud-layer-6 {
    top: 85%;
    animation-delay: -25s;
}

/* Blood Drops Effect (里世界血滴) */
.blood-drops {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.upside-world .blood-drops {
    opacity: 1;
}

.blood-drop {
    position: absolute;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.9) 0%, rgba(178, 34, 34, 0.7) 50%, rgba(220, 20, 60, 0.5) 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    animation: blood-drop-fall linear infinite;
    opacity: 0.8;
    box-shadow: 
        0 0 10px rgba(139, 0, 0, 0.6),
        0 0 20px rgba(178, 34, 34, 0.4),
        inset 0 0 5px rgba(220, 20, 60, 0.3);
}

.blood-drop::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    background: radial-gradient(circle, rgba(220, 20, 60, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: blood-drop-glow 2s ease-in-out infinite;
}

.blood-drop::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(139, 0, 0, 0.8) 0%, transparent 100%);
    border-radius: 0 0 2px 2px;
    animation: blood-trail 1.5s ease-in-out infinite;
}

/* 不同大小的血滴 */
.blood-drop-small {
    width: 4px;
    height: 4px;
    animation-duration: 3s;
}

.blood-drop-medium {
    width: 6px;
    height: 6px;
    animation-duration: 4s;
}

.blood-drop-large {
    width: 8px;
    height: 8px;
    animation-duration: 5s;
}

.blood-drop-extra-large {
    width: 12px;
    height: 12px;
    animation-duration: 6s;
}

/* 不同速度 */
.blood-drop-fast {
    animation-duration: 2.5s;
}

.blood-drop-slow {
    animation-duration: 7s;
}

@keyframes blood-drop-fall {
    0% {
        transform: translateY(-20px) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 20px)) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes blood-drop-glow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes blood-trail {
    0% {
        height: 15px;
        opacity: 0.8;
    }
    50% {
        height: 25px;
        opacity: 0.6;
    }
    100% {
        height: 15px;
        opacity: 0.8;
    }
}

/* 血滴溅射效果 */
.blood-splash {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: blood-splash 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes blood-splash {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Flashlight Focus Effect (手电筒对焦) */
.flashlight-focus {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.5) 90%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease;
    mix-blend-mode: multiply;
    z-index: 0;
}

.flashlight-focus.active {
    opacity: 1;
}

/* ============================================
   Water Droplets Effect (Car Window Style)
   ============================================ */

.water-droplets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.droplet {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(200, 220, 240, 0.6);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    animation: droplet-fall linear infinite;
    opacity: 0.7;
}

.droplet::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 7px;
    height: 7px;
    background: rgba(200, 220, 240, 0.3);
    border-radius: 50%;
    animation: droplet-glow 2s ease-in-out infinite;
}

.droplet::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1px;
    height: 8px;
    background: rgba(200, 220, 240, 0.4);
    border-radius: 2px;
    animation: droplet-trail 1s ease-out infinite;
}

@keyframes droplet-fall {
    0% {
        transform: translateY(-10px) translateX(0) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(calc(100vh + 20px)) translateX(20px) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes droplet-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes droplet-trail {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 8px;
        opacity: 0.4;
    }
    100% {
        height: 12px;
        opacity: 0;
    }
}

.droplet-large {
    width: 5px;
    height: 5px;
    animation-duration: 8s;
}

.droplet-small {
    width: 2px;
    height: 2px;
    animation-duration: 12s;
}

.droplet-fast {
    animation-duration: 6s;
}

.droplet-slow {
    animation-duration: 15s;
}

/* Upside World Water Droplets */
body.upside-world .water-droplets {
    opacity: 0.3;
}

body.upside-world .droplet {
    background: rgba(255, 180, 50, 0.5);
}

body.upside-world .droplet::before {
    background: rgba(255, 140, 0, 0.3);
}

body.upside-world .droplet::after {
    background: rgba(255, 200, 100, 0.4);
}

/* ============================================
   VHS Effects (Subtle in Surface, Stronger in Upside)
   ============================================ */

.vhs-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: vhs-flicker 0.2s infinite;
}

.vhs-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    pointer-events: none;
    z-index: 9999;
    background: linear-gradient(to bottom, transparent, rgba(26, 26, 26, 0.05), transparent);
    animation: vhs-scan 10s linear infinite;
    opacity: 0.3;
}

@keyframes vhs-flicker {
    0%, 100% { opacity: 0.02; }
    50% { opacity: 0.04; }
}

@keyframes vhs-scan {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(100vh); }
}

/* ============================================
   Grid Background (Stripe Order)
   ============================================ */

.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--surface-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--surface-grid) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
    transition: background-image 0.15s ease, opacity 0.15s ease;
    opacity: 0.1;
}

body.surface-world .grid-background {
    opacity: 0.15;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* ============================================
   Aura Background (Mouse Follow - Ironhill Breathing)
   ============================================ */

.aura-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(
        circle 800px at var(--mx) var(--my),
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 30%,
        transparent 70%
    );
    transition: background 0.3s ease;
    opacity: 0.3;
}

/* ============================================
   Bokeh Light Effects (Upside World)
   ============================================ */

.bokeh-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.upside-world .bokeh-lights {
    opacity: 1;
}

.bokeh-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: bokeh-float 20s ease-in-out infinite;
}

@keyframes bokeh-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, 20px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(20px, 30px) scale(1.1);
        opacity: 0.5;
    }
}

/* ============================================
   Dramatic Lighting (Upside World)
   ============================================ */

.dramatic-lighting {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: 
        radial-gradient(
            ellipse 1200px 800px at 85% 75%,
            rgba(255, 140, 0, 0.4) 0%,
            rgba(255, 180, 50, 0.3) 20%,
            rgba(255, 200, 100, 0.2) 40%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 800px 600px at 20% 40%,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(200, 200, 220, 0.1) 30%,
            transparent 60%
        ),
        radial-gradient(
            ellipse 600px 400px at 60% 30%,
            rgba(150, 150, 200, 0.1) 0%,
            transparent 50%
        );
    animation: lighting-pulse 8s ease-in-out infinite;
}

body.upside-world .dramatic-lighting {
    opacity: 1;
}

@keyframes lighting-pulse {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.1);
    }
}

/* ============================================
   Cinematic Void Aura Effects (Upside World)
   ============================================ */

.cinematic-void {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

body.upside-world .cinematic-void {
    opacity: 1;
}

.aura-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    will-change: transform, opacity;
}

.aura-orange {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.4) 0%, rgba(255, 69, 0, 0.2) 40%, transparent 70%);
    top: 20%;
    left: 15%;
}

.aura-cyan {
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.35) 0%, rgba(0, 242, 255, 0.15) 40%, transparent 70%);
    top: 60%;
    right: 10%;
}

.aura-orange-secondary {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.3) 0%, rgba(255, 69, 0, 0.1) 50%, transparent 80%);
    bottom: 10%;
    left: 50%;
}

/* Motion Blur Overlay */
.motion-blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9997;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent;
    mix-blend-mode: screen;
}

body.upside-world .motion-blur-overlay {
    opacity: 0;
}

body.upside-world .motion-blur-overlay.active {
    opacity: 0.6;
    background: 
        radial-gradient(circle 200px at var(--mx) var(--my), 
            rgba(255, 69, 0, 0.3) 0%, 
            rgba(0, 242, 255, 0.2) 50%, 
            transparent 100%);
    filter: blur(20px);
}

/* ============================================
   Upside World Styles (The Cinematic Void)
   ============================================ */

body.upside-world {
    background-color: #000000;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Strong Contrast: Surface World vs Upside World */
body.surface-world {
    background-color: #FFFFFF !important;
    color: var(--surface-text) !important;
}

body.upside-world {
    background-color: #000000 !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

body.upside-world .real-mist-background,
body.upside-world .landscape-background,
body.upside-world .grid-background,
body.upside-world .vhs-noise,
body.upside-world .vhs-scanline,
body.upside-world .aura-background {
    opacity: 0 !important;
    display: none;
}

/* Surface World: Ensure white background is visible */
body.surface-world .real-mist-background {
    opacity: 1;
    background: #FFFFFF; /* 确保背景是纯白 */
}

body.surface-world .mist-image {
    opacity: 0; /* 隐藏原始图片，只保留白色背景 */
    display: none;
}

body.surface-world .floating-mist {
    opacity: 1;
}

/* 增强薄雾层 - 白色薄雾 */
body.surface-world .mist-layer {
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 30%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.25) 30%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 40%, transparent 70%);
    filter: blur(80px);
    opacity: 0.8;
}

body.surface-world .film-grain {
    opacity: 0.15;
    mix-blend-mode: overlay;
}

/* 添加额外的薄雾覆盖层 */
body.surface-world::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 45%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
    animation: mist-float-gentle 40s ease-in-out infinite alternate;
}

@keyframes mist-float-gentle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(30px, -20px) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translate(-20px, 15px) scale(0.98);
        opacity: 0.7;
    }
}


/* Fragmented Layout - Remove Grid */
body.upside-world .section {
    display: block !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    min-height: auto !important;
}

body.upside-world .section-inner {
    max-width: none !important;
    width: 100% !important;
    padding: 8rem 4rem;
    position: relative;
}

/* Technical Minimalism Typography */
body.upside-world .section-title,
body.upside-world .hero-title {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 3rem);
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    text-shadow: 
        0 0 30px rgba(255, 69, 0, 0.4),
        0 0 60px rgba(0, 242, 255, 0.3);
    position: absolute;
    z-index: 10;
    mix-blend-mode: screen;
    will-change: transform;
}

body.upside-world .hero-title {
    top: 8rem;
    left: 4rem;
    font-size: clamp(2rem, 5vw, 5rem);
    writing-mode: horizontal-tb;
    transform: rotate(-2deg);
}

body.upside-world .section-title {
    font-size: clamp(1rem, 2vw, 1.8rem);
    top: 2rem;
    left: 2rem;
    transform: rotate(1deg);
}

body.upside-world .hero-subtitle,
body.upside-world .section-desc {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    max-width: 300px;
    text-align: right;
    mix-blend-mode: screen;
}

/* Fragmented Cards - Asymmetric Distribution */
body.upside-world .cards-grid,
body.upside-world .archivesCards,
body.upside-world #archivesCards {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 4rem 2rem !important;
    position: relative;
    min-height: 400vh; /* 增加高度，容纳更多卡片 */
}

body.upside-world .card {
    position: absolute !important;
    width: auto !important;
    min-width: 200px;
    max-width: 400px;
    border: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    mix-blend-mode: screen;
    will-change: transform;
    transition: all 0.3s ease;
    z-index: 1;
}

/* 重新分布卡片位置，避免重叠 - 增加间距 */
body.upside-world .card:nth-child(1) {
    top: 8vh;
    left: 2%;
    width: 280px;
    transform: rotate(-3deg);
}

body.upside-world .card:nth-child(2) {
    top: 6vh;
    right: 3%;
    width: 240px;
    transform: rotate(2deg);
}

body.upside-world .card:nth-child(3) {
    top: 25vh;
    left: 10%;
    width: 300px;
    transform: rotate(-1deg);
}

body.upside-world .card:nth-child(4) {
    top: 22vh;
    right: 6%;
    width: 260px;
    transform: rotate(4deg);
}

body.upside-world .card:nth-child(5) {
    top: 42vh;
    left: 3%;
    width: 270px;
    transform: rotate(-2deg);
}

body.upside-world .card:nth-child(6) {
    top: 38vh;
    right: 12%;
    width: 290px;
    transform: rotate(1deg);
}

body.upside-world .card:nth-child(7) {
    top: 58vh;
    left: 18%;
    width: 220px;
    transform: rotate(-4deg);
}

body.upside-world .card:nth-child(8) {
    top: 54vh;
    right: 2%;
    width: 320px;
    transform: rotate(3deg);
}

body.upside-world .card:nth-child(9) {
    top: 75vh;
    left: 6%;
    width: 250px;
    transform: rotate(-1deg);
}

body.upside-world .card:nth-child(10) {
    top: 70vh;
    right: 10%;
    width: 280px;
    transform: rotate(2deg);
}

body.upside-world .card:nth-child(11) {
    top: 92vh;
    left: 15%;
    width: 300px;
    transform: rotate(-3deg);
}

body.upside-world .card:nth-child(12) {
    top: 86vh;
    right: 4%;
    width: 230px;
    transform: rotate(4deg);
}

body.upside-world .card:nth-child(13) {
    top: 108vh;
    left: 2%;
    width: 310px;
    transform: rotate(-2deg);
}

body.upside-world .card:nth-child(14) {
    top: 102vh;
    right: 15%;
    width: 250px;
    transform: rotate(1deg);
}

body.upside-world .card:nth-child(15) {
    top: 125vh;
    left: 12%;
    width: 270px;
    transform: rotate(-4deg);
}

body.upside-world .card:nth-child(16) {
    top: 118vh;
    right: 2%;
    width: 290px;
    transform: rotate(3deg);
}

body.upside-world .card:nth-child(17) {
    top: 142vh;
    left: 5%;
    width: 240px;
    transform: rotate(-1deg);
}

body.upside-world .card:nth-child(18) {
    top: 134vh;
    right: 8%;
    width: 300px;
    transform: rotate(2deg);
}

body.upside-world .card:nth-child(19) {
    top: 158vh;
    left: 20%;
    width: 260px;
    transform: rotate(-3deg);
}

body.upside-world .card:nth-child(20) {
    top: 150vh;
    right: 3%;
    width: 280px;
    transform: rotate(4deg);
}

/* 更多卡片使用动态分布，增加垂直间距 */
body.upside-world .card:nth-child(n+21) {
    top: calc(175vh + (var(--card-index, 0) * 30vh));
    left: calc(3% + (var(--card-index, 0) * 10%));
    width: calc(220px + (var(--card-index, 0) * 15px));
    transform: rotate(calc(var(--card-index, 0) * 1.2deg - 2deg));
}

body.upside-world .card-title {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
}

body.upside-world .card-desc {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

body.upside-world .card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 
        0 0 40px rgba(255, 69, 0, 0.4),
        0 0 80px rgba(0, 242, 255, 0.3),
        inset 0 0 20px rgba(255, 69, 0, 0.1);
    transform: scale(1.05) rotate(var(--rotation, 0deg)) !important;
}

body.upside-world .main::-webkit-scrollbar-thumb {
    background: rgba(255, 180, 50, 0.3);
}

body.upside-world .main {
    scrollbar-color: rgba(255, 180, 50, 0.3) transparent;
}

/* Console in Upside World */
body.upside-world .console-frame {
    background: rgba(10, 10, 15, 0.92);
    border-color: rgba(255, 180, 50, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 140, 0, 0.1),
        inset 0 0 30px rgba(255, 180, 50, 0.05);
}

body.upside-world .console-header {
    background: rgba(10, 10, 15, 0.95);
    border-bottom-color: rgba(255, 180, 50, 0.2);
}

body.upside-world .console-title {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 10px rgba(255, 180, 50, 0.3);
}

body.upside-world .console-body {
    background: rgba(10, 10, 15, 0.95);
}

body.upside-world .console-btn {
    border-color: rgba(255, 180, 50, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

body.upside-world .console-btn:hover {
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 180, 50, 0.5);
    box-shadow: 0 0 10px rgba(255, 180, 50, 0.2);
}

body.upside-world .search-input {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 180, 50, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

body.upside-world .search-input:focus {
    border-color: rgba(255, 180, 50, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
    background: rgba(0, 0, 0, 0.5);
}

body.upside-world .search-input::placeholder {
    color: rgba(255, 180, 50, 0.4);
}

body.upside-world .search-btn {
    background: rgba(255, 140, 0, 0.8);
    color: rgba(255, 255, 255, 0.95);
}

body.upside-world .search-btn:hover {
    background: rgba(255, 160, 0, 0.9);
    box-shadow: 
        0 0 15px rgba(255, 140, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

body.upside-world .message {
    background: rgba(255, 140, 0, 0.08);
    border-left-color: rgba(255, 180, 50, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

body.upside-world .message.system {
    background: rgba(255, 180, 50, 0.1);
    border-left-color: rgba(255, 200, 100, 0.6);
    color: rgba(255, 255, 255, 0.85);
}

body.upside-world .message.user {
    background: rgba(255, 140, 0, 0.12);
    border-left-color: rgba(255, 180, 50, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Symmetry Glitch (Upside World + Hover)
   ============================================ */

body.upside-world .section-inner {
    transform: scaleX(-1);
}

body.upside-world .section-inner > * {
    transform: scaleX(-1);
}

.symmetry-glitch {
    position: relative;
}

.symmetry-glitch:hover {
    animation: chromatic-aberration 0.12s ease;
}

@keyframes chromatic-aberration {
    0%, 100% {
        filter: hue-rotate(0deg);
        transform: translate(0);
    }
    25% {
        filter: hue-rotate(90deg);
        transform: translate(-1px, 1px);
    }
    50% {
        filter: hue-rotate(180deg);
        transform: translate(1px, -1px);
    }
    75% {
        filter: hue-rotate(270deg);
        transform: translate(-1px, -1px);
    }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: transparent;
    position: relative;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 4rem 3rem !important;
}

.hero-inner {
    max-width: none;
    width: auto;
    text-align: left;
    z-index: 10;
    position: relative;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.hero-kicker {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--surface-text-light);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.95;
    color: var(--surface-text);
    margin-bottom: 2rem;
    letter-spacing: 0.15em;
    text-shadow: none;
    mix-blend-mode: normal;
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 60%;
}

body.surface-world .hero-title {
    filter: blur(0.5px); /* Hero 标题轻微模糊 */
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(255, 255, 255, 0.3); /* 白色光晕效果 */
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 300;
    color: var(--surface-text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
    text-align: left;
    text-shadow: none;
    line-height: 1.8;
    letter-spacing: 0.05em;
}

body.surface-world .hero-subtitle {
    filter: blur(0.4px); /* 副标题模糊 */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.hero-link-minimal {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--surface-text);
    text-decoration: none;
    border-bottom: 1px solid var(--surface-text-light);
    padding-bottom: 0.25rem;
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

.hero-link-minimal:hover {
    border-bottom-color: var(--surface-text);
    color: var(--surface-text);
    padding-bottom: 0.35rem;
}

.hero-coords {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--surface-text-light);
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.hero-coords::before {
    content: '•';
    width: 4px;
    height: 4px;
    background: var(--surface-text-light);
    border-radius: 50%;
    display: inline-block;
    opacity: 0.5;
}

body.upside-world .hero-link {
    border-color: rgba(255, 180, 50, 0.6);
    background: rgba(255, 140, 0, 0.15);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 10px rgba(255, 180, 50, 0.3);
}

body.upside-world .hero-link:hover {
    background: rgba(255, 140, 0, 0.25);
    border-color: rgba(255, 200, 100, 0.8);
    box-shadow: 
        0 4px 20px rgba(255, 140, 0, 0.3),
        0 0 30px rgba(255, 180, 50, 0.2);
}

/* ============================================
   Section Styles
   ============================================ */

.section-inner {
    max-width: 1200px;
    width: 100%;
    z-index: 10;
}

.section-head {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--surface-text);
    margin-bottom: 1rem;
}

body.surface-world .section-title {
    filter: blur(0.4px); /* Section 标题模糊 */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

body.surface-world .section-desc {
    filter: blur(0.3px); /* Section 描述模糊 */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.section-desc {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 300;
    color: var(--surface-text-light);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.8;
}

/* ============================================
   Cards Grid
   ============================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--card-gap);
    margin-top: 3rem;
}

.card {
    background: var(--surface-card-bg);
    border: 1px solid var(--surface-card-border);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(26, 26, 26, 0.12);
    border-color: var(--surface-text);
}

.card:hover::before {
    opacity: 1;
}

body.upside-world .card:hover {
    animation: card-glitch 0.12s ease;
}

@keyframes card-glitch {
    0%, 100% { transform: translateY(-8px) translate(0); }
    25% { transform: translateY(-8px) translate(-1px, 1px); }
    50% { transform: translateY(-8px) translate(1px, -1px); }
    75% { transform: translateY(-8px) translate(-1px, -1px); }
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--surface-text);
    margin-bottom: 0.75rem;
}

body.surface-world .card-title {
    filter: blur(0.3px); /* 文字轻微模糊 */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* 添加白色光晕 */
}

.card-desc {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--surface-text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

body.surface-world .card-desc {
    filter: blur(0.4px); /* 描述文字稍微更模糊 */
}

.card-meta {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--surface-text-light);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-shadow {
    border-color: var(--upside-card-border);
    background: var(--upside-card-bg);
}

/* ============================================
   Stage Frame Effect (For Results/Rare Cards)
   ============================================ */

.stage-frame {
    position: relative;
    border: 2px solid var(--surface-text);
    padding: 1rem;
    animation: stage-lights 2s infinite;
}

.stage-frame::before,
.stage-frame::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--surface-accent);
    border-radius: 50%;
    animation: stage-dot 1.5s infinite;
}

.stage-frame::before {
    top: -4px;
    left: -4px;
}

.stage-frame::after {
    bottom: -4px;
    right: -4px;
}

@keyframes stage-lights {
    0%, 100% {
        box-shadow: 0 0 10px rgba(45, 80, 22, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(45, 80, 22, 0.6);
    }
}

@keyframes stage-dot {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

body.upside-world .stage-frame {
    border-color: var(--upside-accent);
    animation: stage-lights-upside 2s infinite;
}

body.upside-world .stage-frame::before,
body.upside-world .stage-frame::after {
    background: var(--upside-accent);
}

@keyframes stage-lights-upside {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    }
}

/* ============================================
   Quiz Lab Styles
   ============================================ */

.quiz-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--surface-card-bg);
    border: 1px solid var(--surface-card-border);
}

.quiz-progress {
    margin-bottom: 2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--surface-text-light);
}

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--surface-text);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--surface-card-border);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--surface-text);
    background: rgba(26, 26, 26, 0.05);
}

.quiz-option.selected {
    border-color: var(--surface-accent);
    background: rgba(45, 80, 22, 0.1);
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.quiz-btn {
    padding: 0.75rem 2rem;
    background: var(--surface-text);
    color: var(--surface-bg);
    border: none;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.quiz-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   Card Room Styles
   ============================================ */

.card-room-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.draw-btn {
    padding: 1rem 2rem;
    background: var(--surface-text);
    color: var(--surface-bg);
    border: none;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.draw-btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.card-room-area {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    min-height: 300px;
    align-items: flex-start;
}

/* Card Slot Styles */
.card-slot {
    position: relative;
    width: 200px;
    height: 280px;
    border: 2px solid var(--surface-card-border);
    background: var(--surface-card-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.card-slot.is-empty {
    background: rgba(255, 255, 255, 0.05);
    border-style: dashed;
    cursor: default;
}

.card-slot.has-card {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
}

.card-slot.card-back {
    background: linear-gradient(135deg, rgba(240, 240, 245, 0.8) 0%, rgba(230, 230, 235, 0.8) 100%);
    border-color: rgba(200, 200, 210, 0.5);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

body.surface-world .card-slot.card-back {
    background: linear-gradient(135deg, rgba(245, 245, 250, 1) 0%, rgba(235, 235, 240, 1) 100%);
    border-color: rgba(180, 180, 190, 0.6);
}

.card-slot.card-back:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.2),
        inset 0 0 30px rgba(150, 150, 170, 0.3);
}

.card-slot.card-revealed {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.12);
}

body.surface-world .card-slot.card-revealed {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    filter: blur(0.4px); /* 卡牌模糊 */
}

body.surface-world .card-slot.card-revealed:hover {
    filter: blur(0.2px); /* hover 时稍微清晰 */
    background: rgba(255, 255, 255, 0.9);
}

.card-slot.card-revealed:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--surface-accent);
}

.card-slot.showing-details {
    z-index: 100;
    transform: scale(1.1);
}

.card-slot.is-empty .qmark {
    display: block;
}

.card-slot.card-back .qmark {
    display: block;
    font-size: 3rem;
    opacity: 0.6;
}

.card-slot.card-revealed .qmark {
    display: none;
}

.qmark {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 300;
    color: var(--surface-text-light);
    opacity: 0.3;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tarot-img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.tarot-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--surface-text);
    text-align: center;
    padding: 0.5rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid var(--surface-card-border);
}


/* Tarot Meaning Modal */
.tarot-meaning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tarot-meaning-modal.active {
    display: flex;
    pointer-events: auto;
}

.tarot-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tarot-meaning-modal.active .tarot-modal-overlay {
    opacity: 1;
}

.tarot-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 1);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.08);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.surface-world .tarot-modal-content {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    filter: blur(0.2px); /* 弹窗轻微模糊 */
}

.tarot-meaning-modal.active .tarot-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.tarot-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--surface-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.tarot-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--surface-text);
    transform: rotate(90deg);
}

.tarot-modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface-card-border);
}

.tarot-modal-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--surface-text);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.tarot-modal-position {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--surface-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.tarot-modal-core {
    margin-bottom: 2rem;
}

.tarot-modal-core p {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--surface-text);
    line-height: 1.8;
    margin: 0;
    font-style: italic;
}

.tarot-modal-keywords {
    margin-top: 1.5rem;
}

.tarot-keywords-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--surface-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.tarot-keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tarot-keyword-tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--surface-text);
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--surface-card-border);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.tarot-keyword-tag:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--surface-accent);
    transform: translateY(-2px);
}

/* Upside World Modal Styles */
body.upside-world .tarot-modal-content {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid rgba(255, 69, 0, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 69, 0, 0.2);
}

body.upside-world .tarot-modal-title {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.4);
}

body.upside-world .tarot-modal-position {
    background: rgba(255, 69, 0, 0.2);
    color: rgba(255, 69, 0, 0.9);
    border: 1px solid rgba(255, 69, 0, 0.3);
}

body.upside-world .tarot-modal-core p {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

body.upside-world .tarot-keyword-tag {
    background: rgba(255, 69, 0, 0.1);
    border-color: rgba(255, 69, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

body.upside-world .tarot-keyword-tag:hover {
    background: rgba(255, 69, 0, 0.2);
    border-color: rgba(255, 69, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.3);
}

body.upside-world .tarot-modal-close {
    color: rgba(255, 69, 0, 0.8);
}

body.upside-world .tarot-modal-close:hover {
    background: rgba(255, 69, 0, 0.1);
    color: rgba(255, 69, 0, 1);
}

/* Upside World Card Slot Styles */
body.upside-world .card-slot {
    border-color: rgba(255, 69, 0, 0.3);
    background: rgba(255, 255, 255, 0.03);
}

body.upside-world .card-slot.is-empty {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 69, 0, 0.2);
}

body.upside-world .qmark {
    color: rgba(255, 69, 0, 0.4);
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.3);
}

body.upside-world .tarot-label {
    background: rgba(255, 69, 0, 0.1);
    border-top-color: rgba(255, 69, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

body.upside-world .card-slot.card-back:hover {
    box-shadow: 
        0 0 30px rgba(255, 69, 0, 0.3),
        inset 0 0 30px rgba(255, 69, 0, 0.2);
    border-color: rgba(255, 69, 0, 0.5);
}

body.upside-world .card-slot.card-revealed:hover {
    box-shadow: 
        0 0 40px rgba(255, 69, 0, 0.4),
        0 0 80px rgba(0, 242, 255, 0.3);
    border-color: rgba(255, 69, 0, 0.6);
}


body.upside-world .card-slot.card-revealed::after {
    background: rgba(255, 69, 0, 0.8);
}

.drawn-card {
    width: 200px;
    height: 280px;
    background: var(--surface-card-bg);
    border: 2px solid var(--surface-card-border);
    border-radius: 8px;
    position: relative;
    cursor: grab;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.drawn-card.flipped {
    transform: rotateY(180deg);
}

.drawn-card.dragging {
    cursor: grabbing;
    z-index: 1000;
    transform: scale(1.1);
}

.drawn-card-front,
.drawn-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    text-align: center;
}

.drawn-card-back {
    transform: rotateY(180deg);
    background: var(--surface-text);
    color: var(--surface-bg);
}

.drawn-card-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: var(--surface-bg);
    padding: 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.drawn-card.show-hidden .drawn-card-hidden {
    opacity: 1;
    pointer-events: auto;
}

body.upside-world .drawn-card:hover {
    animation: card-glitch 0.12s ease;
}

/* ============================================
   Gesture Playground
   ============================================ */

.gesture-demo {
    max-width: 600px;
    margin: 0 auto;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gesture-card {
    width: 300px;
    height: 200px;
    background: var(--surface-card-bg);
    border: 2px solid var(--surface-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: transform 0.2s ease;
    user-select: none;
}

.gesture-card.dragging {
    cursor: grabbing;
    transform: scale(1.1);
}

.gesture-card p {
    font-family: var(--font-sans);
    color: var(--surface-text-light);
}

/* ============================================
   Shadow Sanctuary (Hidden in Surface)
   ============================================ */

.shadow-sanctuary {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

body.upside-world .shadow-sanctuary {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   About Section
   ============================================ */

.about {
    background: #FFFFFF;
}

body.surface-world .about {
    background: #FFFFFF;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--surface-text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    min-height: 30vh;
    background: var(--surface-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-inner {
    text-align: center;
    max-width: 800px;
}

.footer-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--surface-text);
    margin-bottom: 1rem;
}

.footer-disclaimer {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--surface-text-light);
    opacity: 0.6;
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Fixed Controls
   ============================================ */

.lang-toggle {
    position: fixed;
    top: 2rem;
    left: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--surface-text);
    color: var(--surface-text);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    z-index: 10000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* 里世界：语言切换按钮位置调整 */
body.upside-world .lang-toggle {
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 69, 0, 0.5);
    color: rgba(255, 69, 0, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.3);
}

body.upside-world .lang-toggle:hover {
    background: rgba(255, 69, 0, 0.2);
    border-color: rgba(255, 69, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.lang-toggle.interference {
    animation: interference 0.2s;
}

@keyframes interference {
    0%, 100% { filter: brightness(1); }
    25% { filter: brightness(1.5) contrast(1.2); }
    50% { filter: brightness(0.5) contrast(0.8); }
    75% { filter: brightness(1.2) contrast(1.1); }
}

.toggle-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* 里世界：切换开关容器位置调整 */
body.upside-world .toggle-container {
    top: 1.5rem;
    right: 1.5rem;
    gap: 1rem;
}

.toggle-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--surface-text);
    opacity: 0.8;
}

/* 里世界：切换标签样式 */
body.upside-world .toggle-label {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: rgba(255, 69, 0, 0.8);
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
    opacity: 0.9;
}

.toggle-switch {
    width: 80px;
    height: 40px;
    background: rgba(200, 50, 50, 0.2);
    border: 2px solid #C83232;
    border-radius: 20px;
    position: relative;
    cursor: grab;
    transition: all 0.3s ease;
}

/* 里世界：切换开关样式 */
body.upside-world .toggle-switch {
    background: rgba(255, 69, 0, 0.2);
    border: 2px solid rgba(255, 69, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.3);
}

body.upside-world .toggle-switch.active {
    background: rgba(255, 69, 0, 0.4);
    border-color: rgba(255, 69, 0, 0.9);
    box-shadow: 0 0 25px rgba(255, 69, 0, 0.5);
}

body.upside-world .toggle-handle {
    background: rgba(255, 69, 0, 0.9);
    box-shadow: 
        0 0 15px rgba(255, 69, 0, 0.6),
        0 0 30px rgba(255, 69, 0, 0.3);
}

.toggle-switch:active {
    cursor: grabbing;
}

.toggle-switch.active {
    background: rgba(200, 50, 50, 0.5);
}

.toggle-handle {
    width: 32px;
    height: 32px;
    background: #C83232;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active .toggle-handle {
    transform: translateX(40px);
}

/* ============================================
   Console (Miao Miao)
   ============================================ */

.console {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    font-family: var(--font-sans);
}

.console-frame {
    width: 450px;
    max-width: calc(100vw - 4rem);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: none;
    backdrop-filter: blur(20px);
    position: relative;
}

body.surface-world .console-frame {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    filter: blur(0.3px); /* 控制台轻微模糊 */
}

.console-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(200, 190, 170, 0.4) 50%,
        transparent 100%
    );
    pointer-events: none;
}

.console-frame.is-open {
    display: block;
    animation: console-appear 0.3s ease;
}

@keyframes console-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.console-header {
    background: rgba(255, 255, 255, 1);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

body.surface-world .console-header {
    background: rgba(255, 255, 255, 1);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.console-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(200, 190, 170, 0.3) 20%,
        rgba(200, 190, 170, 0.3) 80%,
        transparent 100%
    );
}

.console-title {
    font-size: 0.95rem;
    color: var(--surface-text);
    font-weight: 600;
    letter-spacing: 0.05em;
    font-family: var(--font-serif);
}

.console-sub {
    opacity: 0.5;
    margin-left: 0.5rem;
    font-size: 0.85rem;
    font-weight: 400;
}

.console-actions {
    display: flex;
    gap: 0.5rem;
}

.console-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid rgba(26, 26, 26, 0.2);
    color: var(--surface-text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.console-btn:hover {
    background: rgba(26, 26, 26, 0.08);
    border-color: rgba(26, 26, 26, 0.3);
    color: var(--surface-text);
}

.console-body {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 1);
    max-height: 500px;
    overflow-y: auto;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.surface-world .console-body {
    background: rgba(255, 255, 255, 1);
    border-top-color: rgba(0, 0, 0, 0.1);
}

.console-body::-webkit-scrollbar {
    width: 6px;
}

.console-body::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.05);
    border-radius: 3px;
}

.console-body::-webkit-scrollbar-thumb {
    background: rgba(26, 26, 26, 0.2);
    border-radius: 3px;
}

.console-body::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 26, 26, 0.3);
}

.console-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(26, 26, 26, 0.2);
    color: var(--surface-text);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--surface-accent);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.search-input::placeholder {
    color: rgba(26, 26, 26, 0.4);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--surface-text);
    color: rgba(255, 255, 255, 0.95);
    border: none;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    text-transform: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.search-btn:hover {
    background: var(--surface-text-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.15);
}

.console-output {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
}

.console-output::-webkit-scrollbar {
    width: 6px;
}

.console-output::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.05);
    border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb {
    background: rgba(26, 26, 26, 0.2);
    border-radius: 3px;
}

.message {
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
    background: rgba(26, 26, 26, 0.04);
    border-left: 3px solid var(--surface-accent);
    color: var(--surface-text);
    word-wrap: break-word;
    border-radius: 0 6px 6px 0;
    font-family: var(--font-sans);
}

.message.system {
    background: rgba(45, 80, 22, 0.08);
    border-left-color: var(--surface-accent);
    color: var(--surface-text);
}

.message.user {
    background: rgba(26, 26, 26, 0.06);
    border-left-color: rgba(26, 26, 26, 0.3);
    color: var(--surface-text);
}

.message a {
    color: var(--surface-accent);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.message a:hover {
    color: var(--surface-text);
    text-decoration: none;
}

body.upside-world .message a {
    color: var(--upside-accent);
}

body.upside-world .message a:hover {
    color: var(--upside-text);
}

.message.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================
   Nosebleed Effect (Visual Symbol #1)
   ============================================ */

.console-nosebleed {
    position: absolute;
    bottom: 0;
    right: 20px;
    width: 2px;
    height: 0;
    background: #FF6B6B;
    opacity: 0;
    transition: height 0.5s ease, opacity 0.3s ease;
}

.console-nosebleed.active {
    opacity: 1;
    height: 30px;
    animation: nosebleed-drip 2s infinite;
}

@keyframes nosebleed-drip {
    0% {
        height: 30px;
        opacity: 1;
    }
    50% {
        height: 35px;
        opacity: 0.8;
    }
    100% {
        height: 30px;
        opacity: 1;
    }
}

.console-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #C83232;
    border: 2px solid #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.console-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.console-fab-dot {
    width: 8px;
    height: 8px;
    background: #00FF41;
    border-radius: 50%;
    margin-bottom: 0.25rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.console-fab.is-hidden {
    display: none;
}

/* 里世界：控制台浮动按钮位置和样式调整 */
body.upside-world .console-fab {
    background: rgba(255, 69, 0, 0.3);
    border: 2px solid rgba(255, 69, 0, 0.6);
    box-shadow: 
        0 0 20px rgba(255, 69, 0, 0.4),
        inset 0 0 20px rgba(255, 69, 0, 0.2);
    bottom: 1.5rem;
    right: 1.5rem;
}

body.upside-world .console-fab:hover {
    background: rgba(255, 69, 0, 0.5);
    border-color: rgba(255, 69, 0, 0.9);
    box-shadow: 
        0 0 30px rgba(255, 69, 0, 0.6),
        inset 0 0 30px rgba(255, 69, 0, 0.3);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1.5rem;
        --card-gap: 1.5rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .console-frame {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 1rem;
    }
    
    .toggle-container {
        top: 1rem;
        right: 1rem;
    }
    
    .lang-toggle {
        top: 1rem;
        left: 1rem;
    }
    
    .hero-title {
        font-size: clamp(3rem, 15vw, 6rem);
    }
}
