/* Main site layer: imports canonical shared foundation, then site-specific additions */
@import url("./global.css");

@media (max-width: 560px) {
  .flashcard { height: 280px; } /* Taller for wrapping text on phones */
}
/* =========================================================
   MODULE 22: QUESTION BANK / QUIZ UI
   New module for the Core 1 Question Bank
========================================================= */

:root {
  --bb-panel: var(--theme-component-page-56);
  --bb-green: var(--theme-component-primary-100);
  --bb-green-2: var(--theme-component-primary-104);
  --bb-red: var(--theme-component-error-27);
  --bb-yellow: var(--theme-component-ink-44);
  --bb-shadow: 0 14px 50px var(--theme-component-page-57);
  --bb-radius: 18px;
}

.bb-matrix-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.bb-lab {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 18px 70px;
  position: relative;
  z-index: 2;
}

/* --- UNIFIED DASHBOARD WRAPPER --- */
.bb-dashboard {
  background: var(--bb-panel);
  border: 1px solid var(--theme-component-primary-105);
  border-radius: var(--bb-radius);
  box-shadow: var(--bb-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

/* HEADER: Always Visible */
.bb-dash-head {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.3s;
}
.bb-dashboard.expanded .bb-dash-head {
  border-bottom: 1px solid var(--theme-component-primary-90);
}

.bb-brand { display:flex; align-items:center; gap:12px; }
.bb-brand img {
  height: 44px; width: auto; display:block;
  border-radius: 12px;
  box-shadow: 0 0 15px var(--theme-component-primary-97);
  border: 1px solid var(--theme-component-primary-106);
  background: var(--theme-component-page-22); object-fit: contain;
}
.bb-titlewrap { display:flex; flex-direction:column; gap:4px; }
.bb-title { font-size: 20px; font-weight: 800; letter-spacing: .3px; line-height: 1.15; color: var(--bb-text-main); }
.bb-subtitle { font-size: 15px; color: var(--bb-text-muted); line-height: 1.25; }

/* HIGH VISIBILITY TOGGLE BUTTON */
.bb-dash-toggle {
  background: var(--bb-green);
  color: var(--theme-component-on-primary-8);
  border: none;
  border-radius: 8px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 0 15px var(--theme-component-primary-107);
  transition: 0.2s ease;
}
.bb-dash-toggle:hover {
  background: var(--theme-component-ink-5);
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--theme-component-ink-45);
}
.bb-dash-toggle i { transition: transform 0.3s ease; }
.bb-dashboard.expanded .bb-dash-toggle i { transform: rotate(180deg); }

/* DASHBOARD BODY */
.bb-dash-body {
  display: none;
  padding: 18px;
  animation: slideDown 0.3s ease-out;
}
.bb-dashboard.expanded .bb-dash-body { display: block; }

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

/* Stats & Controls Row */
.bb-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--theme-component-border-15);
}

.bb-pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--theme-component-primary-120);
  background: var(--theme-component-page-41);
  color: var(--bb-text-muted);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.bb-pill strong { color: var(--bb-green); font-weight: 900; }
.bb-pill.bad strong { color: var(--bb-red); }

.bb-filter {
  display:flex; align-items:center; gap:8px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--theme-component-border-18);
  background: var(--theme-component-ink-54);
}
.bb-filter .label {
  font-size: 14px; font-weight: 900; color: var(--bb-text-muted); margin-right: 2px;
}
.bb-fbtn {
  border: 1px solid var(--theme-component-border-19);
  background: var(--theme-component-page-70);
  color: var(--theme-component-ink-5);
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  transition: 0.2s;
}
.bb-fbtn:hover { border-color: var(--theme-component-primary-121); }
.bb-fbtn.active {
  border-color: var(--theme-component-primary-111);
  background: var(--theme-component-primary-122);
  box-shadow: 0 0 15px var(--theme-component-primary-123);
}

/* Info Grid (Instructions + Focus) */
.bb-info-grid { display: grid; gap: 16px; }
.bb-intro h2 { margin:0 0 8px; font-size:16px; letter-spacing:.2px; color: var(--bb-text-main); font-family: var(--font-tech); text-transform: uppercase; }
.bb-intro p { margin:0 0 12px; color: var(--bb-text-muted); line-height:1.45; font-size:15px; }

