/* ============================================================
   CYBERSHIELD — INTERACTIVE CYBERSECURITY TRAINING
   ============================================================ */

/* === DESIGN TOKENS === */
:root {
    --bg-primary: #070714;
    --bg-secondary: #0c0c1d;
    --bg-tertiary: #111128;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --surface-active: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);

    --text-primary: #f0f0f8;
    --text-secondary: #8888a8;
    --text-muted: #555570;

    --accent-purple: #7c3aed;
    --accent-purple-glow: rgba(124, 58, 237, 0.25);
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.25);
    --accent-rose: #f43f5e;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;

    --gradient-text: linear-gradient(135deg, #7c3aed 0%, #06b6d4 50%, #7c3aed 100%);
    --gradient-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
    --gradient-danger: linear-gradient(135deg, #f43f5e, #ef4444);
    --gradient-surface: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.08));

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
    --shadow-glow-purple: 0 0 40px rgba(124,58,237,0.15);
    --shadow-glow-cyan: 0 0 40px rgba(6,182,212,0.15);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
code {
    font-family: var(--font-mono);
    background: rgba(124, 58, 237, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--accent-purple);
}

::selection {
    background: var(--accent-purple);
    color: #fff;
}

/* === PROGRESS BAR === */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.2s ease-out;
    width: 0%;
    box-shadow: 0 0 10px var(--accent-purple-glow);
}

/* === NAVIGATION === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-normal);
    background: transparent;
}

.nav.scrolled {
    background: rgba(7, 7, 20, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    transition: var(--transition-fast);
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-purple);
    filter: drop-shadow(0 0 8px var(--accent-purple-glow));
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.nav-mobile-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
    position: relative;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 72px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* === GRADIENT TEXT === */
.gradient-text {
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
}

.text-danger {
    color: var(--accent-rose);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-purple-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-purple-glow), 0 0 0 1px rgba(124,58,237,0.3);
}

.btn-ghost {
    border: 1px solid var(--border);
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
}

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

.btn-danger {
    background: var(--gradient-danger);
    color: #fff;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(244, 63, 94, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.35);
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 24px 60px;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 28px;
}

.hero-title-line {
    display: block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    min-height: 2em;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

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

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat-percent {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* === SCROLL ANIMATIONS === */
.animate-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-in:nth-child(2) { transition-delay: 0.08s; }
.animate-in:nth-child(3) { transition-delay: 0.16s; }
.animate-in:nth-child(4) { transition-delay: 0.24s; }

/* === INFO CARDS === */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent, var(--accent-purple));
    opacity: 0;
    transition: var(--transition-normal);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

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

.info-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
    transition: var(--transition-normal);
}

.info-card:hover .info-card-icon {
    transform: scale(1.1);
    box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 20%, transparent);
}

.info-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.info-card-term {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
}

.term-label {
    color: var(--text-muted);
    margin-right: 6px;
}

.term-value {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* === EMAIL SIMULATION === */
.sim-progress {
    max-width: 500px;
    margin: 0 auto 32px;
    text-align: center;
}

.sim-progress-bar {
    height: 6px;
    background: var(--surface);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 10px;
}

.sim-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px var(--accent-purple-glow);
}

.sim-progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.email-client {
    display: grid;
    grid-template-columns: 260px 1fr;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-lg);
    max-width: 960px;
    margin: 0 auto;
}

.email-sidebar {
    background: rgba(0, 0, 0, 0.25);
    border-right: 1px solid var(--border);
    padding: 0;
}

.email-sidebar-header {
    padding: 18px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.email-badge {
    background: var(--accent-rose);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: auto;
}

.email-list-item {
    padding: 14px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.email-list-item:hover { background: var(--surface-hover); }

.email-list-item.active {
    background: rgba(124, 58, 237, 0.08);
    border-left: 3px solid var(--accent-purple);
}

.email-list-item.read { opacity: 0.5; }

.email-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-purple);
    margin-top: 6px;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(124,58,237,0); }
}

.email-list-content { flex: 1; min-width: 0; }

