/* ═══════════════════════════════════════════════════════════════════════════
   KRIMINIS v11.0 - COMPLETE STYLESHEET
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLES & ROOT
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Primary Colors */
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-green: #00ff88;
    --neon-red: #ff0044;
    --neon-gold: #ffd700;
    --neon-orange: #ff6600;
    --neon-purple: #9933ff;
    --neon-blue: #0088ff;
    
    /* Background Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(20, 20, 30, 0.8);
    --bg-glass: rgba(10, 10, 15, 0.85);
    
    /* Text Colors */
    --text-light: #ffffff;
    --text-muted: #888899;
    --text-dark: #0a0a0f;
    
    /* Gradients */
    --gradient-cyber: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    --gradient-fire: linear-gradient(135deg, var(--neon-orange), var(--neon-red));
    --gradient-matrix: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    --gradient-royal: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    --gradient-gold: linear-gradient(135deg, var(--neon-gold), var(--neon-orange));
    
    /* Shadows */
    --shadow-glow-cyan: 0 0 20px rgba(0, 255, 255, 0.3);
    --shadow-glow-magenta: 0 0 20px rgba(255, 0, 255, 0.3);
    --shadow-glow-green: 0 0 20px rgba(0, 255, 136, 0.3);
    --shadow-glow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
    
    /* Spacing */
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 40px;
    --space-xl: 60px;
    --space-xxl: 100px;
    
    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 25px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index Layers */
    --z-background: -1;
    --z-default: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-terminal: 400;
    --z-notification: 500;
    --z-tooltip: 600;
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-horror: 'Creepster', cursive;
}

/* Dark Narrative Mode Variables */
.dark-narrative-mode {
    --bg-primary: #050508;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #0f0f15;
    --neon-cyan: #00cccc;
    --neon-magenta: #cc00cc;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--neon-magenta);
    text-shadow: var(--shadow-glow-magenta);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-cyber);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* Selection */
::selection {
    background: var(--neon-cyan);
    color: var(--bg-primary);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACKGROUND EFFECTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Cyber Grid */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: var(--z-background);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Film Grain */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-notification);
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grain 0.5s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

body.no-grain .film-grain { display: none; }

/* CRT Scanlines */
.crt-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-notification);
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
}

body.no-crt .crt-scanlines { display: none; }

/* CRT Flicker */
.crt-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-notification);
    animation: flicker 0.15s infinite;
    opacity: 0;
}

@keyframes flicker {
    0% { opacity: 0.03; }
    5% { opacity: 0.01; }
    10% { opacity: 0.02; }
    15% { opacity: 0; }
    20% { opacity: 0.03; }
    100% { opacity: 0; }
}

body.no-crt .crt-flicker { display: none; }

/* Ambient Orbs */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: var(--z-background);
    animation: orbFloat 15s ease-in-out infinite;
}

.ambient-orb.cyan {
    width: 400px;
    height: 400px;
    background: var(--neon-cyan);
    opacity: 0.08;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.ambient-orb.magenta {
    width: 350px;
    height: 350px;
    background: var(--neon-magenta);
    opacity: 0.08;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.ambient-orb.green {
    width: 300px;
    height: 300px;
    background: var(--neon-green);
    opacity: 0.06;
    bottom: 20%;
    left: 30%;
    animation-delay: -10s;
}

.ambient-orb.gold {
    width: 250px;
    height: 250px;
    background: var(--neon-gold);
    opacity: 0.05;
    top: 40%;
    right: 30%;
    animation-delay: -7s;
}

.ambient-orb.purple {
    width: 280px;
    height: 280px;
    background: var(--neon-purple);
    opacity: 0.06;
    bottom: 40%;
    left: 60%;
    animation-delay: -3s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

body.no-animations .ambient-orb { animation: none; }

/* Dark Narrative Mode - Additional Effects */
.dark-narrative-mode .vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-notification);
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
}

.rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-notification);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cline x1='10' y1='0' x2='5' y2='100' stroke='rgba(150,200,255,0.1)' stroke-width='0.5'/%3E%3Cline x1='30' y1='0' x2='25' y2='100' stroke='rgba(150,200,255,0.1)' stroke-width='0.5'/%3E%3Cline x1='50' y1='0' x2='45' y2='100' stroke='rgba(150,200,255,0.1)' stroke-width='0.5'/%3E%3Cline x1='70' y1='0' x2='65' y2='100' stroke='rgba(150,200,255,0.1)' stroke-width='0.5'/%3E%3Cline x1='90' y1='0' x2='85' y2='100' stroke='rgba(150,200,255,0.1)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    animation: rain 0.5s linear infinite;
    opacity: 0;
    transition: opacity 0.5s;
}

.dark-narrative-mode .rain-overlay {
    opacity: 1;
}

@keyframes rain {
    0% { background-position: 0 0; }
    100% { background-position: -10px 100px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    z-index: var(--z-sticky);
    transition: var(--transition-normal);
}

.nav.scrolled {
    height: 60px;
    background: rgba(10, 10, 15, 0.95);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    letter-spacing: 2px;
}

.logo:hover {
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-md);
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.nav-links a:hover {
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
    text-shadow: var(--shadow-glow-cyan);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Streak Badge */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.2), rgba(255, 50, 0, 0.2));
    border: 1px solid var(--neon-orange);
    border-radius: var(--radius-xl);
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--neon-orange);
    animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 100, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 100, 0, 0.5); }
}

/* User Profile Button */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px 5px 5px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    color: var(--text-light);
    transition: var(--transition-normal);
}

.user-profile-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--gradient-cyber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.user-profile-btn span {
    font-family: var(--font-display);
    font-size: 0.75rem;
}

/* Settings Toggle */
.settings-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.settings-toggle:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    transform: rotate(45deg);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: var(--z-dropdown);
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUAKE TERMINAL
   ═══════════════════════════════════════════════════════════════════════════ */
.quake-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: rgba(5, 5, 10, 0.98);
    border-bottom: 2px solid var(--neon-green);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-terminal);
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 30px rgba(0, 255, 136, 0.2);
}

.quake-terminal.open {
    transform: translateY(0);
}

.quake-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

.quake-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-green);
    letter-spacing: 2px;
}

.quake-stats {
    display: flex;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quake-stats span {
    color: var(--neon-cyan);
}

.quake-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.quake-body .terminal-line {
    margin-bottom: 5px;
}

.quake-input-line {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    gap: 10px;
}

.input-prompt {
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 1rem;
}

.quake-input-wrapper {
    flex: 1;
    position: relative;
}

.quake-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    caret-color: var(--neon-green);
}

.quake-input::placeholder {
    color: rgba(0, 255, 136, 0.3);
}

.quake-pull-tab {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--neon-green);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
    transition: var(--transition-normal);
}

.quake-pull-tab:hover {
    background: rgba(0, 255, 136, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xxl) var(--space-lg);
    position: relative;
    overflow: hidden;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    letter-spacing: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: var(--radius-full);
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--neon-green); }
    50% { opacity: 0.5; box-shadow: 0 0 15px var(--neon-green); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    letter-spacing: 10px;
    margin-bottom: var(--space-md);
    position: relative;
}

.glitch-text {
    position: relative;
    display: inline-block;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glitch 3s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch-text::before {
    animation: glitchTop 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch-text::after {
    animation: glitchBottom 3s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

@keyframes glitchTop {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(3px, 0); }
    94% { transform: translate(-3px, 0); }
    96% { transform: translate(3px, 0); }
    98% { transform: translate(-3px, 0); }
}

@keyframes glitchBottom {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-3px, 0); }
    94% { transform: translate(3px, 0); }
    96% { transform: translate(-3px, 0); }
    98% { transform: translate(3px, 0); }
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 5px;
    margin-bottom: var(--space-md);
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: var(--space-xl);
}

.hero-tagline span {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* CTA Buttons */
.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.btn {
    padding: 15px 30px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-cyber);
    color: var(--bg-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-cyan), var(--shadow-glow-magenta);
}

.btn-outline {
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
}

.btn-outline:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-cyan);
}

.btn-gold {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    border: none;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-gold);
}

.btn-danger {
    background: var(--gradient-fire);
    color: var(--text-light);
    border: none;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.4);
}

.btn-purple {
    background: var(--gradient-royal);
    color: var(--text-light);
}

.btn-purple:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(153, 51, 255, 0.4);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 3px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS BASE
   ═══════════════════════════════════════════════════════════════════════════ */
.section {
    padding: var(--space-xxl) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.category-card {
    position: relative;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
    overflow: hidden;
    display: block;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-cyber);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: var(--shadow-glow-cyan);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition-normal);
    z-index: 2;
}

.favorite-btn:hover,
.favorite-btn.active {
    background: rgba(255, 0, 102, 0.2);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.category-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-light);
}

.category-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.category-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEORY CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.theories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
}

.theory-card {
    position: relative;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
    display: block;
}

.theory-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 255, 0.3);
    box-shadow: var(--shadow-glow-magenta);
}

.theory-tag {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: var(--radius-xl);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-magenta);
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.theory-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-light);
}

.theory-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.theory-example {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--neon-cyan);
}

.theory-example-icon {
    font-size: 2rem;
}

.theory-example-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 3px;
}

.theory-example-media {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILER SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.profiler-container {
    max-width: 700px;
    margin: 0 auto;
}

.profiler-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-glow-gold);
}

.profiler-progress {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.progress-step {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-gold);
    white-space: nowrap;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.profiler-question {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.profiler-question h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
    color: var(--text-light);
}

.profiler-question p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profiler-options {
    display: grid;
    gap: var(--space-md);
}

.profiler-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.profiler-option:hover {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.05);
}

.profiler-option.selected {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.15);
    box-shadow: var(--shadow-glow-gold);
}

.profiler-option-icon {
    font-size: 1.5rem;
}

.profiler-option-text {
    font-size: 0.95rem;
    color: var(--text-light);
}

.profiler-result {
    display: none;
    text-align: center;
    padding: var(--space-lg);
}

.result-avatar {
    font-size: 5rem;
    margin-bottom: var(--space-md);
}