/* Merged Look for Instructions/Focus */
.bb-instructions {
  display:grid; gap:8px; padding: 14px;
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--theme-component-primary-108);
  background: var(--theme-component-page-70);
  border-bottom: 1px solid var(--theme-component-border-15);
}
.bb-step { display:flex; gap:10px; align-items:flex-start; font-size:14px; line-height:1.35; color: var(--bb-text-muted); }
.bb-step b { color: var(--bb-green); }
.bb-step .dot {
  width:10px; height:10px; margin-top:4px; border-radius:999px;
  background: var(--bb-green);
  box-shadow: 0 0 14px var(--theme-component-primary-124);
  flex:0 0 auto;
}

.bb-focus {
  margin-top: -1px; /* Overlap borders */
  border-radius: 0 0 12px 12px;
  border: 1px solid var(--theme-component-primary-108);
  border-top: none;
  background: var(--theme-component-page-71);
  padding: 14px;
  display:grid; gap:8px;
}
.bb-focus .title {
  font-weight: 950; font-size: 14px; color: var(--theme-component-ink-5);
  display:flex; justify-content:space-between; align-items:center;
}
.bb-focus .hint { font-size: 15px; color: var(--bb-text-muted); font-weight: 800; }
.bb-focus ul { margin:0; padding:0 0 0 18px; color: var(--bb-text-muted); font-size: 14px; line-height: 1.45; }
.bb-focus li b { color: var(--bb-text-main); font-weight: 950; }

/* Quiz Cards */
.bb-quiz { margin-top: 20px; display:grid; gap:14px; }
.bb-qcard {
  border-radius: 18px;
  border: 1px solid var(--theme-component-primary-108);
  background: var(--theme-component-page-58);
  box-shadow: 0 0 25px var(--theme-component-primary-99);
  overflow:hidden;
  position: relative;
}
.bb-qcard::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width: 6px;
  background: var(--theme-component-primary-125); box-shadow: 0 0 18px var(--theme-component-primary-126);
}
.bb-qcard.diff-easy::before { background: var(--theme-component-primary-127); box-shadow: 0 0 20px var(--theme-component-primary-128); }
.bb-qcard.diff-medium::before { background: var(--theme-component-ink-55); box-shadow: 0 0 20px var(--theme-component-ink-56); }
.bb-qcard.diff-hard::before { background: var(--theme-component-error-33); box-shadow: 0 0 20px var(--theme-component-error-34); }

.bb-qhead { padding: 14px 18px 10px; border-bottom: 1px solid var(--theme-component-primary-109); background: var(--theme-component-page-59); margin-left: 6px; }
.bb-qmeta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; color: var(--bb-text-muted); font-size: 14px; font-weight: 800; }
.bb-tag { border: 1px solid var(--theme-component-primary-129); border-radius: 999px; padding: 6px 8px; background: var(--theme-component-page-70); }
.bb-tag.obj { border-color: var(--theme-component-info-28); background: var(--theme-component-info-29); color: var(--theme-component-ink-57); }
.bb-tag.diff.easy { border-color: var(--theme-component-primary-124); background: var(--theme-component-primary-122); color: var(--theme-component-primary-130); }
.bb-tag.diff.medium { border-color: var(--theme-component-border-20); background: var(--theme-component-ink-58); color: var(--theme-component-ink-59); }
.bb-tag.diff.hard { border-color: var(--theme-component-error-35); background: var(--theme-component-error-28); color: var(--theme-component-ink-60); }
.bb-qnum { color: var(--bb-green); font-weight: 900; }

