/**
 * XSS 靶场 — Cyberpunk Digital War Room Theme
 * Design System: Neon dark, terminal HUD, glitch effects
 * Generated with ui-ux-pro-max + frontend-design principles
 */

/* ═══════════════════════════════════════════════════════════
   FONTS
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700;800;900&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════════════════════ */
:root {
    /* Background layers */
    --bg-void:       #020617;
    --bg-deep:       #0a0f1a;
    --bg-surface:    #0c1220;
    --bg-card:       #101828;
    --bg-elevated:   #151e30;
    --bg-hover:      #1a2540;

    /* Neon palette */
    --neon-cyan:     #00f0ff;
    --neon-green:    #22c55e;
    --neon-red:      #ef4444;
    --neon-purple:   #a855f7;
    --neon-orange:   #f97316;
    --neon-yellow:   #eab308;
    --neon-pink:     #ec4899;

    /* Semantic */
    --accent:        var(--neon-cyan);
    --accent-green:  var(--neon-green);
    --accent-red:    var(--neon-red);
    --accent-orange: var(--neon-orange);
    --accent-purple: var(--neon-purple);

    /* Text */
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-muted:    #475569;
    --text-code:     var(--neon-cyan);

    /* Borders */
    --border:        #1e293b;
    --border-glow:   rgba(0, 240, 255, 0.15);

    /* Glow intensities */
    --glow-sm:  0 0 6px;
    --glow-md:  0 0 12px;
    --glow-lg:  0 0 24px;
    --glow-xl:  0 0 48px;

    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body:    'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --gap: 1.5rem;
    --radius: 6px;
    --radius-lg: 10px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 200ms;

    /* Z-index scale */
    --z-base: 1;
    --z-sticky: 100;
    --z-overlay: 500;
    --z-modal: 1000;
    --z-toast: 1500;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

/* Scanline overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.012) 2px,
        rgba(0, 240, 255, 0.012) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Grid background */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(0, 240, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration) var(--ease-out);
}
a:hover { color: #fff; }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.88em;
}

pre {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

pre::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.03), transparent);
    pointer-events: none;
}

code {
    color: var(--text-code);
    background: rgba(0, 240, 255, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.3;
}

::selection {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR — HUD Style
   ═══════════════════════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 2rem;
    height: 56px;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(0, 240, 255, 0.04);
}

.nav-brand a {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.nav-brand a:hover {
    color: #fff;
    text-shadow: var(--glow-md) var(--neon-cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    transition: all var(--duration) var(--ease-out);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.nav-links a:hover {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.06);
}
.nav-links a.active {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    text-shadow: var(--glow-sm) var(--neon-cyan);
}

.nav-sep { color: var(--border); font-size: 0.9rem; }

.nav-current {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--neon-green);
    text-shadow: var(--glow-sm) var(--neon-green);
}

.nav-level-nav {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.nav-prev, .nav-next {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--duration) var(--ease-out);
}
.nav-prev:hover, .nav-next:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════════════════════ */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION — Home Page
   ═══════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    text-align: center;
    padding: 5rem 2rem 4rem;
    margin-bottom: 3rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, rgba(168, 85, 247, 0.03) 40%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 0.75rem;
    position: relative;
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}

.hero-subtitle .typed-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--neon-cyan);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 140px;
    position: relative;
    overflow: hidden;
    transition: all var(--duration) var(--ease-out);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0;
    transition: opacity var(--duration);
}

.stat-item:hover::before { opacity: 1; }
.stat-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
    transform: translateY(-2px);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    display: block;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY SECTIONS
   ═══════════════════════════════════════════════════════════ */
.category-section { margin-bottom: 3rem; }

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.category-badge {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    white-space: nowrap;
}

.category-badge.cat-basic    { background: rgba(0, 240, 255, 0.1); color: var(--neon-cyan); border: 1px solid rgba(0, 240, 255, 0.2); }
.category-badge.cat-bypass   { background: rgba(249, 115, 22, 0.1); color: var(--neon-orange); border: 1px solid rgba(249, 115, 22, 0.2); }
.category-badge.cat-advanced  { background: rgba(168, 85, 247, 0.1); color: var(--neon-purple); border: 1px solid rgba(168, 85, 247, 0.2); }
.category-badge.cat-special   { background: rgba(234, 179, 8, 0.1); color: var(--neon-yellow); border: 1px solid rgba(234, 179, 8, 0.2); }
.category-badge.cat-office    { background: rgba(236, 72, 153, 0.1); color: var(--neon-pink); border: 1px solid rgba(236, 72, 153, 0.2); }
.category-badge.cat-final     { background: rgba(239, 68, 68, 0.1); color: var(--neon-red); border: 1px solid rgba(239, 68, 68, 0.2); }