.result-type {
    font-family: var(--font-display);
    font-size: 1.5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.result-description {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

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

.trait-badge {
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--neon-gold);
    border-radius: var(--radius-xl);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-gold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEXUS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.nexus-section {
    background: linear-gradient(180deg, transparent, rgba(0, 255, 255, 0.02), transparent);
}

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

.nexus-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: var(--transition-normal);
}

.nexus-tab:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.nexus-tab.active {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

.tab-icon {
    font-size: 1.2rem;
}

.nexus-mode-content {
    min-height: 500px;
}

.nexus-mode-content.hidden {
    display: none;
}

/* Nexus Controls */
.nexus-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.nexus-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.nexus-filter {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    transition: var(--transition-normal);
}

.nexus-filter:hover,
.nexus-filter.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.nexus-stats {
    display: flex;
    gap: var(--space-lg);
}

.nexus-stat {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nexus-stat strong {
    color: var(--neon-cyan);
}

/* Nexus Board */
.nexus-wrapper {
    display: flex;
    gap: var(--space-lg);
}

.nexus-container {
    flex: 1;
    position: relative;
    height: 600px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.nexus-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at center, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.nexus-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.nexus-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Nexus Nodes */
.nexus-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: 2;
}

.nexus-node[data-x="5"] { left: 5%; }
.nexus-node[data-x="15"] { left: 15%; }
.nexus-node[data-x="20"] { left: 20%; }
.nexus-node[data-x="35"] { left: 35%; }
.nexus-node[data-x="50"] { left: 50%; }
.nexus-node[data-x="65"] { left: 65%; }
.nexus-node[data-x="80"] { left: 80%; }
.nexus-node[data-x="85"] { left: 85%; }
.nexus-node[data-x="95"] { left: 95%; }

.nexus-node[data-y="5"] { top: 5%; }
.nexus-node[data-y="20"] { top: 20%; }
.nexus-node[data-y="25"] { top: 25%; }
.nexus-node[data-y="35"] { top: 35%; }
.nexus-node[data-y="40"] { top: 40%; }
.nexus-node[data-y="50"] { top: 50%; }
.nexus-node[data-y="55"] { top: 55%; }
.nexus-node[data-y="70"] { top: 70%; }
.nexus-node[data-y="80"] { top: 80%; }
.nexus-node[data-y="95"] { top: 95%; }

.nexus-node:hover {
    transform: scale(1.15);
    z-index: 5;
}

.nexus-node.selected {
    transform: scale(1.2);
    z-index: 10;
}

.node-ring {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius-full);
    opacity: 0;
    animation: nodeRing 2s ease-out infinite;
}

.nexus-node:hover .node-ring,
.nexus-node.selected .node-ring {
    opacity: 1;
}

@keyframes nodeRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.node-circle {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.char-node .node-circle {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.theory-node .node-circle {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
    width: 60px;
    height: 60px;
}

.nexus-node:hover .node-circle,
.nexus-node.selected .node-circle {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.1);
}

.node-label {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
    text-shadow: 0 0 10px var(--bg-primary);
}

.nexus-node:hover .node-label,
.nexus-node.selected .node-label {
    color: var(--neon-cyan);
}

.node-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    animation: nodePulse 3s ease-out infinite;
    pointer-events: none;
}

@keyframes nodePulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Nexus Info Panel */
.nexus-info-panel {
    width: 350px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    opacity: 0.5;
    transition: var(--transition-normal);
}

.nexus-info-panel.active {
    opacity: 1;
    border-color: var(--neon-cyan);
}

.info-panel-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-panel-icon {
    font-size: 2.5rem;
}

.info-panel-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-light);
}

.info-panel-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.info-panel-close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.info-panel-close:hover {
    background: rgba(255, 0, 68, 0.2);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.info-panel-body {
    margin-bottom: var(--space-md);
}

.node-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--space-md);
}

.info-panel-connections {
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.connections-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.connection-tag {
    display: inline-block;
    padding: 5px 12px;
    margin: 3px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-cyan);
}

/* Nexus Game Score */
.nexus-game-score {
    display: none;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
}

.score-item {
    text-align: center;
}

.score-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.score-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--neon-cyan);
}

.score-reset {
    padding: 8px 16px;
    background: rgba(255, 0, 68, 0.1);
    border: 1px solid var(--neon-red);
    border-radius: var(--radius-md);
    color: var(--neon-red);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    transition: var(--transition-normal);
}

.score-reset:hover {
    background: rgba(255, 0, 68, 0.2);
}

/* Comparator */
.comparator-container {
    max-width: 1000px;
    margin: 0 auto;
}

.comparator-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.comparator-slot {
    min-height: 400px;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.comparator-slot.left {
    border-color: rgba(0, 255, 255, 0.3);
}

.comparator-slot.right {
    border-color: rgba(255, 0, 255, 0.3);
}

.slot-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.slot-placeholder-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.slot-placeholder-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.comparator-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-badge {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-fire);
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    box-shadow: 0 0 30px rgba(255, 100, 0, 0.5);
}

.comparator-selector {
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STORY MODE / VISUAL NOVEL
   ═══════════════════════════════════════════════════════════════════════════ */
.story-section {
    background: linear-gradient(180deg, transparent, rgba(153, 51, 255, 0.02), transparent);
}

.story-container {
    max-width: 900px;
    margin: 0 auto;
}

.story-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(153, 51, 255, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(153, 51, 255, 0.1);
}

.story-scene {
    position: relative;
    height: 350px;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-tertiary));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-lg);
    overflow: hidden;
}

.story-scene-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    filter: blur(2px);
}

.story-character {
    position: relative;
    font-size: 8rem;
    filter: drop-shadow(0 0 30px rgba(153, 51, 255, 0.5));
    animation: characterFloat 3s ease-in-out infinite;
    z-index: 2;
}

@keyframes characterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.story-dialogue {
    padding: var(--space-lg);
}

.story-speaker {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--neon-purple);
    margin-bottom: var(--space-sm);
    letter-spacing: 2px;
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: var(--space-lg);
    min-height: 80px;
}

.story-text .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--neon-cyan);
    animation: blink 0.7s infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.story-choices {
    display: grid;
    gap: var(--space-md);
}

.story-choice {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(153, 51, 255, 0.1);
    border: 2px solid rgba(153, 51, 255, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-light);
    text-align: left;
    transition: var(--transition-normal);
}

.story-choice:hover {
    border-color: var(--neon-purple);
    background: rgba(153, 51, 255, 0.2);
    transform: translateX(10px);
}

.story-choice-icon {
    font-size: 1.5rem;
}

.story-choice-text {
    flex: 1;
}

.story-choice-consequence {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-purple);
    opacity: 0;
    transition: var(--transition-normal);
}

.story-choice:hover .story-choice-consequence {
    opacity: 1;
}

.story-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(153, 51, 255, 0.2);
}

.story-chapter {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.story-stats {
    display: flex;
    gap: var(--space-lg);
}

.story-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.story-stat-icon {
    font-size: 1rem;
}

.story-stat-value {
    color: var(--neon-cyan);
}

/* Story Episode Selector */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.episode-card {
    position: relative;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    overflow: hidden;
}

.episode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-royal);
}

.episode-card:hover {
    transform: translateY(-5px);
    border-color: rgba(153, 51, 255, 0.5);
    box-shadow: 0 0 30px rgba(153, 51, 255, 0.2);
}

.episode-card.locked {
    opacity: 0.5;
    pointer-events: none;
}

.episode-card.completed::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neon-green);
    border-radius: var(--radius-full);
    color: var(--bg-primary);
    font-weight: bold;
}

.episode-number {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--neon-purple);
    margin-bottom: var(--space-sm);
}

.episode-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.episode-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.episode-meta {
    display: flex;
    gap: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}
/* ═══════════════════════════════════════════════════════════════════════════
   PAGINACIÓN GLOSARIO (Nuevo)
   ═══════════════════════════════════════════════════════════════════════════ */
.glossary-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-md);
    color: var(--neon-cyan);
    font-family: var(--font-display);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: var(--shadow-glow-cyan);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.pagination-info {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}
/* ═══════════════════════════════════════════════════════════════════════════
   AI CHAT SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.ai-section {
    background: linear-gradient(180deg, transparent, rgba(0, 136, 255, 0.02), transparent);
}

.ai-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INTERROGATION SYSTEM (replaces AI Chat)
   ═══════════════════════════════════════════════════════════════════════════ */
.interrogation-select {
    max-width: 800px;
    margin: 0 auto;
}

.interrogation-char-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.15);
}

.interrogation-room {
    animation: fadeIn 0.5s ease;
}

.interrogation-dialogue {
    animation: fadeIn 0.5s ease;
}

.interrogation-option:hover {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 255, 255, 0.1) !important;
    transform: translateX(5px);
}

/* Tools Grid (now interactive tools) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.tool-card {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.tool-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.tool-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.tool-card-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.tool-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CRIMINAL MAP SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.map-section {
    background: linear-gradient(180deg, transparent, rgba(255, 0, 68, 0.02), transparent);
}

.map-container {
    position: relative;
}

.map-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.map-filter {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    transition: var(--transition-normal);
}

.map-filter:hover,
.map-filter.active {
    border-color: var(--neon-red);
    color: var(--neon-red);
    background: rgba(255, 0, 68, 0.1);
}

.map-search {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
}

.map-search input {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    outline: none;
    width: 200px;
}

.map-wrapper {
    position: relative;
    height: 500px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 0, 68, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#crimeMap {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
}

/* Custom Map Markers */
.crime-marker {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--neon-red);
    border-radius: var(--radius-full);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.5);
}

.crime-marker:hover {
    transform: scale(1.3);
    z-index: 1000 !important;
}

.crime-marker.fictional {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.crime-marker.historical {
    border-color: var(--neon-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Map Popup */
.map-popup {
    min-width: 250px;
}

.map-popup-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--neon-red);
    margin-bottom: var(--space-sm);
}

.map-popup-type {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 0, 68, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-red);
    margin-bottom: var(--space-sm);
}

.map-popup-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.map-popup-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: var(--space-md);
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    z-index: 100;
}

.legend-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.legend-dot.fictional { background: var(--neon-cyan); }
.legend-dot.historical { background: var(--neon-gold); }
.legend-dot.realtime { background: var(--neon-red); }

/* ═══════════════════════════════════════════════════════════════════════════
   TRIAL SIMULATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.trial-section {
    background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.02), transparent);
}

.trial-container {
    max-width: 1000px;
    margin: 0 auto;
}

.trial-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.trial-side {
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    text-align: center;
}

.trial-side.prosecution {
    border: 2px solid var(--neon-red);
}

.trial-side.defense {
    border: 2px solid var(--neon-cyan);
}

.trial-role-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.trial-role-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

.prosecution .trial-role-title { color: var(--neon-red); }
.defense .trial-role-title { color: var(--neon-cyan); }

.trial-role-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.trial-bench {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.trial-judge {
    text-align: center;
}

.trial-judge-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.trial-judge-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--neon-gold);
}

/* Trial Case Card */
.trial-case {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.trial-defendant {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.defendant-avatar {
    font-size: 4rem;
}

.defendant-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.defendant-charge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-red);
}

.trial-evidence {
    margin-bottom: var(--space-lg);
}

.evidence-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-gold);
    margin-bottom: var(--space-md);
}

.evidence-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-sm);
}

.evidence-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.evidence-item:hover {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.05);
}

.evidence-item.used {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
}

.evidence-icon {
    font-size: 1.5rem;
}

.evidence-name {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Trial Arguments */
.trial-arguments {
    display: grid;
    gap: var(--space-md);
}

.argument-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.argument-card:hover {
    border-color: var(--neon-gold);
}

.argument-card.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
}

.argument-theory {
    padding: 5px 10px;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-magenta);
}

.argument-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Trial Verdict */
.trial-verdict {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    display: none;
}

.trial-verdict.show {
    display: block;
    animation: verdictReveal 0.5s ease-out;
}

@keyframes verdictReveal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.verdict-icon {
    font-size: 5rem;
    margin-bottom: var(--space-md);
}

.verdict-result {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.verdict-result.guilty { color: var(--neon-red); }
.verdict-result.innocent { color: var(--neon-green); }

.verdict-explanation {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADVANCED CRIME LAB
   ═══════════════════════════════════════════════════════════════════════════ */
.crimelab-section {
    background: linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.02), transparent);
}

.crimelab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.lab-station {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.lab-station:hover {
    border-color: var(--neon-green);
    box-shadow: var(--shadow-glow-green);
}

.lab-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.lab-icon {
    font-size: 1.5rem;
}

.lab-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-green);
}

.lab-body {
    padding: var(--space-md);
}

.evidence-scene {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: var(--transition-normal);
}

.evidence-scene.dragover {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
}

.evidence-scene-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    opacity: 0.5;
}

.evidence-scene-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.evidence-items-row {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.evidence-item-draggable {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--neon-green);
    cursor: grab;
    transition: var(--transition-normal);
}

.evidence-item-draggable:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-green);
}

.evidence-item-draggable:active {
    cursor: grabbing;
}

.analysis-result {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    display: none;
}

.analysis-result.active {
    display: block;
    animation: resultFade 0.3s ease-out;
}

@keyframes resultFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Autopsy Station */
.autopsy-container {
    position: relative;
    height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.autopsy-body {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    opacity: 0.3;
}

.autopsy-hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 68, 0.3);
    border: 2px solid var(--neon-red);
    border-radius: var(--radius-full);
    cursor: pointer;
    animation: hotspotPulse 2s infinite;
}