.bb-qbody { padding: 14px 18px 16px; margin-left: 6px; }
.bb-qtext { margin:0 0 12px; font-size:15px; line-height:1.45; font-weight:800; color: var(--bb-text-main); }
.bb-options { display:grid; gap:10px; }
.bb-opt {
  display:flex; align-items:center; gap:12px; padding: 12px 12px;
  border-radius: 14px; border: 2px solid var(--theme-component-primary-110); background: var(--theme-component-page-60);
  cursor:pointer; transition: 0.15s ease; user-select:none; position:relative;
}
.bb-opt:hover { transform: translateY(-1px); border-color: var(--theme-component-primary-111); box-shadow: 0 0 22px var(--theme-component-primary-110); }
.bb-radio {
  width: 20px; height: 20px; border-radius:999px; border: 2px solid var(--theme-component-primary-111);
  box-shadow: 0 0 14px var(--theme-component-primary-108); flex:0 0 auto; position:relative; background: var(--theme-component-page-41);
}
.bb-radio::after {
  content:""; position:absolute; inset: 4px; border-radius:999px; background: transparent; transition: 0.12s ease;
}
.bb-opt input { position:absolute; opacity:0; pointer-events:none; }
.bb-opttext { font-size:14px; line-height:1.35; font-weight:750; color: var(--bb-text-main); }

.bb-opt.is-selected { border-color: var(--theme-component-primary-131); background: var(--theme-component-primary-122); }
.bb-opt.is-selected .bb-radio::after { background: var(--bb-green); box-shadow: 0 0 18px var(--theme-component-primary-111); }
.bb-qcard.is-locked .bb-opt { cursor: default; }
.bb-qcard.is-locked .bb-opt.is-correct { border-color: var(--theme-component-primary-131); background: var(--theme-component-primary-109); }
.bb-qcard.is-locked .bb-opt.is-correct .bb-radio::after { background: var(--bb-green); }
.bb-qcard.is-locked .bb-opt.is-wrong { border-color: var(--theme-component-error-36); background: var(--theme-component-error-37); }
.bb-qcard.is-locked .bb-opt.is-wrong .bb-radio { border-color: var(--theme-component-error-38); }
.bb-qcard.is-locked .bb-opt.is-wrong .bb-radio::after { background: var(--theme-component-error-39); }

.bb-explain {
  margin-top: 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--theme-component-primary-132);
  background: var(--theme-component-page-70); display:none; animation: bbFadeUp .14s ease-out;
}
.bb-qcard.is-locked .bb-explain { display:block; }
.bb-explain .row { display:flex; gap:8px; margin-bottom:8px; }
.bb-badge { border-radius:999px; padding:6px 8px; font-size:14px; font-weight:900; border: 1px solid var(--theme-component-primary-133); color: var(--bb-green); background: var(--theme-component-primary-113); }
.bb-badge.bad { border-color: var(--theme-component-error-40); color: var(--theme-component-ink-60); background: var(--theme-component-error-28); }
.bb-explain p { margin:0; line-height:1.45; font-size:15px; color: var(--bb-text-main); }
.bb-explain .muted { color: var(--bb-text-muted); margin-top:8px; }

@keyframes bbFadeUp { from{ opacity:0; transform: translateY(4px);} to{opacity:1; transform: translateY(0);} }
.bb-footer { margin-top:16px; color: var(--bb-text-muted); font-size:14px; text-align:center; opacity:.9; }

@media (max-width: 720px) {
  .bb-controls { justify-content: center; }
  .bb-filter { width: 100%; justify-content:center; flex-wrap: wrap; }
}

/* --- TACTICAL REVEAL SYSTEM --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay Utilities */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* The "Glitch" Text Effect for Titles */
.glitch-title {
    position: relative;
    display: inline-block;
}

.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    text-shadow: -1px 0 var(--bb-error);
    top: 0;
    color: var(--theme-component-ink-5);
    background: var(--bb-bg-deep);
    overflow: hidden;
    clip: rect(0, 900px, 0, 0); 
    animation: noise-anim 2s infinite linear alternate-reverse;
}

@keyframes noise-anim {
    0% { clip: rect(10px, 9999px, 20px, 0); }
    20% { clip: rect(30px, 9999px, 40px, 0); }
    /* Add more intervals for a twitchier effect */
    100% { clip: rect(70px, 9999px, 80px, 0); }
}

/* --- START OF SUPERCHARGE MODULE --- */

/* 1. Scrolling Reveal Logic */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}
.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Tactical Banner with Stock Image */
.tactical-banner {
    position: relative;
    height: 450px;
    background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop') center/cover fixed;
    display: flex;
    align-items: center;
    border-top: 2px solid var(--bb-kelly);
    border-bottom: 2px solid var(--bb-kelly);
    margin: 60px 0;
}
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bb-bg-deep) 30%, transparent 100%);
}
.mission-statement {
    position: relative;
    z-index: 2;
    font-size: 2rem;
    max-width: 800px;
    font-family: var(--font-tech);
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 1px;
    text-shadow: 2px 2px 10px var(--theme-component-page-17);
}