.email-list-sender {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-list-subject {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-list-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.email-main {
    display: flex;
    flex-direction: column;
    min-height: 460px;
}

.email-header-bar {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.email-meta { flex: 1; }

.email-from,
.email-to-line,
.email-subject-line {
    margin-bottom: 6px;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.email-meta-label {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.email-meta-value { color: var(--text-secondary); }

.email-subject-urgent {
    color: var(--accent-rose) !important;
    font-weight: 700;
}

.email-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.email-body {
    padding: 28px;
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.email-body p {
    margin-bottom: 14px;
}

/* Suspicious elements */
.suspicious-element {
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    margin: -4px -6px;
}

.suspicious-element:hover {
    background: rgba(244, 63, 94, 0.08);
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.2);
}

.suspicious-element.found {
    background: rgba(16, 185, 129, 0.1);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25);
    pointer-events: none;
}

.suspicious-element.found::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--accent-emerald);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.email-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px !important;
    margin: 16px 0 !important;
    background: rgba(244, 63, 94, 0.05);
    border: 1px dashed rgba(244, 63, 94, 0.2);
    border-radius: var(--radius-md);
}

.attachment-info { display: flex; flex-direction: column; }
.attachment-name {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}
.attachment-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.email-fake-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4a9eff;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin: 8px 0 16px !important;
    position: relative;
}

.fake-url-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--accent-rose);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.email-fake-link:hover .fake-url-tooltip { opacity: 1; }

.email-threat-text {
    color: var(--text-primary) !important;
    font-weight: 500;
}

.email-signature {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.email-sig-company {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Discovery Panel */
.discovery-panel {
    max-width: 960px;
    margin: 24px auto 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-amber);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

.discovery-panel.show { display: block; }

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

.discovery-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.discovery-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-amber);
    flex-shrink: 0;
}

.discovery-title {
    font-size: 1.1rem;
    font-weight: 700;
    flex: 1;
}

.discovery-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.discovery-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.discovery-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.discovery-term {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Simulation Complete */
.sim-complete {
    max-width: 600px;
    margin: 48px auto 0;
    text-align: center;
    padding: 48px 32px;
    background: var(--surface);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-xl);
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sim-complete.show { display: block; }

.sim-complete-icon {
    color: var(--accent-emerald);
    margin-bottom: 20px;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sim-complete h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.sim-complete p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* === TIMELINE / CONSEQUENCES === */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto 64px;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 28px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-amber), var(--accent-rose), #991b1b);
}

.timeline-item {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    position: relative;
}

.timeline-marker {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    transition: var(--transition-normal);
}

.timeline-marker span {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.timeline-item.visible .timeline-marker {
    border-color: var(--accent-rose);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

.timeline-item.visible .timeline-marker span {
    color: var(--accent-rose);
}

.timeline-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-normal);
}

.timeline-card:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.timeline-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--step-color) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--step-color);
    margin-bottom: 14px;
}

.timeline-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.timeline-term {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-cyan);
    padding: 4px 12px;
    background: rgba(6, 182, 212, 0.08);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

/* === TERMINAL === */
.terminal {
    max-width: 700px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0d0d0d;
    box-shadow: var(--shadow-lg);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 7px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

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

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.9;
    min-height: 200px;
    max-height: 360px;
    overflow-y: auto;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.terminal-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-prompt { color: var(--accent-emerald); }
.terminal-info { color: var(--accent-cyan); }
.terminal-success { color: var(--accent-emerald); }
.terminal-warning { color: var(--accent-amber); }
.terminal-error { color: var(--accent-rose); }
.terminal-money { color: #fbbf24; }

.terminal-cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--accent-emerald);
}

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

.terminal-run-btn {
    margin: 16px 20px 20px;
}

/* === ACCESS MANAGEMENT === */
.access-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.access-toggle-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.access-toggle-label.active {
    color: var(--text-primary);
}

.access-toggle {
    width: 56px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--accent-emerald);
    padding: 3px;
    transition: var(--transition-normal);
    position: relative;
}

.access-toggle.toggled {
    background: var(--accent-rose);
}

.access-toggle-thumb {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.access-toggle.toggled .access-toggle-thumb {
    transform: translateX(26px);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.role-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.role-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.role-card.all-admin .role-header {
    --role-color: var(--accent-rose) !important;
}

.role-header {
    padding: 28px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.role-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--role-color) 8%, transparent), transparent 70%);
}

.role-header svg {
    color: var(--role-color);
    margin-bottom: 12px;
    position: relative;
}

.role-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    position: relative;
}

.role-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--role-color);
    background: color-mix(in srgb, var(--role-color) 12%, transparent);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-top: 8px;
    position: relative;
}

.role-permissions {
    padding: 20px 24px;
}

.role-permissions li {
    padding: 8px 0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-normal);
}

.role-permissions li + li {
    border-top: 1px solid rgba(255,255,255,0.03);
}

.permission-granted::before,
.permission-denied::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
}

.permission-granted {
    color: var(--text-primary);
}