@keyframes hotspotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.autopsy-hotspot:hover {
    background: rgba(255, 0, 68, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACADEMY / CERTIFICATION
   ═══════════════════════════════════════════════════════════════════════════ */
.academy-section {
    background: linear-gradient(180deg, transparent, rgba(0, 255, 255, 0.02), transparent);
}

.academy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.course-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.course-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    background: var(--gradient-gold);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--bg-primary);
    font-weight: 600;
}

.course-header {
    padding: var(--space-lg);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.1), transparent);
}

.course-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.course-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.course-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
}

.course-body {
    padding: 0 var(--space-lg) var(--space-lg);
}

.course-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.course-progress {
    margin-bottom: var(--space-md);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-cyber);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Certificate */
.certificate-preview {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 3px solid var(--neon-gold);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certificate-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='rgba(255,215,0,0.03)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.certificate-seal {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.certificate-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--neon-gold);
    margin-bottom: var(--space-sm);
}

.certificate-recipient {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: var(--space-md);
}

.certificate-course {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.certificate-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VILLAIN CREATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.creator-section {
    background: linear-gradient(180deg, transparent, rgba(255, 0, 255, 0.02), transparent);
}

.creator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.creator-form {
    background: var(--bg-card);
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--neon-magenta);
    margin-bottom: var(--space-sm);
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.form-input:focus {
    border-color: var(--neon-magenta);
    outline: none;
    box-shadow: var(--shadow-glow-magenta);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff00ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Icon Selector */
.icon-selector {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-sm);
}

.icon-option {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.icon-option:hover {
    border-color: rgba(255, 0, 255, 0.5);
    background: rgba(255, 0, 255, 0.1);
}

.icon-option.selected {
    border-color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.2);
    box-shadow: var(--shadow-glow-magenta);
}

/* Trait Selector */
.trait-selector {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.trait-option {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
}

.trait-option:hover {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
}

.trait-option.selected {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
}

/* Stat Slider */
.stat-slider {
    margin-bottom: var(--space-md);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.stat-name {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-cyan);
}

.stat-input {
    width: 100%;
    height: 6px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.stat-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gradient-cyber);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
}

.stat-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-glow-cyan);
}

/* Creator Preview */
.creator-preview {
    background: var(--bg-card);
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: sticky;
    top: 90px;
}

.preview-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-avatar {
    font-size: 5rem;
    margin-bottom: var(--space-md);
}

.preview-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: var(--space-xs);
}

.preview-alias {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--neon-magenta);
}

.preview-stats {
    margin-bottom: var(--space-lg);
}

.preview-stat-bar {
    margin-bottom: var(--space-sm);
}

.preview-stat-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.preview-stat-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.preview-stat-fill {
    height: 100%;
    background: var(--gradient-cyber);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

.preview-traits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.preview-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BEHAVIOR PREDICTOR
   ═══════════════════════════════════════════════════════════════════════════ */
.predictor-container {
    max-width: 900px;
    margin: 0 auto;
}

.predictor-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.predictor-input-section {
    margin-bottom: var(--space-xl);
}

.predictor-results {
    display: none;
}

.predictor-results.show {
    display: block;
    animation: resultFade 0.5s ease-out;
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.prediction-item {
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    text-align: center;
}

.prediction-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.prediction-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.prediction-value.high { color: var(--neon-red); }
.prediction-value.medium { color: var(--neon-gold); }
.prediction-value.low { color: var(--neon-green); }

.prediction-chart {
    height: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.similar-profiles {
    margin-top: var(--space-lg);
}

.similar-profiles-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--neon-cyan);
    margin-bottom: var(--space-md);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.similar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.similar-card:hover {
    border-color: var(--neon-cyan);
}

.similar-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.similar-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-light);
}

.similar-match {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WHODUNIT SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.whodunit-section {
    background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.02), transparent);
}

.whodunit-container {
    max-width: 900px;
    margin: 0 auto;
}

.whodunit-case {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.case-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.case-icon {
    font-size: 2.5rem;
}

.case-info h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--space-xs);
}

.case-info p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.case-body {
    padding: var(--space-lg);
}

.case-description {
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.case-description p {
    color: var(--text-muted);
}

.case-description strong {
    color: var(--text-light);
}

.evidence-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-gold);
    margin-bottom: var(--space-md);
}

.evidence-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.whodunit-evidence-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.whodunit-evidence-item:hover {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.05);
}

.whodunit-evidence-item.revealed {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--neon-gold);
}

.evidence-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.evidence-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.suspects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.suspect-card {
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.suspect-card:hover {
    border-color: var(--neon-gold);
}

.suspect-card.selected {
    border-color: var(--neon-red);
    background: rgba(255, 0, 68, 0.1);
}

.suspect-avatar {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.suspect-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: var(--space-xs);
}

.suspect-motive {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GLOSSARY
   ═══════════════════════════════════════════════════════════════════════════ */
.glossary-container {
    max-width: 800px;
    margin: 0 auto;
}

.glossary-search {
    margin-bottom: var(--space-lg);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-xl);
}

.search-icon {
    font-size: 1.2rem;
    opacity: 0.5;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.glossary-grid {
    display: grid;
    gap: var(--space-md);
}

.glossary-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
}

.glossary-item:hover {
    border-color: rgba(0, 255, 255, 0.3);
}

.glossary-item.expanded {
    border-color: var(--neon-cyan);
}

.glossary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
}

.glossary-term {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-light);
}

.glossary-arrow {
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.glossary-item.expanded .glossary-arrow {
    transform: rotate(180deg);
    color: var(--neon-cyan);
}

.glossary-definition {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.glossary-item.expanded .glossary-definition {
    max-height: 200px;
}

.glossary-definition p {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-muted);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MINIGAMES GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.minigames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.minigame-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
}

.minigame-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: var(--shadow-glow-cyan);
}

.minigame-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.1), transparent);
    font-size: 4rem;
}

.minigame-info {
    padding: var(--space-lg);
}

.minigame-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.minigame-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.minigame-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.minigame-difficulty {
    display: flex;
    gap: 3px;
}

.minigame-difficulty span {
    color: var(--neon-gold);
}

.minigame-difficulty span.empty {
    opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLLECTIBLES
   ═══════════════════════════════════════════════════════════════════════════ */
.collectibles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.collectible-card {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.collectible-card.owned {
    border-color: var(--neon-gold);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.1), transparent);
}

.collectible-card.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.collectible-card:hover:not(.locked) {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-gold);
}

.collectible-rarity {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
}

.collectible-rarity.common { background: #888; color: #fff; }
.collectible-rarity.rare { background: #0088ff; color: #fff; }
.collectible-rarity.epic { background: #9933ff; color: #fff; }
.collectible-rarity.legendary { background: linear-gradient(135deg, #ffd700, #ff6600); color: #000; }

.collectible-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.collectible-name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: var(--z-modal);
}

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

.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid rgba(0, 255, 255, 0.2);
    transition: right 0.3s ease;
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
}

.settings-panel.open {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-light);
}

.settings-close {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.settings-close:hover {
    background: rgba(255, 0, 68, 0.2);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.settings-group {
    margin-bottom: var(--space-lg);
}

.settings-group-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.setting-info {
    flex: 1;
}

.setting-name {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 3px;
}

.setting-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--neon-cyan);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACHIEVEMENT POPUP
   ═══════════════════════════════════════════════════════════════════════════ */
.achievement-popup {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 320px;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--neon-gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow-gold);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: var(--z-notification);
}

.achievement-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.achievement-icon {
    font-size: 2.5rem;
}

.achievement-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-gold);
    letter-spacing: 2px;
}

.achievement-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-light);
}

.achievement-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILE MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.file-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: var(--z-modal);
}

.file-modal {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.file-modal-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--neon-cyan);
}

.file-modal-close {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.file-modal-close:hover {
    background: rgba(255, 0, 68, 0.2);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.file-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-xl) var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: var(--space-md);
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--neon-cyan);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: var(--space-xl) auto 0;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUDIO PLAYER (for narrative mode)
   ═══════════════════════════════════════════════════════════════════════════ */
.audio-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    z-index: var(--z-sticky);
    opacity: 0;
    transform: translateY(100px);
    transition: var(--transition-normal);
}

.audio-player.visible {
    opacity: 1;
    transform: translateY(0);
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
}

.audio-bar {
    width: 3px;
    background: var(--neon-cyan);
    border-radius: 2px;
    animation: audioBar 0.5s ease-in-out infinite alternate;
}

.audio-bar:nth-child(1) { animation-delay: 0s; height: 30%; }
.audio-bar:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.audio-bar:nth-child(3) { animation-delay: 0.2s; height: 40%; }
.audio-bar:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.audio-bar:nth-child(5) { animation-delay: 0.4s; height: 50%; }

@keyframes audioBar {
    to { height: 100%; }
}

.audio-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.audio-controls button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-full);
    color: var(--neon-cyan);
    font-size: 0.8rem;
    transition: var(--transition-normal);
}

.audio-controls button:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .nexus-wrapper {
        flex-direction: column;
    }
    
    .nexus-info-panel {
        width: 100%;
    }
    
    .creator-container {
        grid-template-columns: 1fr;
    }
    
    .creator-preview {
        position: relative;
        top: 0;
    }
}