/* 3. Dossier Image Scanners */
.dossier-visual {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--theme-component-primary-34);
}
.dossier-visual img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) brightness(0.6) contrast(1.2);
    transition: 0.5s ease;
}
.dossier-card:hover .dossier-visual img {
    filter: grayscale(20%) brightness(0.8);
    transform: scale(1.05);
}
.visual-scanner {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--bb-kelly);
    box-shadow: 0 0 15px var(--bb-kelly);
    animation: scanLine 4s infinite linear;
}
@keyframes scanLine {
    0% { top: 0; }
    100% { top: 100%; }
}

/* --- END OF SUPERCHARGE MODULE --- */

/* =========================================================
   MODULE 23: LAB SIMULATION UI (TERMINALS & MODALS)
========================================================= */

/* --- CORE SIMULATION OVERRIDES --- */
.lab-mode body {
    background-image: radial-gradient(circle at center, var(--theme-component-surface-58) 0%, var(--theme-component-page-20) 100%);
    min-height: 100vh;
    padding-bottom: 50px;
    cursor: none; 
}

/* --- NETWORK CANVAS --- */
.sim-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: start;
}

.network-canvas {
    background: var(--bb-bg-glass);
    border: 1px solid var(--theme-component-primary-87);
    border-radius: var(--bb-radius-lg);
    padding: 40px;
    position: relative;
    min-height: 700px;
    box-shadow: var(--bb-glow-primary);
    backdrop-filter: blur(5px);
}

.department-label {
    font-family: var(--font-tech);
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--theme-component-border-15);
    display: inline-block;
}

.host-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 50px;
    position: relative;
    flex-wrap: wrap;
    gap: 15px;
}

/* --- HOST NODES --- */
.host-node {
    width: 110px;
    background: var(--theme-component-surface-59);
    border: 1px solid var(--bb-text-dim);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: none;
    z-index: 2;
    transition: all 0.3s ease;
    position: relative;
}

.host-node:hover {
    border-color: var(--bb-kelly);
    box-shadow: 0 0 15px var(--theme-component-primary-87);
    transform: translateY(-5px);
}

.host-node i {
    font-size: 2.2rem;
    color: var(--bb-text-main);
    margin-bottom: 10px;
    display: block;
}

.host-node.server-node i { color: var(--bb-cyan); }

.host-node .ip {
    font-family: var(--font-code);
    font-size: 14px;
    color: var(--bb-kelly);
    margin-top: 4px;
}

.host-node .name {
    font-family: var(--font-tech);
    font-weight: 700;
    color: var(--theme-component-ink-5);
    line-height: 1.1;
}

.host-node.is-dragging { opacity: 0.4; transform: scale(0.9); }

/* --- INFRASTRUCTURE & QUARANTINE --- */
.infra-node {
    width: 140px;
    margin: 0 auto 20px;
    text-align: center;
    padding: 12px;
    background: var(--theme-component-surface-31);
    border: 1px solid var(--bb-text-muted);
    border-radius: 4px;
    opacity: 0.8;
    transition: 0.3s;
}

.infra-node.interactive {
    cursor: none;
    border-color: var(--bb-kelly);
    box-shadow: 0 0 10px var(--theme-component-primary-3);
    animation: pulseBorder 3s infinite;
}

.infra-node.interactive:hover {
    background: var(--theme-component-primary-3);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--theme-component-primary-34);
}

@keyframes pulseBorder {
    0% { border-color: var(--bb-text-dim); }
    50% { border-color: var(--bb-kelly); }
    100% { border-color: var(--bb-text-dim); }
}

.infra-node i { color: var(--bb-text-muted); font-size: 1.5rem; }
.infra-text { color: var(--bb-text-muted); font-family: var(--font-tech); margin-top: 5px; font-size: 14px;}

.quarantine-box {
    background: var(--theme-component-surface-60);
    border: 2px dashed var(--bb-error);
    border-radius: var(--bb-radius-lg);
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    transition: background 0.3s;
    overflow-y: auto;
}