.category-title {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.category-desc {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════
   LEVEL CARDS — Grid
   ═══════════════════════════════════════════════════════════ */
.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.level-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.level-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    background: var(--bg-elevated);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 240, 255, 0.05);
}

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

.level-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.level-num {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.level-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.level-difficulty {
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.level-scenario {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   LEVEL LAYOUT — 3-Column (Old index.php)
   ═══════════════════════════════════════════════════════════ */
.level-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr 300px;
    gap: var(--gap);
    align-items: start;
}

@media (max-width: 1200px) {
    .level-layout {
        grid-template-columns: 1fr 1fr;
    }
    .hints-panel { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .level-layout {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   TUTORIAL PANEL (Old index.php)
   ═══════════════════════════════════════════════════════════ */
.tutorial-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative;
}

.tutorial-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.tutorial-panel h3 {
    font-size: 1rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.tutorial-panel h4 {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.tutorial-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.tutorial-panel ul { list-style: none; padding: 0; margin-bottom: 1rem; }

.tutorial-panel ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.tutorial-panel ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-size: 0.8rem;
}

.concept-box {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-left: 3px solid var(--neon-cyan);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.concept-box strong { color: var(--neon-cyan); }

/* ═══════════════════════════════════════════════════════════
   PRACTICE PANEL (Old index.php)
   ═══════════════════════════════════════════════════════════ */
.practice-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.practice-panel h3 {
    font-size: 1rem;
    color: var(--neon-green);
    text-shadow: var(--glow-sm) var(--neon-green);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.vulnerable-description {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-left: 3px solid var(--neon-red);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.vulnerable-description strong { color: var(--neon-red); }

/* Input group */
.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.payload-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    transition: all var(--duration) var(--ease-out);
}

.payload-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1), var(--glow-sm) rgba(0, 240, 255, 0.15);
}

.payload-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Buttons */
.btn {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.btn-primary:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 15px rgba(0, 240, 255, 0.05);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
}
.btn-success:hover {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
    color: #fff;
}

/* Target box */
.target-box {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    min-height: 60px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    position: relative;
}

.target-box.vulnerable {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(239, 68, 68, 0.3); }
    50% { border-color: rgba(239, 68, 68, 0.6); }
}

.target-box strong {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.output-area {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.filter-info {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.filter-info strong { color: var(--neon-orange); }

.source-code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius);
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    line-height: 1.6;
}

details summary {
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    padding: 0.5rem 0;
    user-select: none;
    transition: color var(--duration);
    list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.2s;
}
details[open] summary::before { transform: rotate(90deg); }
details summary:hover { color: var(--neon-green); }

/* ═══════════════════════════════════════════════════════════
   HINTS PANEL (Old index.php)
   ═══════════════════════════════════════════════════════════ */
.hints-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 72px;
}

.hints-panel h3 {
    font-size: 0.95rem;
    color: var(--neon-orange);
    text-shadow: var(--glow-sm) var(--neon-orange);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.hint-card {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    overflow: hidden;
    transition: border-color var(--duration);
}

.hint-card:hover { border-color: rgba(0, 240, 255, 0.2); }

.hint-solution { border-color: rgba(34, 197, 94, 0.2); }

.hint-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-align: left;
    transition: all var(--duration);
}

.hint-toggle:hover {
    background: rgba(0, 240, 255, 0.03);
    color: var(--text-primary);
}

.hint-icon { font-size: 0.85rem; flex-shrink: 0; }
.hint-title { flex: 1; }

.hint-content {
    padding: 0 0.85rem 0.85rem;
    border-top: 1px solid var(--border);
}

.hint-body {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-top: 0.75rem;
}

.hint-body p { margin-bottom: 0.5rem; }
.hint-body pre { margin: 0.5rem 0; font-size: 0.78rem; }
.hint-body code { font-size: 0.82rem; }

.hint-walkthrough {
    background: rgba(168, 85, 247, 0.05);
    border-color: rgba(168, 85, 247, 0.15);
    text-align: center;
}

.walkthrough-link {
    display: block;
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neon-purple);
    transition: all var(--duration);
}

.walkthrough-link:hover {
    color: #fff;
    text-shadow: var(--glow-sm) var(--neon-purple);
}

/* ═══════════════════════════════════════════════════════════
   STORY BANNER
   ═══════════════════════════════════════════════════════════ */
.story-banner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--neon-purple);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: var(--gap);
    position: relative;
    overflow: hidden;
}

.story-banner::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 200px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.03));
    pointer-events: none;
}