@media (max-width: 992px) {
    .comparator-arena {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .comparator-vs {
        order: -1;
    }
    
    .trial-arena {
        grid-template-columns: 1fr;
    }
    
    .trial-bench {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        padding: var(--space-lg);
        gap: var(--space-sm);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid rgba(0, 255, 255, 0.1);
        z-index: 250;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links a {
        display: block;
        padding: var(--space-md);
        text-align: center;
    }
    
    .hamburger {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        z-index: 251;
    }
    
    .nav-right {
        gap: var(--space-sm);
    }
    
    .user-profile-btn span {
        display: none;
    }
    
    .hero-title {
        letter-spacing: 5px;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section {
        padding: var(--space-xl) var(--space-md);
    }
    
    .nexus-container {
        height: 400px;
    }
    
    .nexus-filters {
        justify-content: center;
    }
    
    .story-scene {
        height: 250px;
    }
    
    .story-character {
        font-size: 5rem;
    }
    
    .interrogation-room {
        max-width: 100%;
    }
    
    .stats-bar {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .achievement-popup {
        right: 15px;
        left: 15px;
        width: auto;
    }
    
    .settings-panel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0 var(--space-md);
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .streak-badge {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .hero {
        padding: var(--space-xl) var(--space-md);
    }
    
    .system-status {
        font-size: 0.65rem;
        padding: 8px 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .profiler-option {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }
    
    .category-grid,
    .theories-grid {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        height: 350px;
    }
    
    .icon-selector {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cyber-grid,
    .ambient-orb,
    .node-pulse,
    .node-ring {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .nav,
    .quake-terminal,
    .settings-panel,
    .settings-overlay,
    .achievement-popup,
    .audio-player,
    .cyber-grid,
    .film-grain,
    .crt-scanlines,
    .crt-flicker,
    .ambient-orb,
    .rain-overlay {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ★ NEW STYLES — KRIMINIS v8.0 IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   SCROLL REVEAL ANIMATIONS (improvement #20)
   ───────────────────────────────────────────────────────────────────────── */
.scroll-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-hidden.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-child.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .scroll-hidden,
    .stagger-child {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   FADE IN ANIMATION (generic)
   ───────────────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─────────────────────────────────────────────────────────────────────────
   TYPING CURSOR
   ───────────────────────────────────────────────────────────────────────── */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--neon-cyan);
    margin-left: 2px;
    animation: cursorBlink 0.7s infinite;
    vertical-align: text-bottom;
}

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

/* ─────────────────────────────────────────────────────────────────────────
   LEVEL UP NOTIFICATION (improvement #UserProfile)
   ───────────────────────────────────────────────────────────────────────── */
.level-up-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(10, 10, 15, 0.95);
    border: 2px solid var(--neon-gold);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    z-index: var(--z-notification);
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
}

.level-up-notification.show {
    transform: translateX(0);
}

.level-up-icon {
    font-size: 1.5rem;
}

.level-up-text {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-gold);
    letter-spacing: 1px;
}

.level-up-text small {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   WHODUNIT IMPROVEMENTS (improvement #19 — daily case)
   ───────────────────────────────────────────────────────────────────────── */
.whodunit-container {
    max-width: 900px;
    margin: 0 auto;
}

.whodunit-case {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.case-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 215, 0, 0.08);
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.case-icon {
    font-size: 2rem;
}

.case-info h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--neon-gold);
}

.case-info p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.case-body {
    padding: 25px;
}

.case-description {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    line-height: 1.7;
}

.evidence-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.evidence-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.whodunit-evidence-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.whodunit-evidence-item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

.whodunit-evidence-item.revealed {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.05);
    color: var(--text-light);
}

.evidence-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.suspects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.suspect-card {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.suspect-card:hover {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.05);
}

.suspect-card.selected {
    border-color: var(--neon-red);
    background: rgba(255, 0, 68, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.2);
}

.suspect-avatar {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.suspect-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.suspect-motive {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   MEMORY GAME (improvement #10)
   ───────────────────────────────────────────────────────────────────────── */
.memory-card {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 100px;
    user-select: none;
}

.memory-card:hover:not(.flipped):not(.matched) {
    border-color: rgba(0, 255, 255, 0.3);
    background: rgba(0, 255, 255, 0.05);
    transform: scale(1.03);
}

.memory-card.flipped {
    transform: scale(1.05);
}

.memory-card.matched {
    cursor: default;
    opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────────────────
   RISK CALCULATOR (improvement #5)
   ───────────────────────────────────────────────────────────────────────── */
.stat-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.stat-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gradient-cyber);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
    transition: box-shadow 0.2s;
}

.stat-input::-webkit-slider-thumb:hover {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.stat-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--gradient-cyber);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* ─────────────────────────────────────────────────────────────────────────
   GLOSSARY IMPROVEMENTS
   ───────────────────────────────────────────────────────────────────────── */
.glossary-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}

.glossary-item:hover {
    border-color: rgba(0, 255, 255, 0.2);
}

.glossary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.glossary-term {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--neon-cyan);
}

.glossary-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.glossary-item.expanded .glossary-arrow {
    transform: rotate(180deg);
}

.glossary-definition {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.glossary-item.expanded .glossary-definition {
    max-height: 200px;
    padding: 0 20px 15px;
}

.glossary-definition p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────────────
   FILE CARD IMPROVEMENTS
   ───────────────────────────────────────────────────────────────────────── */
.file-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPARATOR BUTTON IMPROVEMENTS
   ───────────────────────────────────────────────────────────────────────── */
.comparator-char-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-normal);
}

.comparator-char-btn:hover {
    transform: scale(1.05);
}

/* ─────────────────────────────────────────────────────────────────────────
   QUIZ OPTION STYLES
   ───────────────────────────────────────────────────────────────────────── */
.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.quiz-option:hover {
    border-color: rgba(0, 255, 255, 0.3);
    background: rgba(0, 255, 255, 0.05);
}

/* ─────────────────────────────────────────────────────────────────────────
   PURPLE BUTTON (for story mode)
   ───────────────────────────────────────────────────────────────────────── */
.btn-purple {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-magenta));
    color: white;
    border: none;
    padding: 15px 30px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-purple:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(153, 51, 255, 0.4);
}

/* ─────────────────────────────────────────────────────────────────────────
   EVIDENCE ANALYZER IMPROVEMENTS
   ───────────────────────────────────────────────────────────────────────── */
.evidence-item {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.evidence-item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

.evidence-item.used {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    color: var(--text-light);
}

/* ─────────────────────────────────────────────────────────────────────────
   ARGUMENT CARD (Trial)
   ───────────────────────────────────────────────────────────────────────── */
.argument-card {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    margin-bottom: 8px;
}

.argument-card:hover {
    border-color: var(--neon-gold);
}

.argument-card.selected {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.1);
}

.argument-theory {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--neon-gold);
    display: block;
    margin-bottom: 5px;
}

.argument-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   AUDIO PLAYER IMPROVEMENTS
   ───────────────────────────────────────────────────────────────────────── */
.audio-player {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    pointer-events: none;
}

.audio-player.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   PREVIEW STAT BARS (Villain Creator)
   ───────────────────────────────────────────────────────────────────────── */
.preview-stat-bar {
    margin-bottom: 8px;
}

.preview-stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    text-transform: capitalize;
}

.preview-stat-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.preview-stat-fill {
    height: 100%;
    background: var(--gradient-cyber);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ─────────────────────────────────────────────────────────────────────────
   ICON/TRAIT OPTION BUTTONS (Villain Creator)
   ───────────────────────────────────────────────────────────────────────── */
.icon-option,
.trait-option {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.icon-option:hover,
.trait-option:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.icon-option.selected,
.trait-option.selected {
    border-color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.15);
    color: var(--neon-magenta);
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE ADDITIONS FOR NEW FEATURES
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .interrogation-char-card {
        padding: 15px !important;
    }

    .suspects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .evidence-items {
        grid-template-columns: 1fr;
    }

    .memory-card {
        min-height: 80px;
    }

    #memoryGrid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .level-up-notification {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }

    .whodunit-case .case-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #memoryGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .suspects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .suspect-card {
        padding: 10px;
    }

    .suspect-avatar {
        font-size: 2rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   PERFORMANCE: will-change hints for heavy animations (improvement #14)
   ───────────────────────────────────────────────────────────────────────── */
.film-grain,
.crt-flicker,
.crt-scanlines {
    will-change: transform;
}

.ambient-orb {
    will-change: transform;
}

/* Disable heavy effects on mobile if not already handled */
@media (max-width: 768px) {
    .film-grain,
    .crt-flicker {
        display: none !important;
    }

    .ambient-orb {
        display: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   ACCESSIBILITY IMPROVEMENTS (improvement #15)
   ───────────────────────────────────────────────────────────────────────── */
[role="button"] {
    cursor: pointer;
}

/* Better focus indicators */
button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 3px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary,
    .btn-gold,
    .btn-purple {
        border: 2px solid ButtonText;
    }
}
/* ═══════════════════════════════════════════════════════════════════════════
   KRIMINIS v12.0 — IMPROVEMENTS CSS
   Clases reutilizables + estilos para las 10 mejoras
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #6] CLASES REUTILIZABLES — Reemplazo de inline styles
   ─────────────────────────────────────────────────────────────────────────  */

/* Layout utilities */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; }
.flex-gap-8 { display: flex; gap: 8px; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-gap-15 { display: flex; gap: 15px; }
.flex-gap-20 { display: flex; gap: 20px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.block { display: block; }

/* Grid systems */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.grid-file { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }

/* Spacing */
.mb-4 { margin-bottom: 4px; }
.mb-5 { margin-bottom: 5px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.mb-30 { margin-bottom: 30px; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.ml-auto { margin-left: auto; }
.p-10 { padding: 10px; }
.p-12 { padding: 12px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }
.p-25 { padding: 25px; }
.p-30 { padding: 30px; }
.p-50 { padding: 50px; }
.px-12 { padding-left: 12px; padding-right: 12px; }
.py-15 { padding-top: 15px; padding-bottom: 15px; }

/* Typography */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.font-body { font-family: var(--font-body); }
.text-xs { font-size: 0.6rem; }
.text-sm { font-size: 0.7rem; }
.text-sml { font-size: 0.75rem; }
.text-base { font-size: 0.8rem; }
.text-md { font-size: 0.85rem; }
.text-normal { font-size: 0.9rem; }
.text-lg { font-size: 1rem; }
.text-xl { font-size: 1.1rem; }
.text-2xl { font-size: 1.2rem; }
.text-3xl { font-size: 1.3rem; }
.text-4xl { font-size: 1.4rem; }
.text-5xl { font-size: 2rem; }
.text-icon-sm { font-size: 2rem; }
.text-icon-md { font-size: 2.5rem; }
.text-icon-lg { font-size: 3.5rem; }
.text-icon-xl { font-size: 4rem; }
.text-icon-xxl { font-size: 5rem; }
.italic { font-style: italic; }
.bold { font-weight: bold; }
.ls-2 { letter-spacing: 2px; }
.ls-5 { letter-spacing: 5px; }
.lh-17 { line-height: 1.7; }
.lh-16 { line-height: 1.6; }

/* Colors */
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-cyan { color: var(--neon-cyan); }
.text-magenta { color: var(--neon-magenta); }
.text-green { color: var(--neon-green); }
.text-red { color: var(--neon-red); }
.text-gold { color: var(--neon-gold); }
.text-orange { color: var(--neon-orange); }
.text-purple { color: var(--neon-purple); }

/* Cards & containers */
.card-dark { background: rgba(0, 0, 0, 0.2); border-radius: var(--radius-sm); }
.card-dark-md { background: rgba(0, 0, 0, 0.2); border-radius: var(--radius-md); }
.card-bg { background: var(--bg-card); border-radius: var(--radius-md); }
.card-glass { background: rgba(0, 0, 0, 0.3); border-radius: var(--radius-md); }
.section-comment { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 2px; margin-bottom: 10px; }
.stat-box { background: rgba(0, 0, 0, 0.2); padding: 15px; border-radius: var(--radius-sm); text-align: center; }
.stat-box-sm { background: rgba(0, 0, 0, 0.2); padding: 12px; border-radius: var(--radius-sm); text-align: center; }
.stat-box-inline { text-align: center; padding: 10px 15px; background: rgba(0, 0, 0, 0.2); border-radius: var(--radius-sm); }

/* Badges */
.badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; }
.badge-sm { padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; }
.badge-md { padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; }

/* Progress bars */
.progress-track { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.progress-track-lg { height: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; transition: width 0.5s; border-radius: inherit; }
.progress-fill-cyber { background: var(--gradient-cyber); }
.progress-fill-gold { background: var(--gradient-gold); }
.progress-fill-green { background: var(--neon-green); }

/* Stat bars (used in character panels) */
.char-stat-row { margin-bottom: 8px; }
.char-stat-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 3px; }
.char-stat-track { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.char-stat-fill { height: 100%; transition: width 0.5s; }
.char-stat-track-sm { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }

/* Borders */
.border-left-gold { border-left: 3px solid var(--neon-gold); }
.border-left-muted { border-left: 3px solid var(--text-muted); }
.border-top-subtle { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.border-bottom-gold { padding-bottom: 20px; border-bottom: 1px solid rgba(255, 215, 0, 0.2); }

/* Interrogation styles */
.interr-char-card { background: var(--bg-card); padding: 25px; border-radius: var(--radius-md); cursor: pointer; text-align: center; transition: all 0.3s; border: 2px solid; }
.interr-char-card:hover { transform: translateY(-2px); }
.interr-header { display: flex; align-items: center; gap: 15px; padding: 20px; background: rgba(0, 0, 0, 0.3); border-radius: var(--radius-md) var(--radius-md) 0 0; border: 1px solid; }
.interr-body { background: var(--bg-card); border: 1px solid; border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md); padding: 25px; min-height: 300px; }
.interr-dialogue { margin-bottom: 20px; animation: fadeIn 0.5s ease; }
.interr-option { display: block; width: 100%; text-align: left; padding: 15px 20px; margin-bottom: 8px; background: rgba(0, 255, 255, 0.05); border: 1px solid rgba(0, 255, 255, 0.2); border-radius: var(--radius-sm); color: var(--text-light); font-size: 0.9rem; cursor: pointer; transition: all 0.3s; font-family: var(--font-body); }
.interr-option:hover, .interr-option:focus-visible { border-color: var(--neon-cyan); background: rgba(0, 255, 255, 0.1); outline: none; }
.interr-ending { margin-top: 25px; padding: 25px; border: 2px solid; border-radius: var(--radius-md); animation: fadeIn 0.5s ease; }
.interr-ending.full { background: rgba(0, 255, 136, 0.08); border-color: var(--neon-green); }
.interr-ending.partial { background: rgba(255, 215, 0, 0.08); border-color: var(--neon-gold); }

/* Result panels */
.result-correct { background: rgba(0, 255, 136, 0.1); border: 1px solid var(--neon-green); padding: 20px; border-radius: var(--radius-md); }
.result-wrong { background: rgba(255, 0, 102, 0.1); border: 1px solid var(--neon-red); padding: 20px; border-radius: var(--radius-md); }

/* File modal inner grid */
.file-modal-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
@media (max-width: 768px) { .file-modal-grid { grid-template-columns: 1fr; } }

/* Achievement grid item */
.ach-icon-box { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid; border-radius: var(--radius-sm); font-size: 1.2rem; cursor: default; }
.ach-icon-box.unlocked { background: rgba(255, 215, 0, 0.15); border-color: var(--neon-gold); opacity: 1; }
.ach-icon-box.locked { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.05); opacity: 0.3; }

/* Settings panel stats */
.settings-stats-grid { padding: 15px; background: rgba(0, 0, 0, 0.2); border-radius: var(--radius-sm); }
.settings-stat-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.settings-stat-row:last-child { margin-bottom: 0; }

/* Fingerprint mini-game */
.fp-game-area { display: flex; gap: 12px; justify-content: center; }
.fp-option-btn { padding: 15px; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 10px; cursor: pointer; text-align: center; transition: all 0.3s; min-width: 60px; }
.fp-option-btn:hover, .fp-option-btn:focus-visible { border-color: var(--neon-cyan); outline: none; }
.fp-option-btn.correct { border-color: var(--neon-green); background: rgba(0, 255, 136, 0.15); }
.fp-option-btn.wrong { border-color: var(--neon-red); background: rgba(255, 0, 68, 0.1); }

/* Evidence analyzer reveal */
.evidence-reveal-line { opacity: 0; transform: translateY(10px); transition: all 0.4s ease; margin-bottom: 6px; padding: 8px 12px; background: rgba(0, 0, 0, 0.2); border-radius: 6px; font-size: 0.9rem; }
.evidence-reveal-line.visible { opacity: 1; transform: translateY(0); }
.evidence-minigame { margin-top: 15px; padding: 15px; background: rgba(0, 255, 255, 0.05); border: 1px solid rgba(0, 255, 255, 0.2); border-radius: 8px; }

/* Story mode end */
.story-end-stats { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; }

/* Avatar option */
.avatar-option { font-size: 1.4rem; padding: 8px; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.3s; }
.avatar-option:hover, .avatar-option:focus-visible { border-color: var(--neon-cyan); outline: none; }
.avatar-option.selected { background: rgba(0, 255, 255, 0.2); border-color: var(--neon-cyan); }

/* Comparator slot */
.compare-slot-content { text-align: center; padding: 20px; }


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #1] CASO CONECTADO — Meta-narrative linking all sections
   ─────────────────────────────────────────────────────────────────────────  */
.connected-case-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 0, 255, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 20px 25px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.connected-case-banner::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.05), transparent);
    animation: shimmer 3s infinite;
}
@keyframes shimmer { to { transform: translateX(50%); } }
.connected-case-banner:hover { border-color: var(--neon-gold); transform: translateY(-2px); }
.cc-progress-bar { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.cc-progress-fill { height: 100%; background: var(--gradient-gold); transition: width 0.8s ease; }
.cc-step { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); margin-bottom: 8px; transition: all 0.3s; }
.cc-step.completed { background: rgba(0, 255, 136, 0.1); border-left: 3px solid var(--neon-green); }
.cc-step.active { background: rgba(0, 255, 255, 0.1); border-left: 3px solid var(--neon-cyan); animation: pulse-border 2s infinite; }
.cc-step.locked { opacity: 0.4; }
@keyframes pulse-border { 0%, 100% { border-left-color: var(--neon-cyan); } 50% { border-left-color: var(--neon-magenta); } }
.cc-clue-reveal {
    background: rgba(255, 215, 0, 0.1);
    border: 1px dashed var(--neon-gold);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
    text-align: center;
}


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #2] VERSUS MODE
   ─────────────────────────────────────────────────────────────────────────  */
.versus-banner {
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.08), rgba(0, 255, 255, 0.05));
    border: 1px solid rgba(255, 0, 102, 0.3);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}
.versus-badge { padding: 4px 12px; background: var(--neon-red); color: var(--bg-primary); border-radius: 20px; font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; }
.versus-modal { max-width: 500px; }
.versus-link-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-cyan);
    word-break: break-all;
    cursor: pointer;
    transition: all 0.3s;
}
.versus-link-box:hover { background: rgba(0, 255, 255, 0.1); }
.versus-result {
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 15px;
}
.versus-result.win { background: rgba(0, 255, 136, 0.1); border: 1px solid var(--neon-green); }
.versus-result.lose { background: rgba(255, 0, 102, 0.1); border: 1px solid var(--neon-red); }
.versus-result.tie { background: rgba(255, 215, 0, 0.1); border: 1px solid var(--neon-gold); }


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #3] DIARIO DEL DETECTIVE
   ─────────────────────────────────────────────────────────────────────────  */
.diary-section { max-width: 800px; margin: 0 auto; }
.diary-entry {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--neon-cyan);
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    position: relative;
    transition: all 0.3s;
}
.diary-entry:hover { border-left-color: var(--neon-gold); background: rgba(0, 0, 0, 0.4); }
.diary-entry .diary-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-cyan);
    margin-bottom: 6px;
}
.diary-entry .diary-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}
.diary-entry .diary-xp {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
    margin-top: 6px;
}
.diary-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.diary-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.diary-filter {
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}
.diary-filter:hover, .diary-filter.active { border-color: var(--neon-cyan); color: var(--neon-cyan); }


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #4] MODO EXAMEN
   ─────────────────────────────────────────────────────────────────────────  */