.quarantine-box.drag-over {
    background: var(--theme-component-error-29);
    border-style: solid;
}

.quarantine-title {
    font-family: var(--font-tech);
    color: var(--bb-error);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* --- FIXED MODAL STYLES (GRID LAYOUT) --- */
.config-modal, .system-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--theme-component-page-62);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    cursor: auto; 
}

.modal-panel {
    width: 98vw; 
    height: 95vh;
    max-width: none;
    background: var(--bb-bg-surface);
    border: 1px solid var(--bb-kelly);
    border-radius: 8px;
    box-shadow: 0 0 60px var(--theme-component-page-49);
    display: grid;
    grid-template-rows: auto auto 1fr auto; 
    overflow: hidden; 
    animation: modalPop 0.2s ease-out;
    cursor: none;
}

.modal-panel.system-box {
    width: 500px;
    height: auto; 
    border: 2px solid var(--bb-kelly);
    box-shadow: 0 0 50px var(--theme-component-primary-41);
    display: flex; 
    flex-direction: column;
}

.modal-panel.system-box.error-mode {
    border-color: var(--bb-error);
    box-shadow: 0 0 50px var(--theme-component-error-30);
}

@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: var(--bb-kelly);
    color: var(--theme-component-on-primary-3);
    padding: 12px 20px;
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-panel.system-box .modal-header {
    background: var(--theme-component-primary-3);
    color: var(--bb-kelly);
    border-bottom: 1px solid var(--bb-kelly);
    letter-spacing: 2px;
}

.modal-panel.system-box.error-mode .modal-header {
    background: var(--theme-component-error-3);
    color: var(--bb-error);
    border-bottom: 1px solid var(--bb-error);
}

.modal-body {
    padding: 30px;
    color: var(--bb-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: max(15px, 1rem);
}

.modal-tabs {
    display: flex;
    background: var(--theme-component-page-51);
    border-bottom: 1px solid var(--bb-text-dim);
}
.modal-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-tech);
    text-transform: uppercase;
    color: var(--bb-text-muted);
    transition: 0.2s;
    border-right: 1px solid var(--bb-text-dim);
}
.modal-tab:last-child { border-right: none; }
.modal-tab:hover { background: var(--theme-component-ink-19); color: var(--theme-component-ink-5); }
.modal-tab.active {
    background: var(--theme-component-primary-3);
    color: var(--bb-kelly);
    border-bottom: 2px solid var(--bb-kelly);
}

.modal-content-area {
    position: relative;
    background: var(--theme-component-page-63); 
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.tab-view { 
    display: none; 
    height: 100%;
    width: 100%;
    flex-direction: column; 
    overflow: hidden; 
}
.tab-view.active { display: flex; }

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--theme-component-border-15);
    background: var(--theme-component-page-50);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.close-btn {
    background: none; border: none; color: var(--theme-component-on-primary-3); font-weight: bold; font-size: 1.5rem; cursor: pointer;
}
.modal-panel.system-box .close-btn { color: var(--bb-kelly); }
.modal-panel.system-box.error-mode .close-btn { color: var(--bb-error); }

/* --- TERMINAL STYLES (FIXED) --- */
.terminal-container {
    display: flex; 
    flex-direction: column; 
    width: 100%;
    height: 100%; /* Force full height of the modal */
    max-width: 1800px; /* Your requested width */
    margin: 0 auto; /* CRITICAL FIX: Removes vertical margin that pushes input off screen */
    background: var(--theme-component-page-63);
    padding: 20px; 
    font-family: var(--font-code); 
    font-size: 1.1rem;
    position: relative;
    box-sizing: border-box;
    border: 1px solid var(--theme-component-primary-41);
}

.terminal-output {
    flex-grow: 1; /* Takes up all available space, pushing input to bottom */
    overflow-y: auto; /* Enables scrolling for text only */
    min-height: 0; /* Flexbox fix to prevent overflow issues */
    color: var(--theme-component-ink-46); 
    padding-bottom: 20px;
    white-space: pre-wrap; 
    line-height: 1.4;
}

.terminal-input-line {
    display: flex; 
    align-items: center; 
    border-top: 1px solid var(--theme-component-surface-51); 
    padding-top: 15px;
    flex-shrink: 0; /* Ensures this area never shrinks/disappears */
    background: var(--theme-component-page-63);
    min-height: 50px; /* Enforces visibility */
}