.story-label {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-purple);
    text-shadow: var(--glow-sm) var(--neon-purple);
    margin-bottom: 0.5rem;
}

.story-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.7;
}

.story-text strong { color: var(--text-primary); font-style: normal; }

.story-goal {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--neon-green);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   SOLUTION PAGE
   ═══════════════════════════════════════════════════════════ */
.solution-page { max-width: 900px; margin: 0 auto; }

.solution-page h1 {
    font-size: 1.8rem;
    color: var(--neon-green);
    text-shadow: var(--glow-md) var(--neon-green);
    margin-bottom: 0.5rem;
}

.solution-page .solution-subtitle {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.solution-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.solution-section h2 {
    font-size: 1.1rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.solution-section h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.solution-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.solution-section ul { list-style: none; padding: 0; margin-bottom: 1rem; }

.solution-section ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.solution-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
}

.defense-box {
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-left: 3px solid var(--neon-green);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.defense-box strong { color: var(--neon-green); }

/* ═══════════════════════════════════════════════════════════
   DIFFICULTY STARS — Neon Style
   ═══════════════════════════════════════════════════════════ */
.stars { display: inline-flex; gap: 2px; }

.star {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--neon-cyan);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.3;
    transition: all 0.2s;
}

.star.active {
    opacity: 1;
    filter: drop-shadow(0 0 3px var(--neon-cyan));
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes xss-success-flash {
    0%   { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
    50%  { box-shadow: 0 0 30px rgba(34, 197, 94, 0.3), inset 0 0 30px rgba(34, 197, 94, 0.05); }
    100% { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
}

.xss-success {
    animation: xss-success-flash 0.6s ease-out;
    border-color: var(--neon-green) !important;
}

@keyframes glitch {
    0%   { transform: translate(0); }
    20%  { transform: translate(-2px, 2px); }
    40%  { transform: translate(-2px, -2px); }
    60%  { transform: translate(2px, 2px); }
    80%  { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch-hover:hover { animation: glitch 0.3s ease-in-out; }

@keyframes neon-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.neon-pulse { animation: neon-pulse 2s ease-in-out infinite; }

/* Fade in up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer::before { content: '─── '; color: var(--border); }
.footer::after { content: ' ───'; color: var(--border); }

/* ═══════════════════════════════════════════════════════════
   MISSION BRIEFING SYSTEM
   ═══════════════════════════════════════════════════════════ */
.mission-briefing {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: var(--gap);
    position: relative;
    overflow: hidden;
}

.mission-briefing::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-red), var(--neon-orange), var(--neon-yellow));
}

.mission-briefing::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 3px,
        rgba(239, 68, 68, 0.008) 3px, rgba(239, 68, 68, 0.008) 6px
    );
    pointer-events: none;
}

.mission-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mission-tag {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-red);
    text-shadow: var(--glow-sm) var(--neon-red);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
}

.mission-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