.exam-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.97);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.exam-container {
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--neon-red);
    border-radius: var(--radius-lg);
    padding: 0;
}
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(255, 0, 68, 0.1);
    border-bottom: 1px solid rgba(255, 0, 68, 0.3);
}
.exam-timer {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--neon-red);
    min-width: 90px;
    text-align: center;
}
.exam-timer.warning { animation: flash-red 0.5s infinite; }
@keyframes flash-red { 0%, 100% { color: var(--neon-red); } 50% { color: var(--neon-gold); } }
.exam-body { padding: 25px; }
.exam-question-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
}
.exam-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 18px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.exam-option:hover, .exam-option:focus-visible { border-color: var(--neon-cyan); outline: none; }
.exam-option.selected { border-color: var(--neon-cyan); background: rgba(0, 255, 255, 0.1); }
.exam-option.correct { border-color: var(--neon-green); background: rgba(0, 255, 136, 0.15); }
.exam-option.wrong { border-color: var(--neon-red); background: rgba(255, 0, 68, 0.1); }
.exam-progress { display: flex; gap: 4px; margin-bottom: 20px; }
.exam-progress-dot { width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); transition: background 0.3s; }
.exam-progress-dot.done { background: var(--neon-green); }
.exam-progress-dot.current { background: var(--neon-cyan); }
.exam-score-display { text-align: center; padding: 40px 20px; }
.exam-score-big { font-family: var(--font-display); font-size: 4rem; margin: 15px 0; }
.exam-rank { font-family: var(--font-display); font-size: 1.2rem; margin-top: 10px; }
.exam-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 25px 0; }


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #5] EASTER EGGS ENCADENADOS
   ─────────────────────────────────────────────────────────────────────────  */
.secret-clue-flash {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid var(--neon-gold);
    border-radius: var(--radius-md);
    padding: 15px 25px;
    z-index: var(--z-notification);
    animation: slideUpFade 0.5s ease, slideUpFade 0.5s ease 4s reverse forwards;
    text-align: center;
    max-width: 400px;
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.secret-unlock-effect {
    position: fixed;
    inset: 0;
    z-index: var(--z-notification);
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    animation: secretPulse 2s ease forwards;
}
@keyframes secretPulse { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #7] XP REBALANCE — Daily login indicator
   ─────────────────────────────────────────────────────────────────────────  */
.daily-bonus-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid var(--neon-green);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    z-index: var(--z-notification);
    animation: slideIn 0.5s ease, slideIn 0.5s ease 3s reverse forwards;
    display: flex;
    align-items: center;
    gap: 12px;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #8] ERROR HANDLING — Toast notifications
   ─────────────────────────────────────────────────────────────────────────  */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-notification);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 0.85rem;
    color: var(--text-light);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 350px;
}
.toast.error { border-color: var(--neon-red); }
.toast.warning { border-color: var(--neon-gold); }
.toast.success { border-color: var(--neon-green); }
.toast.info { border-color: var(--neon-cyan); }


/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #9] ACCESIBILIDAD
   ─────────────────────────────────────────────────────────────────────────  */

/* Focus visible for all interactive elements */
*:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--neon-cyan);
    color: var(--bg-primary);
    padding: 10px 20px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 9999;
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Focus trap indicator */
.modal-focus-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Live region for announcements */
.aria-live-region {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --bg-card: rgba(0, 0, 0, 0.95);
        --text-muted: #aaaacc;
    }
    .btn { border-width: 2px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .connected-case-banner::before { animation: none; }
}

/* Keyboard nav indicators for game elements */
.profiler-option:focus-visible,
.suspect-card:focus-visible,
.whodunit-evidence-item:focus-visible,
.memory-card:focus-visible,
.interrogation-char-card:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────
   [MEJORA #10] OFFLINE INDICATOR
   ─────────────────────────────────────────────────────────────────────────  */
.offline-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 0, 68, 0.9);
    color: white;
    text-align: center;
    padding: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    z-index: 9998;
    transform: translateY(-100%);
    transition: transform 0.3s;
}
.offline-banner.visible { transform: translateY(0); }
/* ═══════════════════════════════════════════════════════════════════════════
   KRIMINIS v12.0 — UPGRADE STYLESHEET
   Improvements #2, #7, #8, #9, #10, #11, #12
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   #12 — ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Skip to content link */
.skip-to-content {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 28px;
    background: var(--neon-cyan);
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    text-decoration: none;
    transition: top 0.3s ease;
}
.skip-to-content:focus {
    top: 0;
    outline: 3px solid var(--neon-gold);
    outline-offset: 2px;
}