.terminal-prompt { color: var(--bb-kelly); margin-right: 10px; white-space: nowrap; }

.terminal-input {
    width: 100%;
    background: transparent; 
    border: none; 
    color: var(--theme-component-ink-5);
    font-family: var(--font-code); 
    font-size: 1.1rem; 
    outline: none;
    cursor: none;
}
.term-success { color: var(--bb-kelly); }
.term-error { color: var(--bb-error); }
.term-info { color: var(--bb-cyan); }
.term-warn { color: var(--bb-honey); }

/* --- FIREWALL LOGS --- */
.log-terminal {
    background: var(--theme-component-page-22);
    color: var(--bb-text-muted);
    font-family: var(--font-code);
    font-size: 14px;
    padding: 20px;
    overflow-y: auto;
    height: 100%; 
    width: 100%;
}

.log-entry { margin-bottom: 5px; border-bottom: 1px solid var(--theme-component-border-14); padding-bottom: 2px; }
.log-entry .timestamp { color: var(--bb-text-dim); margin-right: 10px; }
.log-entry .ip-src { color: var(--bb-cyan); }
.log-entry .ip-dst { color: var(--bb-honey); }
.log-entry .port-bad { color: var(--bb-error); font-weight: bold; }
.log-entry .action-allow { color: var(--bb-kelly); float: right; }
.log-entry .action-deny { color: var(--bb-error); float: right; }

/* --- FIREWALL RULES --- */
.fw-rules-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-code);
    font-size: max(14px, 0.9rem);
}
.fw-rules-table th {
    text-align: left;
    padding: 15px;
    background: var(--theme-component-primary-3);
    color: var(--bb-kelly);
    border-bottom: 1px solid var(--bb-kelly);
}
.fw-rules-table td {
    padding: 15px;
    border-bottom: 1px solid var(--theme-component-border-15);
    color: var(--theme-component-ink-5);
}
.fw-toggle-btn {
    background: var(--theme-component-page-51);
    border: 1px solid var(--bb-text-dim);
    color: var(--bb-text-muted);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    width: 80px;
    text-align: center;
}
.fw-toggle-btn.active {
    background: var(--bb-kelly);
    color: var(--theme-component-on-primary-3);
    border-color: var(--bb-kelly);
    font-weight: bold;
}

/* --- EMAIL CLIENT --- */
.email-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
.email-sidebar {
    background: var(--theme-component-page-50);
    border-right: 1px solid var(--theme-component-border-15);
    overflow-y: auto;
}
.email-message-view {
    padding: 30px;
    overflow-y: auto;
    background: var(--theme-component-ink-47);
    position: relative;
}
.email-item {
    padding: 15px;
    border-bottom: 1px solid var(--theme-component-border-14);
    cursor: pointer;
    transition: 0.2s;
}
.email-item:hover { background: var(--theme-component-ink-19); }
.email-item.active { background: var(--theme-component-primary-3); border-left: 3px solid var(--bb-kelly); }

.email-item.unread .email-subject { font-weight: bold; color: var(--theme-component-ink-5); }
.email-item.unread .email-icon { color: var(--bb-kelly); }
.email-item.read .email-subject { color: var(--bb-text-muted); }
.email-item.read .email-icon { color: var(--bb-text-dim); }

.email-sender { font-size: 14px; color: var(--bb-text-muted); display: block; margin-bottom: 2px; }
.email-subject { font-size: max(14px, 0.9rem); display: block; margin-bottom: 2px; }
.email-date { font-size: 14px; color: var(--bb-text-dim); float: right; }

.msg-header { margin-bottom: 20px; border-bottom: 1px solid var(--theme-component-border-15); padding-bottom: 15px; }
.msg-subject { font-size: 1.4rem; color: var(--theme-component-ink-5); font-family: var(--font-tech); margin-bottom: 5px; }
.msg-meta { font-size: max(14px, 0.9rem); color: var(--bb-text-muted); }
.msg-body { font-size: max(15px, 1rem); color: var(--bb-text-main); line-height: 1.6; white-space: pre-wrap; }