/* Mission status badge */
.mission-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.mission-status.pending {
    color: var(--neon-orange);
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.mission-status.passed {
    color: var(--neon-green);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.mission-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mission-detail-item {
    font-size: 0.82rem;
}

.mission-detail-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.mission-detail-value {
    color: var(--text-secondary);
}

.mission-detail-value.identity { color: var(--neon-cyan); }
.mission-detail-value.target { color: var(--neon-orange); }

.mission-criteria {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.mission-criteria li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.3rem 0;
}

.mission-criteria li.criteria-met { color: var(--neon-green); }

.criteria-icon {
    font-size: 0.75rem;
    width: 1rem;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   SUCCESS OVERLAY
   ═══════════════════════════════════════════════════════════ */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-content {
    text-align: center;
    padding: 3rem;
}

.success-glitch {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--neon-green);
    text-shadow: var(--glow-lg) var(--neon-green);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Glitch effect on success text */
.success-glitch::before,
.success-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.success-glitch::before {
    color: var(--neon-cyan);
    animation: glitch-clip-1 2s infinite linear alternate-reverse;
    clip-path: inset(0 0 65% 0);
}

.success-glitch::after {
    color: var(--neon-pink);
    animation: glitch-clip-2 2s infinite linear alternate-reverse;
    clip-path: inset(65% 0 0 0);
}

@keyframes glitch-clip-1 {
    0% { clip-path: inset(0 0 85% 0); transform: translate(-2px); }
    20% { clip-path: inset(15% 0 65% 0); transform: translate(2px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(-1px); }
    60% { clip-path: inset(60% 0 20% 0); transform: translate(1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(-2px); }
    100% { clip-path: inset(0 0 85% 0); transform: translate(0); }
}

@keyframes glitch-clip-2 {
    0% { clip-path: inset(85% 0 0 0); transform: translate(2px); }
    20% { clip-path: inset(65% 0 15% 0); transform: translate(-2px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(1px); }
    60% { clip-path: inset(20% 0 60% 0); transform: translate(-1px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(2px); }
    100% { clip-path: inset(85% 0 0 0); transform: translate(0); }
}

.success-level {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.success-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   LEARN PAGE STYLES
   ═══════════════════════════════════════════════════════════ */

/* Progress bar */
.learn-progress {
    position: sticky;
    top: 56px;
    z-index: var(--z-sticky);
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.learn-progress-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
    border-radius: 2px;
    flex: 1;
    max-width: 200px;
    position: relative;
    overflow: hidden;
}

.learn-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

.learn-progress-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Learn content container */
.learn-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Learn header */
.learn-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.learn-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
}

.learn-tag {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
}

.learn-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
}

.learn-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    display: block;
    margin-top: 0.3rem;
}

.learn-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.learn-difficulty {
    color: var(--neon-cyan);
}

/* Learn sections */
.learn-section {
    margin-bottom: 2.5rem;
}

.learn-section h2 {
    font-size: 1.15rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.learn-section h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--neon-cyan);
}

.learn-section p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.learn-section strong { color: var(--text-primary); }

/* Callout box */
.learn-callout {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-left: 3px solid var(--neon-cyan);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin: 1.25rem 0;
    position: relative;
}

.learn-callout::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.02), transparent);
    pointer-events: none;
}

.learn-callout-title {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.learn-callout p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Attack flow */
.learn-flow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    overflow-x: auto;
}

.learn-flow-step {
    flex: 1;
    min-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s var(--ease-out);
}

.learn-flow-step:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.learn-flow-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
    opacity: 0.3;
    margin-bottom: 0.5rem;
}

.learn-flow-content strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.learn-flow-content p,
.learn-flow-content code {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.learn-flow-arrow {
    font-size: 1.2rem;
    color: var(--neon-cyan);
    opacity: 0.4;
    flex-shrink: 0;
}

/* Two column layout */
.learn-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1rem 0;
}

.learn-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.learn-col h3 {
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.learn-col p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.learn-col ul {
    list-style: none;
    padding: 0;
}

.learn-col ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.learn-col ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
}

/* Threats grid */
.learn-threats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.learn-threat {
    display: flex;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s var(--ease-out);
}

.learn-threat:hover {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.learn-threat-icon {
    font-size: 1.25rem;
    color: var(--neon-red);
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 4px;
}

.learn-threat-content strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.learn-threat-content p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   QUIZ SYSTEM
   ═══════════════════════════════════════════════════════════ */
.quiz-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.quiz-title {
    font-size: 1.1rem;
    color: var(--neon-purple);
    text-shadow: var(--glow-sm) var(--neon-purple);
    margin-bottom: 0.5rem;
}

.quiz-desc {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--neon-purple);
    opacity: 0.5;
    transition: opacity 0.3s;
}

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

.quiz-card.answered::before {
    background: var(--neon-green);
}

.quiz-question {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: flex;
    gap: 0.75rem;
}

.quiz-num {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--neon-purple);
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    white-space: nowrap;
    height: fit-content;
    margin-top: 0.1rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    text-align: left;
}

.quiz-option:hover:not(:disabled) {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.05);
    color: var(--text-primary);
}

.quiz-option:disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz-letter {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neon-purple);
    background: rgba(168, 85, 247, 0.08);
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.quiz-option.correct {
    border-color: var(--neon-green);
    background: rgba(34, 197, 94, 0.08);
    color: var(--neon-green);
    animation: correctPulse 0.5s ease-out;
}