/* Global focus-visible ring (replaces browser defaults) */
*:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 3px;
    border-radius: 2px;
}
/* Remove for mouse clicks */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Better contrast for muted text on dark */
.a11y-enhanced .section-desc,
.a11y-enhanced .text-muted,
.a11y-enhanced .setting-desc,
.a11y-enhanced .footer-desc {
    color: #a0a0b8;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion: disable ALL animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .ambient-orb, .crt-scanlines, .crt-flicker, .film-grain,
    .rain-overlay, .scroll-indicator, .node-pulse,
    .section-transition-overlay, .onboarding-spotlight {
        display: none !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn, .nexus-node, .category-card, .theory-card {
        border: 2px solid ButtonText;
    }
    .progress-bar, .xp-bar-fill {
        background: Highlight;
    }
}

/* Minimum tap target size for mobile */
@media (max-width: 768px) {
    .nexus-filter, .map-filter, .nexus-tab,
    .interrogation-option, .profiler-option,
    .story-choice, .btn, button {
        min-height: 44px;
        min-width: 44px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   #2 — INLINE STYLE REPLACEMENTS
   All CSS classes that replace template literal inline styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Generic Layout Helpers ── */
.v11-center-text { text-align: center; }
.v11-flex { display: flex; }
.v11-flex-col { display: flex; flex-direction: column; }
.v11-flex-center { display: flex; align-items: center; justify-content: center; }
.v11-flex-between { display: flex; justify-content: space-between; }
.v11-flex-wrap { flex-wrap: wrap; }
.v11-flex-1 { flex: 1; }
.v11-gap-8 { gap: 8px; }
.v11-gap-10 { gap: 10px; }
.v11-gap-15 { gap: 15px; }
.v11-gap-20 { gap: 20px; }
.v11-gap-30 { gap: 30px; }
.v11-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v11-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.v11-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.v11-w-full { width: 100%; }
.v11-ml-auto { margin-left: auto; }

/* ── Section Label ── */
.v11-section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* ── Stat Cards (used in profiles, interrogation, expedient) ── */
.v11-stat-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.v11-stat-card--lg {
    padding: 15px;
}
.v11-stat-value {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 5px 0;
}
.v11-stat-value--lg { font-size: 1.3rem; }
.v11-stat-value--xl { font-size: 2rem; }
.v11-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.v11-stat-icon { font-size: 1.4rem; }

/* Color utilities for stat values */
.v11-c-green { color: var(--neon-green); }
.v11-c-cyan { color: var(--neon-cyan); }
.v11-c-gold { color: var(--neon-gold); }
.v11-c-magenta { color: var(--neon-magenta); }
.v11-c-purple { color: var(--neon-purple); }
.v11-c-orange { color: var(--neon-orange); }
.v11-c-red { color: var(--neon-red); }
.v11-c-muted { color: var(--text-muted); }
.v11-c-light { color: var(--text-light); }

/* ── Progress Bars ── */
.v11-progress-wrapper {
    margin-bottom: 20px;
}
.v11-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.v11-progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.v11-progress-track--lg { height: 10px; border-radius: 5px; }
.v11-progress-fill {
    height: 100%;
    transition: width 1s ease;
    border-radius: inherit;
}

/* ── Modal/Profile Layout ── */
.v11-modal-avatar {
    font-size: 4rem;
    margin-bottom: 10px;
}
.v11-modal-name-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-cyan);
    color: var(--text-light);
    padding: 10px;
    font-family: var(--font-display);
    text-align: center;
    width: 220px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}
.v11-modal-rank {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-cyan);
}

/* ── Avatar Selector ── */
.v11-avatar-btn {
    font-size: 1.4rem;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}
.v11-avatar-btn:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.15);
}
.v11-avatar-btn.selected {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

/* ── Expedient Modal ── */
.v11-expedient-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}
.v11-expedient-avatar { font-size: 4rem; }
.v11-expedient-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-light);
}
.v11-expedient-rank {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-gold);
}
.v11-expedient-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Profile Block (criminological profile inside expedient) ── */
.v11-profile-block {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border-left: 3px solid var(--text-muted);
}
.v11-profile-block--typed {
    border-left-width: 3px;
    border-left-style: solid;
}
.v11-profile-type {
    font-family: var(--font-display);
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.v11-profile-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.v11-profile-traits {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.v11-profile-trait-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* ── Achievement Grid (inside expedient) ── */
.v11-achievement-cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: default;
    transition: transform 0.2s, box-shadow 0.2s;
}
.v11-achievement-cell:hover {
    transform: scale(1.15);
}
.v11-achievement-cell--locked {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.3;
}
.v11-achievement-cell--unlocked {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid var(--neon-gold);
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.1);
}

/* ── Expedient Footer Stamp ── */
.v11-stamp {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.v11-stamp-title {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 5px;
}
.v11-stamp-id {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ── Interrogation ── */
.v11-interrogation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.v11-char-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.v11-char-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.v11-char-card:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}
.v11-char-card__icon { font-size: 3.5rem; margin-bottom: 10px; }
.v11-char-card__name { font-family: var(--font-display); font-size: 1rem; }
.v11-char-card__sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-top: 5px; }

/* Interrogation Room */
.v11-interrog-room { max-width: 800px; margin: 0 auto; }
.v11-interrog-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid;
}
.v11-interrog-header__icon { font-size: 2.5rem; }
.v11-interrog-header__name { font-family: var(--font-display); }
.v11-interrog-header__sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.v11-interrog-header__score { font-family: var(--font-mono); font-size: 0.7rem; color: var(--neon-gold); }
.v11-interrog-header__insights { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

.v11-interrog-body {
    background: var(--bg-card);
    border: 1px solid;
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 25px;
    min-height: 300px;
}
.v11-interrog-intro { color: var(--text-muted); font-style: italic; margin-bottom: 20px; }

.v11-dialogue {
    margin-bottom: 20px;
    animation: v11-fadeIn 0.5s ease;
}
.v11-dialogue__speaker {
    font-family: var(--font-display);
    font-size: 0.8rem;
    margin-bottom: 8px;
}
.v11-dialogue__text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* Interrogation Options */
.v11-interrog-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    margin-bottom: 8px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}
.v11-interrog-option:hover, .v11-interrog-option:focus-visible {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.12);
    transform: translateX(4px);
}
.v11-interrog-option__prompt {
    color: var(--neon-cyan);
    margin-right: 8px;
}

/* Interrogation Ending */
.v11-interrog-ending {
    margin-top: 25px;
    padding: 25px;
    border: 2px solid;
    border-radius: var(--radius-md);
    animation: v11-fadeIn 0.5s ease;
}
.v11-interrog-ending--full { background: rgba(0, 255, 136, 0.08); border-color: var(--neon-green); }
.v11-interrog-ending--partial { background: rgba(255, 215, 0, 0.08); border-color: var(--neon-gold); }
.v11-interrog-ending__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.v11-interrog-ending__desc {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

/* ── File Modal (Nexus Expedientes) ── */
.v11-file-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}
@media (max-width: 768px) {
    .v11-file-layout { grid-template-columns: 1fr; }
}
.v11-file-avatar { font-size: 5rem; margin-bottom: 15px; }
.v11-file-alias { font-family: var(--font-display); }
.v11-file-section-title {
    color: var(--neon-cyan);
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.v11-file-quote {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Stat Bar */
.v11-stat-bar { margin-bottom: 8px; }
.v11-stat-bar__header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.v11-stat-bar__track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.v11-stat-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Compare Slot Content ── */
.v11-compare-content {
    text-align: center;
    padding: 20px;
}
.v11-compare-icon { font-size: 4rem; margin-bottom: 10px; }
.v11-compare-name { font-family: var(--font-display); }
.v11-compare-media { color: var(--text-muted); font-size: 0.8rem; }
.v11-compare-stats { margin-top: 20px; }

/* ── Story End Screen ── */
.v11-story-end {
    text-align: center;
    padding: 50px 20px;
}
.v11-story-end__title {
    font-family: var(--font-display);
    color: var(--neon-purple);
    margin-bottom: 20px;
    font-size: 1.8rem;
}
.v11-story-end__subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}
.v11-story-end__stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   #7 — ONBOARDING SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.onboarding-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Dark backdrop with hole cut-out */
.onboarding-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 10001;
    transition: opacity 0.4s;
}

/* Spotlight cutout ring */
.onboarding-spotlight {
    position: absolute;
    z-index: 10002;
    border-radius: var(--radius-md);
    box-shadow:
        0 0 0 4px var(--neon-cyan),
        0 0 0 9999px rgba(0, 0, 0, 0.82),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}
.onboarding-spotlight::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px dashed rgba(0, 255, 255, 0.3);
    border-radius: inherit;
    animation: v11-spotlight-pulse 2s ease-in-out infinite;
}

/* Tooltip card */
.onboarding-tooltip {
    position: absolute;
    z-index: 10003;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, rgba(12, 12, 20, 0.98), rgba(20, 20, 35, 0.98));
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
}
.onboarding-overlay.active .onboarding-tooltip {
    transform: translateY(0);
    opacity: 1;
}

.onboarding-tooltip__step {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.onboarding-tooltip__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.3;
}
.onboarding-tooltip__desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.onboarding-tooltip__progress {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
}
.onboarding-tooltip__dot {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}
.onboarding-tooltip__dot.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.4);
}
.onboarding-tooltip__dot.done {
    background: var(--neon-green);
}

.onboarding-tooltip__actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}
.onboarding-btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.onboarding-btn--primary {
    background: var(--gradient-cyber);
    color: var(--bg-primary);
    font-weight: 700;
}
.onboarding-btn--primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}
.onboarding-btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.onboarding-btn--ghost:hover {
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Welcome Modal */
.onboarding-welcome {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.onboarding-welcome.active { opacity: 1; }

.onboarding-welcome__card {
    max-width: 500px;
    width: calc(100% - 40px);
    background: linear-gradient(160deg, rgba(10, 10, 20, 0.98), rgba(18, 18, 30, 0.98));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 0 80px rgba(0, 255, 255, 0.08);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.onboarding-welcome.active .onboarding-welcome__card {
    transform: scale(1);
}
.onboarding-welcome__icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
}
.onboarding-welcome__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text-light);
    margin-bottom: 10px;
}
.onboarding-welcome__subtitle {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}
.onboarding-welcome__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}


/* ═══════════════════════════════════════════════════════════════════════════
   #8 — SECTION TRANSITIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Transition overlay that sweeps between sections */
.section-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
}
.section-transition-overlay.active {
    opacity: 1;
}

/* Glitch bars on section enter */
.section-glitch-bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--neon-cyan);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
}
.section-glitch-bar.animate {
    animation: v11-glitch-sweep 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Section enter text flash */
.section-flash-label {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 8px;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    white-space: nowrap;
}
.section-flash-label.animate {
    animation: v11-flash-text 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Section content reveal (stagger children) */
.section.v11-entering .section-header {
    animation: v11-slide-up 0.6s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}
.section.v11-entering .category-card,
.section.v11-entering .theory-card,
.section.v11-entering .episode-card,
.section.v11-entering .course-card,
.section.v11-entering .lab-station,
.section.v11-entering .minigame-card {
    opacity: 0;
    animation: v11-slide-up 0.5s ease forwards;
}
.section.v11-entering > *:nth-child(1) { animation-delay: 0.1s; }
.section.v11-entering > *:nth-child(2) { animation-delay: 0.2s; }
.section.v11-entering > *:nth-child(3) { animation-delay: 0.3s; }


/* ═══════════════════════════════════════════════════════════════════════════
   #9 — CASO COMPLETO (Unified Case Flow)
   ═══════════════════════════════════════════════════════════════════════════ */

.caso-completo-bar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 190;
    background: linear-gradient(180deg, rgba(10, 10, 18, 0.96), rgba(10, 10, 18, 0.9));
    border-bottom: 1px solid rgba(0, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.caso-completo-bar.active { transform: translateY(0); }

.caso-completo-bar__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    white-space: nowrap;
}
.caso-completo-bar__steps {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.caso-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s;
    cursor: default;
    white-space: nowrap;
}
.caso-step.active {
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.08);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.1);
}
.caso-step.done {
    color: var(--neon-green);
    border-color: rgba(0, 255, 136, 0.2);
}
.caso-step__icon { font-size: 0.9rem; }
.caso-step__connector {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.caso-step__connector.done { background: var(--neon-green); }

.caso-completo-bar__close {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.caso-completo-bar__close:hover {
    color: var(--neon-red);
    border-color: var(--neon-red);
}

/* Caso Completo launch button */
.caso-launch-card {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
    border: 2px dashed rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 20px;
}
.caso-launch-card:hover {
    border-color: var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.12);
}
.caso-launch-card__icon { font-size: 2.5rem; margin-bottom: 12px; }
.caso-launch-card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--neon-cyan);
    margin-bottom: 6px;
}
.caso-launch-card__desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   #10 — PROGRESS PANEL (floating skill tree widget)
   ═══════════════════════════════════════════════════════════════════════════ */