.phishing-btn {
    position: absolute; top: 30px; right: 30px;
    background: var(--theme-component-error-3);
    border: 1px solid var(--bb-error);
    color: var(--bb-error);
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}
.phishing-btn:hover { background: var(--bb-error); color: var(--theme-component-on-primary-3); }
.phishing-btn.flagged { background: var(--bb-error); color: var(--theme-component-ink-5); pointer-events: none; }

/* --- CUT SHEET & INTEL --- */
.cut-sheet {
    display: none; margin-top: 60px; border-top: 1px solid var(--bb-kelly);
    padding-top: 40px; animation: slideIn 1s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.intel-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-top: 30px;
}
.intel-card {
    background: var(--theme-component-primary-36); border: 1px solid var(--bb-text-dim);
    padding: 25px; border-radius: 8px; border-left: 3px solid var(--bb-kelly);
}
.intel-card h3 {
    font-family: var(--font-tech); color: var(--bb-kelly); text-transform: uppercase;
    margin-bottom: 15px; font-size: 1.2rem;
}
.intel-card p { color: var(--bb-text-muted); font-size: 15px; line-height: 1.6; }
.intel-card ol { padding-left: 20px; }
.intel-card ol li { margin-bottom: 10px; color: var(--bb-text-muted); font-size: 15px; }
.intel-card strong { color: var(--theme-component-ink-5); }
.code-snippet {
    background: var(--theme-component-page-22); color: var(--bb-error); font-family: var(--font-code);
    padding: 5px 8px; border-radius: 4px; font-size: 14px;
}

.locked-intel {
    margin-top: 60px; padding: 60px;
    background: repeating-linear-gradient(45deg, var(--theme-component-page-51), var(--theme-component-page-51) 10px, var(--theme-component-surface-61) 10px, var(--theme-component-surface-61) 20px);
    border: 1px dashed var(--bb-text-dim); text-align: center; border-radius: 8px;
}

@media (max-width: 900px) {
    .sim-grid { grid-template-columns: 1fr; }
    .quarantine-box { height: 250px; margin-top: 20px; }
}

/* =========================================================
   MODULE 24: CVSS 3.1 METRIC DETECTIVE (RESTORED LAYOUT)
========================================================= */

/* Reticle Fix */
.cursor, .cursor-dot {
    pointer-events: none;
    position: fixed;
    z-index: 99999 !important;
    visibility: visible;
}

/* Original 2-Column Grid Layout */
.cvss-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    margin-top: 20px;
    align-items: start;
}

/* Metrics Grid (Restored 4-Column Look) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    min-height: 350px;
}

/* Panels */
.cvss-layout .panel { margin-bottom: 0; }

/* Draggable Cards */
.cvss-card {
    background: var(--theme-component-primary-40);
    border: 1px solid var(--theme-component-primary-41);
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    transition: 0.2s all ease;
}

.cvss-card:hover {
    border-color: var(--bb-kelly);
    background: var(--theme-component-primary-81);
    transform: translateX(4px);
}

.cvss-card.dragging {
    opacity: 0.5;
    border-color: var(--bb-kelly);
    box-shadow: 0 0 15px var(--bb-kelly);
}

.cvss-card.correct { border-left: 3px solid var(--bb-kelly); background: var(--theme-component-primary-3); }
.cvss-card.incorrect { border-left: 3px solid var(--bb-error); background: var(--theme-component-error-3); }

/* Drop Zones */
.metric-zone {
    background: var(--theme-component-page-50);
    border: 1px dashed var(--bb-text-dim);
    border-radius: 8px;
    padding: 10px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.metric-zone.highlight {
    border-color: var(--bb-kelly);
    box-shadow: inset 0 0 20px var(--theme-component-primary-3);
}

.metric-zone.incorrect-zone { border-color: var(--bb-error); }

/* UI Helpers */
.vector-box {
    background: var(--theme-component-page-22);
    border: 1px solid var(--bb-kelly);
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speed-panel { display: none; }
.speed-panel.active { display: block; }

@media (max-width: 1100px) {
    .cvss-layout { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
/* =========================================================
   MODULE X: SCROLL REVEAL (Index-like entrance)
========================================================= */
.reveal-on-scroll{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .reveal-on-scroll{
    opacity: 1;
    transform: none;
    transition: none;
  }
}