.quiz-option.correct .quiz-letter {
    background: rgba(34, 197, 94, 0.15);
    color: var(--neon-green);
}

.quiz-option.wrong {
    border-color: var(--neon-red);
    background: rgba(239, 68, 68, 0.08);
    color: var(--neon-red);
    animation: wrongShake 0.4s ease-out;
}

.quiz-option.wrong .quiz-letter {
    background: rgba(239, 68, 68, 0.15);
    color: var(--neon-red);
}

@keyframes correctPulse {
    0% { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.2); }
    100% { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.quiz-explain {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: fadeInUp 0.3s var(--ease-out);
}

.quiz-explain.explain-correct {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.03);
}

.quiz-explain.explain-wrong {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.03);
}

.quiz-explain-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.explain-correct .quiz-explain-icon { color: var(--neon-green); }
.explain-wrong .quiz-explain-icon { color: var(--neon-red); }

.quiz-explain-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.quiz-result {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.quiz-score {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quiz-score-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neon-cyan);
    text-shadow: var(--glow-sm) var(--neon-cyan);
}

/* ═══════════════════════════════════════════════════════════
   ENTER LAB CTA
   ═══════════════════════════════════════════════════════════ */
.learn-cta {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.learn-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
}

.learn-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.learn-cta-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
}

.btn-enter-lab {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(34, 197, 94, 0.15));
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-lg);
    color: var(--neon-cyan);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-enter-lab::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn-enter-lab:hover::before { left: 100%; }

.btn-enter-lab:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(34, 197, 94, 0.25));
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2), 0 0 60px rgba(0, 240, 255, 0.05);
    color: #fff;
    transform: translateY(-2px);
}

.btn-enter-icon {
    font-size: 1.2rem;
}

.btn-enter-arrow {
    transition: transform 0.3s;
}

.btn-enter-lab:hover .btn-enter-arrow {
    transform: translateX(4px);
}