.progress-panel-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 195;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 2px solid rgba(0, 255, 255, 0.3);
    color: var(--neon-cyan);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.progress-panel-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 255, 255, 0.2);
}
/* XP ring around toggle */
.progress-panel-toggle__ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--neon-cyan);
    transition: transform 0.3s;
}

.progress-panel {
    position: fixed;
    bottom: 82px;
    right: 20px;
    z-index: 194;
    width: 320px;
    max-height: 70vh;
    background: linear-gradient(160deg, rgba(10, 10, 18, 0.98), rgba(16, 16, 28, 0.98));
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.progress-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.progress-panel__header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}
.progress-panel__rank-icon { font-size: 1.6rem; }
.progress-panel__rank-info { flex: 1; }
.progress-panel__rank-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-light);
}
.progress-panel__rank-level {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-cyan);
}

.progress-panel__xp-bar {
    margin: 0 20px 16px;
}
.progress-panel__xp-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}
.progress-panel__xp-fill {
    height: 100%;
    background: var(--gradient-cyber);
    border-radius: 3px;
    transition: width 0.8s ease;
}
.progress-panel__xp-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

/* Skill Tree Grid */
.progress-panel__skills {
    padding: 0 20px 16px;
    overflow-y: auto;
    max-height: calc(70vh - 200px);
}
.skill-node {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.skill-node:last-child { border-bottom: none; }
.skill-node__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: all 0.3s;
}
.skill-node--complete .skill-node__icon {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}
.skill-node__info { flex: 1; min-width: 0; }
.skill-node__name {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
}
.skill-node__progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}
.skill-node__progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}
.skill-node__value {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Footer in panel */
.progress-panel__footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.progress-panel__btn {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 1px;
    padding: 8px 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 255, 255, 0.05);
    color: var(--neon-cyan);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}
.progress-panel__btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
}


/* ═══════════════════════════════════════════════════════════════════════════
   #11 — MICRO-ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Nexus nodes pulsing for new info */
.nexus-node.has-update .node-pulse {
    animation: v11-node-beacon 2s ease-in-out infinite;
}
.nexus-node.has-update .node-ring {
    animation: v11-ring-glow 2.5s ease-in-out infinite;
}

/* Theory cards: "page flip" effect on hover */
.theory-card {
    perspective: 800px;
    transform-style: preserve-3d;
}
.theory-card:hover {
    transform: rotateY(-3deg) rotateX(2deg) translateY(-4px);
    box-shadow: 8px 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 255, 255, 0.08);
}

/* Category cards: neon border sweep */
.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(var(--angle, 0deg), transparent 40%, var(--neon-cyan) 50%, transparent 60%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.4s;
}
.category-card:hover::after {
    opacity: 1;
    animation: v11-border-sweep 2s linear infinite;
}

/* Episode cards: dramatic reveal */
.episode-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.episode-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(153, 51, 255, 0.1);
}
.episode-card:hover .episode-number {
    text-shadow: 0 0 10px currentColor;
}

/* Buttons: subtle pulse on important actions */
.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: none;
}
.btn-primary:hover::after {
    animation: v11-btn-shimmer 0.8s ease forwards;
}