.permission-granted::before {
    background-color: rgba(16, 185, 129, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.permission-denied {
    color: var(--text-muted);
}

.permission-denied::before {
    background-color: rgba(244, 63, 94, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23f43f5e' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.access-warning {
    display: none;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.access-warning.show { display: flex; }

.access-warning svg {
    color: var(--accent-rose);
    flex-shrink: 0;
    margin-top: 2px;
}

.rbac-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.rbac-info-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    flex-shrink: 0;
}

/* === PASSWORD SCENARIOS === */
.scenarios-container {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 64px;
}

.scenario {
    flex: 1;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface);
    transition: var(--transition-normal);
}

.scenario-vs {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    flex-shrink: 0;
    letter-spacing: 0.1em;
}

.scenario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    font-size: 1rem;
}

.scenario-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.scenario-header-bad {
    background: rgba(244, 63, 94, 0.08);
    border-bottom: 1px solid rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
}

.scenario-header-good {
    background: rgba(16, 185, 129, 0.08);
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.scenario-body {
    padding: 24px;
}

.network-viz {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
    padding: 20px 0;
}

.network-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: var(--transition-normal);
    position: relative;
}

.network-node span {
    font-size: 0.78rem;
    font-weight: 600;
}

.network-node code {
    font-size: 0.72rem;
    padding: 2px 6px;
}

.network-server {
    border-color: rgba(124, 58, 237, 0.3);
    padding: 16px 28px;
}

.network-users {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.network-user { text-align: center; }

.network-node.compromised {
    border-color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.08);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.15);
    animation: compromisePulse 1.5s ease-in-out infinite;
}

@keyframes compromisePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(244,63,94,0.15); }
    50% { box-shadow: 0 0 30px rgba(244,63,94,0.3); }
}

.network-node.safe {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.08);
}

.network-node.shielded {
    border-color: var(--accent-emerald);
}

.scenario-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 16px;
}

.scenario-result {
    display: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scenario-result.show { display: block; }

#badResult.show {
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.12);
}

#goodResult.show {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.12);
}

/* === PASSWORD TIPS === */
.password-tips h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition-normal);
}

.tip-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.tip-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--tip-color) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tip-color);
    margin-bottom: 16px;
}

.tip-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tip-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === SUMMARY === */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 64px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.summary-number {
    font-size: 4rem;
    font-weight: 900;
    position: absolute;
    top: 16px;
    right: 20px;
    opacity: 0.06;
    line-height: 1;
}

.summary-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.summary-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.summary-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-purple);
}

/* === QUIZ === */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.quiz-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
}

.quiz-progress-info {
    margin-bottom: 28px;
}

.quiz-progress-info span {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.quiz-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 0%;
}

.quiz-question {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.quiz-option {
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    text-align: left;
    width: 100%;
}

.quiz-option:hover:not(.selected) {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.quiz-option.selected.correct {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-emerald);
}

.quiz-option.selected.wrong {
    border-color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.08);
    color: var(--accent-rose);
}

.quiz-option.reveal-correct {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.06);
}

.quiz-feedback {
    font-size: 0.92rem;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: none;
    margin-bottom: 16px;
    line-height: 1.6;
}

.quiz-feedback.show { display: block; }

.quiz-feedback.correct {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.quiz-feedback.wrong {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
}

.quiz-next { margin-left: auto; }

.quiz-result {
    text-align: center;
    padding: 48px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.quiz-result-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.quiz-result h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.quiz-result p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1.05rem;
}

/* === FOOTER === */
.footer {
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    background: var(--bg-primary);
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-logo svg {
    color: var(--accent-purple);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.footer-terms h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-terms-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.footer-terms-grid span {
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .info-grid,
    .roles-grid,
    .tips-grid,
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .scenarios-container {
        flex-direction: column;
    }

    .scenario-vs {
        justify-content: center;
        padding: 8px 0;
    }

    .section { padding: 80px 0; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(7, 7, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open { display: flex; }

    .nav-mobile-toggle { display: flex; }

    .email-client {
        grid-template-columns: 1fr;
    }

    .email-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .email-sidebar .email-list-item.read { display: none; }

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

    .hero-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }

    .email-header-bar {
        flex-direction: column;
        padding: 16px 20px;
    }

    .quiz-card {
        padding: 24px 20px;
    }

    .timeline-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .section { padding: 60px 0; }
    .section-header { margin-bottom: 48px; }
    .hero { padding: 80px 16px 40px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn { padding: 12px 24px; font-size: 0.9rem; }
}