.learn-cta-hint {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 1rem;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════
   SIMULATED WEBSITE — Practice Page
   ═══════════════════════════════════════════════════════════ */

/* Shop header */
.shop-header {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.shop-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: #f97316;
    text-decoration: none;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.shop-search {
    flex: 1;
    max-width: 600px;
    display: flex;
}

.shop-search input {
    flex: 1;
    background: #020617;
    border: 1px solid #334155;
    color: #f1f5f9;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-family: var(--font-body);
    border-radius: 6px 0 0 6px;
    outline: none;
    transition: border-color 0.2s;
}

.shop-search input:focus { border-color: #f97316; }

.shop-search input::placeholder { color: #475569; }

.shop-search button {
    background: #f97316;
    border: none;
    color: #fff;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    transition: background 0.2s;
}

.shop-search button:hover { background: #ea580c; }

.shop-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.shop-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    font-family: var(--font-body);
    transition: color 0.2s;
}

.shop-nav a:hover { color: #f97316; }

/* Shop breadcrumb */
.shop-breadcrumb {
    padding: 0.75rem 2rem;
    font-size: 0.78rem;
    color: #475569;
    border-bottom: 1px solid #0f172a;
    font-family: var(--font-body);
}

.shop-breadcrumb a { color: #94a3b8; text-decoration: none; }
.shop-breadcrumb a:hover { color: #f97316; }

/* Shop results */
.shop-results {
    padding: 1.5rem 2rem;
    min-height: 60vh;
}

.shop-results-info {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
}

.shop-results-info strong { color: #f97316; }

/* Search highlight — vulnerable output */
.search-highlight {
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    color: #f1f5f9;
}

.search-highlight .label {
    font-size: 0.7rem;
    color: #f97316;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
    font-family: var(--font-mono);
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.product-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.08);
}

.product-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 2rem;
}

.product-name {
    font-size: 0.88rem;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-family: var(--font-body);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f97316;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
}

.product-meta {
    font-size: 0.72rem;
    color: #475569;
    font-family: var(--font-body);
}

/* Shop footer */
.shop-footer {
    background: #020617;
    border-top: 1px solid #0f172a;
    padding: 2rem;
    text-align: center;
    color: #475569;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════
   FLOATING MISSION PANEL (Practice Page HUD)
   ═══════════════════════════════════════════════════════════ */
.mission-panel {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 340px;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--radius-lg);
    z-index: var(--z-overlay);
    font-family: var(--font-mono);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Corner decorations */
.mission-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 12px; height: 12px;
    border-top: 2px solid var(--neon-cyan);
    border-left: 2px solid var(--neon-cyan);
    opacity: 0.5;
    pointer-events: none;
}

.mission-panel::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 12px; height: 12px;
    border-top: 2px solid var(--neon-cyan);
    border-right: 2px solid var(--neon-cyan);
    opacity: 0.5;
    pointer-events: none;
}

.mission-panel.collapsed .mission-panel-body { display: none; }

.mission-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 240, 255, 0.03);
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.mission-panel-header:hover {
    background: rgba(0, 240, 255, 0.06);
}

.mission-panel-tag {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--neon-red);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

.mission-panel-title {
    font-size: 0.72rem;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mission-panel-toggle {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.mission-panel.collapsed .mission-panel-toggle { transform: rotate(180deg); }

.mission-panel-body { padding: 1rem; }

.mission-info-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
}

.mission-info-label {
    color: var(--text-muted);
    min-width: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mission-info-value { color: var(--text-secondary); }
.mission-info-value.identity { color: var(--neon-cyan); }
.mission-info-value.target { color: var(--neon-orange); }

.mission-criteria {
    list-style: none;
    padding: 0.75rem 0 0;
    margin: 0.5rem 0 0;
    border-top: 1px solid var(--border);
}

.mission-criteria li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.2rem 0;
    transition: all 0.3s;
}

.mission-criteria li.criteria-met { color: var(--neon-green); }

.criteria-icon {
    font-size: 0.65rem;
    width: 1rem;
    text-align: center;
}

.mission-panel-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.btn-hint {
    flex: 1;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: var(--neon-orange);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-hint:hover {
    background: rgba(249, 115, 22, 0.15);
    border-color: var(--neon-orange);
}

.btn-next-level {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-next-level:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--neon-green);
}

/* ═══════════════════════════════════════════════════════════
   HINT DRAWER (Practice Page)
   ═══════════════════════════════════════════════════════════ */
.hint-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.hint-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hint-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(249, 115, 22, 0.15);
    z-index: calc(var(--z-overlay) + 1);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    padding: 1.5rem;
}

.hint-drawer.open { right: 0; }

.hint-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.hint-drawer-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--neon-orange);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hint-drawer-close {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.hint-drawer-close:hover {
    border-color: var(--neon-red);
    color: var(--neon-red);
}

/* Back to learn link */
.back-to-learn {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: calc(var(--z-sticky) + 1);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    background: rgba(2, 6, 23, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.back-to-learn:hover {
    color: var(--neon-cyan);
    border-color: rgba(0, 240, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   MATRIX RAIN BACKGROUND
   ═══════════════════════════════════════════════════════════ */
.matrix-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    opacity: 0.06;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    writing-mode: vertical-rl;
    white-space: nowrap;
    line-height: 1;
    animation: matrix-fall linear infinite;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* ═══════════════════════════════════════════════════════════
   CURSOR TRAIL
   ═══════════════════════════════════════════════════════════ */
#cursor-trail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

.cursor-dot {
    position: absolute;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 6px var(--neon-cyan);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    .nav-level-nav {
        width: 100%;
        justify-content: space-between;
    }
    .container { padding: 1rem; }
    .hero { padding: 3rem 1rem 2rem; }
    .hero-stats { gap: 1rem; }
    .stat-item { min-width: 100px; padding: 1rem; }
    .stat-number { font-size: 1.6rem; }
    .level-grid { grid-template-columns: 1fr; }
    .input-group { flex-direction: column; }

    .learn-content { padding: 1.5rem 1rem 3rem; }
    .learn-flow { flex-direction: column; }
    .learn-flow-arrow { transform: rotate(90deg); }
    .learn-two-col { grid-template-columns: 1fr; }
    .learn-threats { grid-template-columns: 1fr; }
    .quiz-options { grid-template-columns: 1fr; }

    .shop-header {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    .shop-search { max-width: 100%; order: 3; }
    .shop-nav { gap: 1rem; }

    .mission-panel {
        width: calc(100% - 2rem);
        right: 1rem;
        bottom: 1rem;
    }

    .hint-drawer {
        width: 100%;
        right: -100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .matrix-bg, #cursor-trail { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.3);
}