/* Achievement popup enhanced entrance */
.achievement-popup.show {
    animation: v11-achievement-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Stats bar counter animation */
.stats-bar .stat-value {
    transition: color 0.3s;
}
.stats-bar .stat-item:hover .stat-value {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Interrogation option slide-in */
.v11-interrog-option {
    opacity: 0;
    transform: translateX(-15px);
    animation: v11-option-slide 0.4s ease forwards;
}
.v11-interrog-option:nth-child(2) { animation-delay: 0.08s; }
.v11-interrog-option:nth-child(3) { animation-delay: 0.16s; }
.v11-interrog-option:nth-child(4) { animation-delay: 0.24s; }

/* Smooth loading for sections */
.v11-lazy-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.v11-lazy-section.loaded {
    opacity: 1;
    transform: translateY(0);
}


/* ═══════════════════════════════════════════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes v11-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes v11-slide-up {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes v11-spotlight-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes v11-glitch-sweep {
    0% { transform: scaleX(0); opacity: 1; }
    50% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
}

@keyframes v11-flash-text {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); letter-spacing: 20px; }
    20% { opacity: 1; }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1); letter-spacing: 8px; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); letter-spacing: 4px; }
}

@keyframes v11-border-sweep {
    to { --angle: 360deg; }
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes v11-btn-shimmer {
    to { transform: translateX(100%); }
}

@keyframes v11-node-beacon {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes v11-ring-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
}

@keyframes v11-achievement-enter {
    0% { transform: translateX(120%) scale(0.8); opacity: 0; }
    60% { transform: translateX(-5%) scale(1.02); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes v11-option-slide {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes v11-xp-ring-rotate {
    to { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .caso-completo-bar {
        padding: 8px 12px;
        overflow-x: auto;
        gap: 8px;
    }
    .caso-step { padding: 5px 10px; font-size: 0.6rem; }
    .caso-step__connector { width: 10px; }
    .caso-completo-bar__label { display: none; }

    .progress-panel {
        right: 10px;
        width: calc(100vw - 20px);
        bottom: 72px;
    }
    .progress-panel-toggle {
        width: 46px;
        height: 46px;
        bottom: 15px;
        right: 15px;
    }

    .onboarding-tooltip {
        width: calc(100vw - 30px);
        padding: 22px;
    }

    .v11-file-layout {
        grid-template-columns: 1fr;
    }

    .v11-interrog-header {
        flex-wrap: wrap;
    }

    .v11-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .v11-grid-3 { grid-template-columns: 1fr; }
    .v11-grid-2 { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════════════════════════════════════
   KRIMINIS v12.0 — STYLES
   #1 Modo Noir  |  #2 Informe PDF  |  #3 ARG Easter Eggs
   #4 Modo Podcast  |  #5 Temporadas  |  #6 Reconstrucción de Escena
   #7 Tablero de Evidencias
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   #1 — MODO NOIR
   Full B&W + red accent visual mode with serif typography
   ─────────────────────────────────────────────────────────────────────────  */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

body.noir-mode {
    --noir-bg: #0a0a0a;
    --noir-surface: #141414;
    --noir-text: #d4d0c8;
    --noir-accent: #8b0000;
    --noir-accent-bright: #cc1100;
    --noir-muted: #666;
    --noir-border: #333;
    --noir-highlight: #f5f0e8;
    --font-noir-title: 'Playfair Display', 'Georgia', serif;
    --font-noir-body: 'Lora', 'Times New Roman', serif;
    filter: saturate(0.08) contrast(1.1);
}

body.noir-mode .noir-accent-el,
body.noir-mode .btn-primary,
body.noir-mode .btn-danger,
body.noir-mode .neon-red,
body.noir-mode .achievement-popup,
body.noir-mode .caso-completo-bar,
body.noir-mode .streak-badge {
    filter: saturate(12) !important;
}

body.noir-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(139,0,0,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

body.noir-mode * {
    font-family: var(--font-noir-body) !important;
}

body.noir-mode h1, body.noir-mode h2, body.noir-mode h3,
body.noir-mode .section-title, body.noir-mode .hero-title,
body.noir-mode .logo, body.noir-mode .category-name,
body.noir-mode .theory-title, body.noir-mode .episode-title {
    font-family: var(--font-noir-title) !important;
    font-style: italic;
}

body.noir-mode .hero-subtitle,
body.noir-mode .section-tag {
    font-family: var(--font-noir-body) !important;
    font-style: italic;
    letter-spacing: 0.1em;
}

body.noir-mode .hero-title .glitch-text {
    animation: none !important;
    text-shadow: 2px 2px 0 rgba(139,0,0,0.3);
}

body.noir-mode .cyber-grid,
body.noir-mode .ambient-orb {
    display: none !important;
}

body.noir-mode .film-grain {
    opacity: 0.12 !important;
}

body.noir-mode .crt-scanlines {
    opacity: 0.03 !important;
}

body.noir-mode .vignette-overlay {
    opacity: 1 !important;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.8) 100%) !important;
}

/* Noir rain effect */
body.noir-mode .rain-overlay {
    opacity: 0.4 !important;
}

/* Noir narrative overlay */
.noir-narrator {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 700px;
    width: 90%;
    background: rgba(10,10,10,0.95);
    border: 1px solid #333;
    border-left: 3px solid #8b0000;
    padding: 20px 25px;
    font-family: 'Lora', serif !important;
    font-style: italic;
    color: #d4d0c8;
    font-size: 0.95rem;
    line-height: 1.8;
    z-index: 9990;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.noir-narrator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.noir-narrator::before {
    content: '» ';
    color: #8b0000;
    font-weight: bold;
}

/* ─────────────────────────────────────────────────────────────────────────
   #2 — INFORME POLICIAL PDF
   ─────────────────────────────────────────────────────────────────────────  */
.pdf-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid var(--neon-gold, #ffd700);
    color: var(--neon-gold, #ffd700);
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
    margin-top: 15px;
}

.pdf-report-btn:hover {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.pdf-generating {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    border: 1px solid var(--neon-cyan, #0ff);
    padding: 40px;
    text-align: center;
    z-index: 99999;
    border-radius: 8px;
}

.pdf-generating .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--neon-cyan, #0ff);
    border-radius: 50%;
    animation: pdfSpin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes pdfSpin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────────────────
   #3 — ARG EASTER EGGS
   ─────────────────────────────────────────────────────────────────────────  */
.arg-clue-found {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.95);
    border: 1px solid #8b0000;
    border-left: 3px solid #ff0000;
    padding: 15px 20px;
    z-index: 99999;
    max-width: 350px;
    animation: argSlideIn 0.5s ease;
    box-shadow: 0 5px 30px rgba(139,0,0,0.3);
}

@keyframes argSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.arg-clue-found__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: #ff0000;
    letter-spacing: 2px;
}

.arg-clue-found__text {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
}

.arg-clue-found__progress {
    margin-top: 10px;
    display: flex;
    gap: 4px;
}

.arg-clue-found__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    transition: background 0.3s;
}

.arg-clue-found__dot.found {
    background: #ff0000;
    box-shadow: 0 0 6px rgba(255,0,0,0.5);
}

/* Hidden source code clue */
.arg-source-clue {
    display: none;
    /* ARG_CLUE: La primera víctima fue encontrada en coordenadas 40.4168, -3.7038 */
    /* Busca "CASO CERO" en el terminal para continuar... */
}

/* ARG Secret Case Modal */
.arg-secret-case {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.97);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: argFadeIn 1s ease;
}

@keyframes argFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.arg-secret-case__inner {
    max-width: 650px;
    width: 90%;
    border: 1px solid #8b0000;
    background: #0a0a0a;
    padding: 0;
    max-height: 80vh;
    overflow-y: auto;
}

.arg-secret-case__header {
    background: linear-gradient(135deg, #1a0000, #2a0000);
    padding: 25px 30px;
    border-bottom: 1px solid #8b0000;
    text-align: center;
}

.arg-secret-case__header h2 {
    font-family: var(--font-display, monospace);
    color: #ff0000;
    letter-spacing: 3px;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.arg-secret-case__header p {
    color: #666;
    font-size: 0.8rem;
    font-family: var(--font-mono, monospace);
}

.arg-secret-case__body {
    padding: 30px;
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.8;
}

.arg-secret-case__body .classified {
    color: #ff0000;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    border: 1px dashed #8b0000;
}

.arg-secret-case__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: 1px solid #333;
    color: #666;
    font-size: 1.2rem;
    padding: 5px 10px;
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────────────
   #4 — MODO PODCAST
   ─────────────────────────────────────────────────────────────────────────  */
.podcast-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(10,10,15,0.98), rgba(5,5,10,1));
    border-top: 1px solid rgba(0,255,255,0.2);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.podcast-player.active {
    transform: translateY(0);
}

.podcast-player__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.podcast-player__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0,255,255,0.3);
    background: rgba(0,255,255,0.05);
    color: var(--neon-cyan, #0ff);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.podcast-player__btn:hover {
    background: rgba(0,255,255,0.15);
    border-color: var(--neon-cyan, #0ff);
}

.podcast-player__btn--play {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, rgba(0,255,255,0.15), rgba(255,0,255,0.1));
    border: 1px solid var(--neon-cyan, #0ff);
}

.podcast-player__info {
    flex: 1;
    min-width: 0;
}

.podcast-player__title {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    color: var(--neon-cyan, #0ff);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.podcast-player__text {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.podcast-player__wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 30px;
}

.podcast-player__wave span {
    width: 3px;
    background: var(--neon-cyan, #0ff);
    border-radius: 2px;
    animation: podcastWave 1.2s ease-in-out infinite;
    opacity: 0.7;
}

.podcast-player__wave span:nth-child(1) { height: 30%; animation-delay: 0s; }
.podcast-player__wave span:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.podcast-player__wave span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.podcast-player__wave span:nth-child(4) { height: 60%; animation-delay: 0.3s; }
.podcast-player__wave span:nth-child(5) { height: 30%; animation-delay: 0.4s; }

.podcast-player.paused .podcast-player__wave span {
    animation-play-state: paused;
}

@keyframes podcastWave {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.podcast-player__speed {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    padding: 4px 8px;
    border: 1px solid #333;
    background: rgba(255,255,255,0.05);
    color: #999;
    cursor: pointer;
    border-radius: 4px;
}

.podcast-player__close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

/* ─────────────────────────────────────────────────────────────────────────
   #5 — SISTEMA DE TEMPORADAS
   ─────────────────────────────────────────────────────────────────────────  */
.seasons-section .season-banner {
    position: relative;
    background: linear-gradient(135deg, #0a001a 0%, #1a002a 50%, #0a0015 100%);
    border: 1px solid rgba(139,0,139,0.3);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    overflow: hidden;
}

.season-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0z' fill='none'/%3E%3Cpath d='M0 20h40M20 0v40' stroke='rgba(139,0,139,0.08)' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}

.season-banner__tag {
    display: inline-block;
    background: rgba(139,0,139,0.2);
    border: 1px solid rgba(139,0,139,0.4);
    padding: 4px 12px;
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: #da70d6;
    margin-bottom: 15px;
}

.season-banner__title {
    font-family: var(--font-display, monospace);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 8px;
}

.season-banner__subtitle {
    color: #999;
    font-size: 0.9rem;
    max-width: 500px;
}

.season-banner__villain {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.15;
}

.season-timeline {
    display: flex;
    gap: 0;
    position: relative;
    padding: 20px 0;
}

.season-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(139,0,139,0.4), rgba(0,255,255,0.4));
}

.season-month {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 10px 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.season-month:hover {
    transform: translateY(-5px);
}

.season-month__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    margin: 0 auto 10px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.season-month.active .season-month__dot {
    background: var(--neon-cyan, #0ff);
    border-color: var(--neon-cyan, #0ff);
    box-shadow: 0 0 15px rgba(0,255,255,0.5);
}

.season-month.completed .season-month__dot {
    background: var(--neon-green, #0f8);
    border-color: var(--neon-green, #0f8);
}

.season-month.locked .season-month__dot {
    background: #222;
    border-color: #444;
}

.season-month__label {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 1px;
}

.season-month.active .season-month__label {
    color: var(--neon-cyan, #0ff);
}

.season-content-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.season-content-card__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.season-content-card__icon {
    font-size: 2rem;
}

.season-content-card__title {
    font-family: var(--font-display, monospace);
    font-size: 1.1rem;
    color: #fff;
}

.season-content-card__subtitle {
    font-size: 0.75rem;
    color: #666;
    font-family: var(--font-mono, monospace);
}

.season-episodes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.season-ep-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.season-ep-card:hover {
    border-color: rgba(0,255,255,0.3);
    transform: translateY(-2px);
}

.season-ep-card.locked {
    opacity: 0.4;
    pointer-events: none;
}

.season-ep-card__number {
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    color: var(--neon-cyan, #0ff);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.season-ep-card__title {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 6px;
}

.season-ep-card__desc {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.5;
}

.season-ep-card__lock {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.7rem;
    color: #555;
}

/* ─────────────────────────────────────────────────────────────────────────
   #6 — RECONSTRUCCIÓN DE ESCENA (Drag & Drop)
   ─────────────────────────────────────────────────────────────────────────  */
.scene-reconstruction {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.scene-reconstruction__canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(180deg, #0a0a12 0%, #12121f 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.scene-reconstruction__bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.scene-reconstruction__room {
    position: absolute;
    inset: 5%;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Furniture items in scene */
.scene-furniture {
    position: absolute;
    font-size: 1.8rem;
    opacity: 0.3;
    pointer-events: none;
}

/* Drop zones */
.scene-drop-zone {
    position: absolute;
    border: 2px dashed rgba(0,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: rgba(0,255,255,0.02);
}

.scene-drop-zone.highlight {
    border-color: rgba(0,255,255,0.6);
    background: rgba(0,255,255,0.08);
    box-shadow: 0 0 15px rgba(0,255,255,0.15);
}

.scene-drop-zone.correct {
    border-color: rgba(0,255,136,0.6);
    background: rgba(0,255,136,0.08);
}

.scene-drop-zone.incorrect {
    border-color: rgba(255,0,0,0.6);
    background: rgba(255,0,0,0.08);
    animation: sceneShake 0.4s;
}

@keyframes sceneShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.scene-drop-zone__label {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: rgba(0,255,255,0.4);
    letter-spacing: 1px;
    text-align: center;
    pointer-events: none;
}

/* Draggable evidence items */
.scene-evidence-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    margin-top: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}

.scene-evidence-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.3s;
    user-select: none;
    font-size: 0.85rem;
}

.scene-evidence-item:active {
    cursor: grabbing;
}

.scene-evidence-item:hover {
    border-color: rgba(0,255,255,0.4);
    background: rgba(0,255,255,0.05);
}

.scene-evidence-item.placed {
    opacity: 0.3;
    pointer-events: none;
    border-style: dashed;
}

.scene-evidence-item__icon {
    font-size: 1.2rem;
}

.scene-evidence-item__name {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: #ccc;
}

.scene-reconstruction__hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.scene-hud__score {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    color: var(--neon-cyan, #0ff);
}

.scene-hud__timer {
    font-family: var(--font-mono, monospace);
    font-size: 0.9rem;
    color: var(--neon-gold, #ffd700);
}

.scene-result {
    text-align: center;
    padding: 30px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,255,255,0.2);
    border-radius: 8px;
    margin-top: 20px;
}

.scene-result__stars {
    font-size: 2rem;
    margin: 10px 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   #7 — TABLERO DE EVIDENCIAS (Detective Board)
   ─────────────────────────────────────────────────────────────────────────  */
.evidence-board-section {
    position: relative;
}

.evidence-board {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #1a1812 0%, #231f17 100%);
    border: 3px solid #3a3020;
    border-radius: 4px;
    overflow: hidden;
    cursor: default;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.5);
}

.evidence-board::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100' height='100' fill='none'/%3E%3Cline x1='0' y1='0' x2='100' y2='100' stroke='rgba(100,80,50,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Toolbar */
.evidence-board__toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(0,0,0,0.5);
    border-bottom: 1px solid #3a3020;
}

.board-tool {
    padding: 6px 12px;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    border: 1px solid #3a3020;
    background: rgba(0,0,0,0.3);
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.board-tool:hover, .board-tool.active {
    border-color: var(--neon-cyan, #0ff);
    color: var(--neon-cyan, #0ff);
}

.board-tool--clear {
    margin-left: auto;
    color: #ff4444;
    border-color: #ff4444;
}

/* Board canvas area */
.evidence-board__canvas {
    position: relative;
    width: 100%;
    height: calc(100% - 45px);
    overflow: auto;
}

/* Pinned items on the board */
.board-pin {
    position: absolute;
    min-width: 120px;
    max-width: 200px;
    cursor: move;
    user-select: none;
    z-index: 2;
    transition: box-shadow 0.3s;
}

.board-pin:hover {
    z-index: 10;
}

.board-pin.dragging {
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Photo pin */
.board-pin--photo {
    background: #f5f0e0;
    padding: 8px 8px 25px;
    transform: rotate(var(--pin-rotation, -2deg));
    box-shadow: 2px 3px 10px rgba(0,0,0,0.4);
}

.board-pin--photo .pin-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 1px solid #ccc;
}

.board-pin--photo .pin-caption {
    font-size: 0.65rem;
    color: #333;
    text-align: center;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Note pin (sticky note) */
.board-pin--note {
    background: #fef68a;
    padding: 15px;
    min-height: 80px;
    transform: rotate(var(--pin-rotation, 1deg));
    box-shadow: 2px 3px 10px rgba(0,0,0,0.3);
}

.board-pin--note .pin-text {
    font-size: 0.75rem;
    color: #333;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.4;
    word-break: break-word;
}

.board-pin--note.editing .pin-text {
    outline: none;
    min-height: 60px;
}

/* Tack/pin on top */
.board-pin__tack {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #ff6666, #cc0000);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    z-index: 3;
}

/* Red thread lines (SVG) */
.board-threads {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.board-threads line {
    stroke: #cc0000;
    stroke-width: 1.5;
    opacity: 0.7;
    stroke-dasharray: none;
}

.board-threads line.dashed {
    stroke-dasharray: 6 4;
    opacity: 0.4;
}

/* Suspect card on board */
.board-pin--suspect {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
    transform: rotate(var(--pin-rotation, 0deg));
    box-shadow: 2px 3px 10px rgba(0,0,0,0.5);
}

.board-pin--suspect .suspect-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.board-pin--suspect .suspect-name {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    color: #ccc;
    letter-spacing: 1px;
}

.board-pin--suspect .suspect-status {
    font-size: 0.6rem;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
}

.board-pin--suspect .suspect-status.prime {
    background: rgba(255,0,0,0.2);
    color: #ff4444;
    border: 1px solid rgba(255,0,0,0.3);
}

.board-pin--suspect .suspect-status.cleared {
    background: rgba(0,255,0,0.1);
    color: #0f8;
    border: 1px solid rgba(0,255,0,0.2);
}

/* Thread drawing mode */
.evidence-board__canvas.threading {
    cursor: crosshair;
}

/* Board item context menu */
.board-context-menu {
    position: fixed;
    background: rgba(0,0,0,0.95);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 5px 0;
    z-index: 99999;
    min-width: 150px;
}

.board-context-menu__item {
    padding: 8px 15px;
    font-size: 0.8rem;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-context-menu__item:hover {
    background: rgba(0,255,255,0.1);
    color: #fff;
}

.board-context-menu__item--danger {
    color: #ff4444;
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────────────────────  */
@media (max-width: 768px) {
    .podcast-player {
        flex-wrap: wrap;
        padding: 10px;
        gap: 8px;
    }
    .podcast-player__wave { display: none; }
    .podcast-player__info { order: -1; width: 100%; }

    .evidence-board { height: 400px; }

    .season-banner__villain { display: none; }
    .season-banner { padding: 25px; }
    .season-banner__title { font-size: 1.3rem; }

    .scene-reconstruction__canvas { aspect-ratio: 4/3; }

    .season-timeline { flex-wrap: wrap; gap: 5px; }
    .season-month { flex: 0 0 calc(25% - 4px); }
}
