/* =========================================================
   BB'S CYBER ELITE THEME - MASTER MODULAR CSS v2.2
   Updates: Added Module 21 (Flashcards) & Module 22 (Quiz Bank)
   Updates: Module 23 Fixed Terminal Sizing (1800px) & Input Visibility
========================================================= */

/* =========================================================
   MODULE 0: CORE VARIABLES & FONTS
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;700&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --bb-bg-deep: #05080a;
  --bb-bg-surface: #0f161b;
  --bb-bg-glass: rgba(15, 22, 27, 0.75);
  
  --bb-text-main: #ECEFF1;
  --bb-text-muted: #90A4AE;
  --bb-text-dim: #546E7A;
  
  --bb-kelly: #00C853;
  --bb-cyan: #00B0FF;
  --bb-error: #FF5252;
  --bb-gold: #FFD600;
  --bb-carrot: #ED7117;
  --bb-amber: #893101;
  --bb-honey: #EC9706;
  --bb-cherry: #E3242B;
  --bb-sangria: #920039;
  --bb-basil: #32612D;
  --bb-sage: #728C69;
  --bb-purple: #A32CC4;
  --bb-lav: #E39FF6;
  --bb-wine: #2C041C;

  
  --bb-glow-primary: 0 0 20px rgba(0, 200, 83, 0.25);
  --bb-glow-hover: 0 0 35px rgba(0, 200, 83, 0.45);
  --bb-glass-blur: blur(12px);
  --bb-border-glass: 1px solid rgba(0, 200, 83, 0.15);
  
  --font-tech: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  
  --bb-radius-lg: 12px;
}

/* =========================================================
    MODULE 1: ATMOSPHERE & CURSOR (REVISED FOR TOUCH)
========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bb-bg-deep);
    color: var(--bb-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    cursor: none; /* Desktop default */
}

/* --- TACTICAL RETICLE SYSTEM --- */
.cursor {
    position: fixed; top: 0; left: 0;
    width: 50px; height: 50px;
    border: 2px solid var(--bb-kelly);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 100000;
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 0 4px rgba(0, 200, 83, 0.4);
    background-image: linear-gradient(90deg, var(--bb-kelly) 25%, transparent 25%, transparent 75%, var(--bb-kelly) 75%),
                      linear-gradient(180deg, var(--bb-kelly) 25%, transparent 25%, transparent 75%, var(--bb-kelly) 75%);
    background-position: center;
    background-size: 100% 2px, 2px 100%;
    background-repeat: no-repeat;
}

.cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 4px; height: 4px;
    background: #fff; border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 100001;
    box-shadow: 0 0 4px #fff;
}

/* MOBILE FIX: Hide reticle on touch devices */
@media (pointer: coarse) {
    body { cursor: auto !important; }
    .cursor, .cursor-dot { display: none !important; }
}
/* =========================================================
   MODULE 2: BUTTONS & UTILITIES
========================================================= */
/* Utility Classes */
.bb-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-kelly { color: var(--bb-kelly); }
.bb-muted { color: var(--bb-text-muted); }
.bb-center { display: flex; justify-content: center; }
.mb-60 { margin-bottom: 60px; }
.mt-20 { margin-top: 20px; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 28px; font-weight: 700; border-radius: 2px; font-size: 0.95rem;
  font-family: var(--font-tech); text-transform: uppercase; transition: 0.2s ease;
  text-decoration: none !important; cursor: pointer;
}

.btn-primary {
  background: var(--bb-kelly); color: #000 !important; border: none;
  box-shadow: var(--bb-glow-primary);
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}
.btn-primary:hover { background: #00E676; box-shadow: var(--bb-glow-hover); transform: translateY(-2px); }

.btn-secondary { 
  background: rgba(0, 200, 83, 0.05); border: 1px solid var(--bb-kelly); 
  color: var(--bb-kelly) !important; 
}
.btn-secondary:hover { background: rgba(0, 200, 83, 0.15); transform: translateY(-2px); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; border-color: var(--bb-text-dim); color: var(--bb-text-dim) !important; }

/* Small Button Variant */
.btn-sm { font-size: 0.8rem; padding: 8px 16px; }

/* =========================================================
   MODULE 3: NAVIGATION (Index-Matched)
========================================================= */
nav{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 8, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 200, 83, 0.3);
  padding: 10px 0;
}

nav .bb-container{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo img{
  height: 40px;
  filter: drop-shadow(0 0 5px var(--bb-kelly));
  transition: 0.3s ease;
}
nav .logo img:hover{
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px var(--bb-kelly));
}

/* keep it single-line like index; if it wraps on smaller widths we’ll handle with media queries later */
nav ul{
  display: flex;
  gap: 25px;
  list-style: none;
  flex-wrap: nowrap;
  align-items: center;
}

/* brighter + slightly larger than muted default */
nav ul li a{
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  color: rgba(236,239,241,0.88);
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 2px;
  position: relative;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* underline tab behavior like index */
nav ul li a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 2px;
  background: var(--bb-kelly);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  opacity: 0.95;
}

nav ul li a:hover,
nav ul li a.active{
  color: var(--bb-kelly);
  text-shadow: 0 0 10px rgba(0, 200, 83, 0.55);
}

nav ul li a:hover::after,
nav ul li a.active::after{
  transform: scaleX(1);
}

/* =========================================================
   MODULE 4: HERO & ANIMATION (Index Hero System)
========================================================= */

/* Base hero layout aligned to index */
.hero{
  position: relative;
  padding: 140px 0 100px; /* matches index */
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* index “Logo - Text - Logo” deck */
.hero-command-deck{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 1400px;
  position: relative;
  z-index: 2;
}

/* center block */
.hero-text{
  text-align: center;
  max-width: 800px;
  text-shadow: 0 0 30px rgba(0,0,0,0.9);
  position: relative;
  z-index: 2;
}

/* big headline matches index vibe */
.hero h1{
  font-family: var(--font-tech);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 18px;
}

/* paragraph tone */
.hero p{
  color: var(--bb-text-muted);
  max-width: 900px;
  margin: 0 auto;
}

/* watermark flank logos */
.hero-flank-logo{
  height: 180px;
  width: auto;
  opacity: 0.08;
  filter: grayscale(100%) brightness(1.2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: 0.3s all ease;
}

@media (max-width: 1200px){
  .hero-flank-logo{ display:none; }
}

/* CTA alignment: index uses centered on hero pages */
.hero .cta-buttons{
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
}

/* hero background svg behavior */
.bb-hero-bg-svg{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.35; /* index uses 0.35 */
  pointer-events: none;
}

/* Hex animation classes (shared) */
.hex-path{
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.hex-active{
  fill: var(--bb-kelly);
  stroke: none;
  opacity: 0;
  animation: hexPulse 4s infinite;
}

.hex-scan-line{
  fill: url(#scanGradient);
  opacity: 0.5;
  animation: hexScan 8s linear infinite;
}

@keyframes hexPulse{
  0%, 100%{ opacity: 0; }
  50%{ opacity: 0.2; }
}

@keyframes hexScan{
  0%{ transform: translateY(-10%); }
  100%{ transform: translateY(110%); }
}
/* =========================================================
   MODULE 5: NEWSLETTER / INTEL FEED
========================================================= */
.newsletter-section {
  background: linear-gradient(180deg, var(--bb-bg-surface) 0%, var(--bb-bg-deep) 100%);
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.newsletter-box {
  background: var(--bb-bg-glass);
  border: 1px solid var(--bb-kelly);
  border-radius: var(--bb-radius-lg);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 200, 83, 0.05);
}

.newsletter-box::before {
  content: ">> SYSTEM STATUS: RECEIVING";
  position: absolute; top: 15px; left: 20px;
  font-family: var(--font-code); font-size: 0.7rem;
  color: var(--bb-kelly); opacity: 0.8; letter-spacing: 1px;
}

.newsletter-box h3 {
  font-family: var(--font-tech); font-size: 2rem;
  text-transform: uppercase; margin-bottom: 10px; color: #fff;
}

.newsletter-form {
  display: flex; gap: 15px; max-width: 550px;
  margin: 30px auto 0; justify-content: center;
}

.newsletter-input {
  flex: 1; background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bb-text-dim);
  color: var(--bb-kelly); font-family: var(--font-code);
  padding: 14px 20px; border-radius: 2px; outline: none;
  transition: all 0.3s ease;
}
.newsletter-input::placeholder { color: var(--bb-text-dim); opacity: 0.6; }
.newsletter-input:focus {
  border-color: var(--bb-kelly);
  box-shadow: 0 0 15px rgba(0, 200, 83, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-input, .newsletter-form .btn-primary { width: 100%; }
}

/* =========================================================
   MODULE 6: PANELS & CARDS
========================================================= */
.panel, .dossier-card {
  padding: 32px 40px; margin-bottom: 40px; background: var(--bb-bg-glass);
  backdrop-filter: var(--bb-glass-blur); border: var(--bb-border-glass); border-radius: var(--bb-radius-lg);
}
.panel h2, .panel h3 { margin-bottom: 15px; }
.panel p, .dossier-card p { margin-bottom: 16px; color: var(--bb-text-muted); }
.panel ul, .panel ol { padding-left: 35px; margin-bottom: 20px; color: var(--bb-text-muted); }
.panel li { margin-bottom: 10px; }

.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; font-family: var(--font-tech); text-transform: uppercase; }
.section-sub { text-align: center; color: var(--bb-text-muted); margin-top: -30px; margin-bottom: 50px; }

/* =========================================================
   MODULE 7: FOOTER
========================================================= */
footer { text-align: center; padding: 60px 0; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 80px; }
footer img { height: 40px; margin-bottom: 15px; opacity: 0.6; transition: 0.3s; }
footer img:hover { opacity: 1; filter: drop-shadow(0 0 8px var(--bb-kelly)); }

/* --- DRILL CARD GRID (RESPONSIVE OVERWRITE) --- */
.drill-grid {
    display: grid;
    /* This line is the magic: it stays 380px on PC but drops to 100% on phones */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 25px;
    margin-top: 40px;
}

.drill-card {
    background: rgba(0, 200, 83, 0.03);
    border: 1px solid rgba(0, 200, 83, 0.2);
    border-radius: 8px;
    padding: clamp(15px, 4vw, 30px); /* Padding shrinks on smaller screens */
    display: flex;
    flex-direction: column;
    transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
/* =========================================================
   MODULE 12: WIRESHARK TABLES
========================================================= */
.ws-sim-container { margin-top: 25px; }
.ws-table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; margin-top: 20px; }

.ws-table { width: 100%; border-collapse: collapse; font-family: var(--font-code); font-size: 0.85rem; min-width: 600px; }
.ws-table th { background: rgba(0,255,136,0.1); color: var(--bb-kelly); padding: 12px; text-align: left; font-weight: 700; border-bottom: 1px solid rgba(0,255,136,0.2); }
.ws-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; color: var(--bb-text-muted); }
.ws-table tr:hover { background: rgba(255,255,255,0.05); }
.ws-table tr.active { background: rgba(0,255,136,0.15); border-left: 3px solid var(--bb-kelly); }

.ws-details { margin-top: 15px; background: #000; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 20px; font-family: var(--font-code); font-size: 0.85rem; min-height: 150px; }

/* --- HOVER FIX: Tooltip Styles --- */
    .ws-explain {
        position: relative;
        cursor: help;
        text-decoration: underline;
        text-decoration-style: dotted;
        color: #fff; /* Ensure the link text itself is visible */
    }

    .ws-explain::after {
        content: attr(data-explain);
        position: absolute;
        
        /* High Z-Index to force it on top of all other layers */
        z-index: 99999; 
        
        left: 20px; 
        top: 1.5em;
        
        /* Solid black background prevents text underneath from showing through */
        background-color: #05080a; 
        
        /* Visual styling to match theme */
        border: 1px solid #00C853; 
        color: #ffffff;
        padding: 10px 12px;
        border-radius: 6px;
        font-family: 'Inter', sans-serif;
        font-size: 0.85rem;
        line-height: 1.4;
        min-width: 260px;
        max-width: 350px;
        white-space: normal;
        
        /* Drop shadow helps separate it from the background */
        box-shadow: 0 4px 20px rgba(0,0,0,0.95); 

        /* Animation */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.1s ease-in-out;
        pointer-events: none; /* Prevents cursor flickering */
    }

    .ws-explain:hover::after {
        opacity: 1;
        visibility: visible;
    }
/* =========================================================
   MODULE 13: WIDGETS & GRIDS
========================================================= */
/* Myth Grid */
.myth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.myth-col { background: rgba(0,0,0,0.3); padding: 24px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.myth-col h3 { color: var(--bb-kelly); font-size: 1.1rem; margin-bottom: 15px; border-bottom: 1px dashed rgba(0,255,136,0.3); padding-bottom: 10px; }
.myth-list { list-style: none !important; padding: 0 !important; }
.myth-list li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: var(--bb-text-muted); }
.icon-x { color: var(--bb-error); font-weight: bold; }
.icon-check { color: var(--bb-kelly); font-weight: bold; }

@media (max-width: 700px) { .myth-grid { grid-template-columns: 1fr; } }

/* Quote / Insight Box */
.quote-box {
  border-left: 3px solid var(--bb-kelly);
  background: rgba(0,255,136,0.05);
  padding: 20px; margin-top: 25px;
  border-radius: 0 8px 8px 0;
}
.quote-text { font-style: italic; color: #fff; margin-bottom: 10px; font-size: 1.1rem; }

/* Dossier Card Headers */
.dossier-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.dossier-title { font-family: var(--font-tech); font-weight: 700; font-size: 1.2rem; color: #fff; text-transform: uppercase; }
.dossier-status { font-family: var(--font-code); font-size: 0.75rem; padding: 4px 8px; border: 1px solid var(--bb-kelly); color: var(--bb-kelly); border-radius: 4px; letter-spacing: 1px; }

/* Archives Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.dossier-card { display: flex; flex-direction: column; }

/* =========================================================
   MODULE 14: ELITE RESOURCE GRIDS & BUTTONS
========================================================= */
.elite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.elite-resource-btn {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(0, 200, 83, 0.05);
    border: 1px solid rgba(0, 200, 83, 0.25);
    border-radius: 8px;
    padding: 28px;
    text-decoration: none;
    transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.elite-resource-btn:hover {
    background: rgba(0, 200, 83, 0.08);
    border-color: var(--bb-kelly);
    transform: translateY(-4px);
    box-shadow: var(--bb-glow-primary);
}

.elite-resource-btn i, .elite-resource-btn img {
    font-size: 1.8rem;
    color: var(--bb-kelly);
    filter: drop-shadow(0 0 8px rgba(0, 200, 83, 0.4));
    flex-shrink: 0;
    margin-top: 5px;
}
.elite-resource-btn img { height: 45px; width: auto; }

.btn-text { display: flex; flex-direction: column; gap: 8px; }

.btn-title {
    font-family: var(--font-tech);
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 1.5px;
    font-size: 1.1rem;
}

.btn-sub {
    font-size: 0.9rem;
    color: var(--bb-text-muted);
    line-height: 1.5;
}

.category-header {
    color: var(--bb-kelly); 
    margin: 50px 0 20px 0; 
    font-family: var(--font-tech); 
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(0, 200, 83, 0.2);
    padding-bottom: 10px;
}

@media (max-width: 500px) {
    .elite-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   MODULE 15: MISSION CARDS & RADAR ANIMATION
========================================================= */

/* --- THREAT RADAR ANIMATION --- */
.radar-grid {
    fill: none;
    stroke: var(--bb-kelly);
    stroke-width: 1;
    opacity: 0.2;
}

.radar-sweep-group {
    transform-origin: 500px 300px; /* Center of SVG viewbox */
    animation: radarSpin 4s infinite linear;
}

.radar-line {
    stroke: var(--bb-kelly);
    stroke-width: 2;
    filter: drop-shadow(0 0 5px var(--bb-kelly));
}

.radar-trail {
    fill: url(#sweepGradient);
    opacity: 0.3;
}

/* Blips */
.blip-safe {
    fill: var(--bb-kelly);
    opacity: 0;
    animation: blipFade 4s infinite;
}

.blip-threat {
    fill: #ff3333; /* Red for threat */
    opacity: 0;
    animation: blipFadeThreat 4s infinite;
    filter: drop-shadow(0 0 8px #ff0000);
}

/* Automated Response Shield */
.shield-icon {
    fill: none;
    stroke: var(--bb-kelly);
    stroke-width: 2;
    opacity: 0;
    animation: shieldDeploy 4s infinite;
}

@keyframes radarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@keyframes blipFade {
    0% { opacity: 0; }
    20% { opacity: 1; r: 6; } /* Ping on scan */
    100% { opacity: 0; r: 2; }
}

@keyframes blipFadeThreat {
    0% { opacity: 0; }
    45% { opacity: 0; } /* Wait for scanner */
    50% { opacity: 1; r: 8; }
    100% { opacity: 0; r: 2; }
}

@keyframes shieldDeploy {
    0%, 55% { opacity: 0; transform: scale(0.5); }
    60% { opacity: 1; transform: scale(1.2); }
    70% { transform: scale(1); }
    100% { opacity: 0; }
}

/* --- MISSION CARD LAYOUT --- */
.lab-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); 
    gap: 30px; 
    margin-top: 30px; 
}

.lab-card { 
    background: rgba(0, 200, 83, 0.03); 
    border: 1px solid rgba(0, 200, 83, 0.2); 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: 0.3s all ease; 
}

.lab-card:hover { 
    border-color: var(--bb-kelly); 
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.15); 
    transform: translateY(-5px); 
    background: rgba(0, 200, 83, 0.06); 
}

.lab-visual { 
    position: relative; 
    height: 220px; 
    border-bottom: 1px solid rgba(0, 200, 83, 0.2); 
    overflow: hidden; 
    background: #000; 
}

.lab-visual img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0.8; 
    transition: 0.3s; 
}

.lab-card:hover .lab-visual img { opacity: 1; transform: scale(1.02); }

.lab-badges { 
    position: absolute; top: 15px; left: 15px; 
    display: flex; gap: 8px; flex-wrap: wrap; 
}

.badge { 
    font-family: var(--font-code); font-size: 0.7rem; 
    text-transform: uppercase; padding: 4px 8px; 
    border-radius: 2px; font-weight: 700; 
}

.badge-primary { background: var(--bb-kelly); color: #000; }
.badge-secondary { background: rgba(0,0,0,0.8); color: var(--bb-text-muted); border: 1px solid var(--bb-text-dim); }

.lab-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }

.lab-title { 
    font-family: var(--font-tech); color: #fff; 
    font-size: 1.4rem; text-transform: uppercase; 
    margin-bottom: 15px; line-height: 1.2; 
}

.lab-desc { 
    font-size: 0.95rem; color: var(--bb-text-muted); 
    margin-bottom: 20px; flex-grow: 1; 
}

.lab-skills { 
    background: rgba(0,0,0,0.3); padding: 15px; 
    border-radius: 4px; border-left: 3px solid var(--bb-text-dim); 
    margin-bottom: 25px; 
}

.lab-skills h4 { 
    color: var(--bb-text-main); font-size: 0.8rem; 
    text-transform: uppercase; margin-bottom: 8px; 
    font-family: var(--font-code); 
}

.lab-skills ul { padding-left: 20px; font-size: 0.85rem; color: var(--bb-text-muted); }
.lab-skills li { margin-bottom: 4px; }

.btn-launch { 
    text-align: center; 
    background: rgba(0, 200, 83, 0.1); 
    border: 1px solid var(--bb-kelly); 
    color: var(--bb-kelly); padding: 12px; 
    text-transform: uppercase; font-weight: 700; 
    text-decoration: none; transition: 0.2s; 
    font-family: var(--font-tech); letter-spacing: 1px; 
}

.btn-launch:hover { background: var(--bb-kelly); color: #000; box-shadow: 0 0 15px rgba(0, 200, 83, 0.4); }

.cert-header { 
    color: var(--bb-kelly); 
    margin: 60px 0 20px 0; 
    font-family: var(--font-tech); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    border-bottom: 1px solid rgba(0, 200, 83, 0.2); 
    padding-bottom: 10px; 
    font-size: 1.8rem; 
}

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

/* =========================================================
   MODULE 16: SECURE COMMS & TERMINAL FORMS
   Styles for Suggestions/Contact Page
========================================================= */

/* --- COMMS HEADER VISUAL --- */
.comms-header {
    position: relative;
    padding: 100px 0 60px;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 200, 83, 0.2);
}

.comms-svg {
    height: 150px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 200, 83, 0.3));
}

/* SVG Animations */
.signal-wave { animation: signalMove 2s infinite linear; opacity: 0; }
.signal-wave:nth-child(2) { animation-delay: 0.5s; }
.signal-wave:nth-child(3) { animation-delay: 1s; }

@keyframes signalMove {
    0% { opacity: 1; transform: translateX(0) scale(0.5); }
    100% { opacity: 0; transform: translateX(100px) scale(1.5); }
}

.dish-rotate { 
    animation: dishScan 8s ease-in-out infinite alternate; 
    transform-origin: center bottom; 
}
@keyframes dishScan { from { transform: rotate(-15deg); } to { transform: rotate(15deg); } }

/* --- TERMINAL FORM CONTAINER --- */
.terminal-container {
    max-width: 1800px;
    margin: 40px auto;
    background: rgba(10, 16, 20, 0.8);
    border: 1px solid var(--bb-kelly);
    position: relative;
}

.terminal-header {
    background: rgba(0, 200, 83, 0.1);
    padding: 10px 20px;
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--bb-kelly);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 200, 83, 0.3);
}

.terminal-status { display: flex; gap: 10px; align-items: center; }
.status-blink { width: 8px; height: 8px; background: var(--bb-kelly); border-radius: 50%; animation: blink 1s infinite; }

.terminal-body { padding: 30px; }

/* --- FORM INPUTS --- */
.form-group { margin-bottom: 25px; }

.form-label {
    display: block;
    font-family: var(--font-tech);
    text-transform: uppercase;
    color: var(--bb-kelly);
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-input, .form-textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0, 200, 83, 0.3);
    padding: 12px;
    color: var(--bb-text-main);
    font-family: var(--font-code);
    transition: 0.3s;
}

/* Fix for Dropdown Options Background */
.form-input option {
    background-color: #000;
    color: var(--bb-text-main);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--bb-kelly);
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.2) inset;
    background: rgba(0, 200, 83, 0.05);
}

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

/* --- TRANSMIT BUTTON --- */
.btn-transmit {
    width: 100%;
    padding: 15px;
    background: var(--bb-kelly);
    color: #000;
    font-family: var(--font-tech);
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
    cursor: pointer;
}

.btn-transmit:hover {
    background: #00e676;
    box-shadow: 0 0 30px rgba(0, 200, 83, 0.5);
}

.btn-transmit::after {
    content: "";
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}
.btn-transmit:hover::after { left: 100%; }

/* --- TRANSMISSION OVERLAY --- */
.transmission-overlay {
    position: absolute; inset: 0;
    background: rgba(5, 8, 10, 0.95);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 10;
    visibility: hidden; opacity: 0;
    transition: 0.3s;
    font-family: var(--font-code);
}
.transmission-overlay.active { visibility: visible; opacity: 1; }

.progress-bar-container {
    width: 60%; height: 10px; background: #333;
    margin: 20px 0; border-radius: 5px; overflow: hidden;
}
.progress-bar {
    height: 100%; width: 0%; background: var(--bb-kelly);
    transition: width 3s ease-in-out;
    box-shadow: 0 0 10px var(--bb-kelly);
}
.success-message { color: var(--bb-kelly); font-size: 1.5rem; display: none; text-transform: uppercase; }

/* =========================================================
   MODULE 17: TACTICAL GAME INTERFACE (Firewall Escape)
========================================================= */
.game-ui-container {
    max-width: 900px;
    margin: 40px auto;
    background: #000;
    border: 1px solid var(--bb-kelly);
    box-shadow: 0 0 30px rgba(0, 200, 83, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* CRT Scanline Overlay */
.game-ui-container::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 5;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.game-header {
    background: rgba(0, 200, 83, 0.1);
    padding: 15px 25px;
    border-bottom: 1px solid var(--bb-kelly);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-tech);
}

.game-timer { font-size: 1.2rem; color: var(--bb-error); font-weight: bold; animation: pulseRed 1s infinite; }
@keyframes pulseRed { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.game-screen {
    padding: 40px;
    flex-grow: 1;
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}
.game-screen.active { display: flex; }

.game-title {
    font-family: var(--font-tech);
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--bb-kelly);
}

.game-desc { font-size: 1.1rem; color: var(--bb-text-muted); margin-bottom: 30px; max-width: 600px; }

.challenge-box {
    background: rgba(255,255,255,0.05);
    border: 1px dashed var(--bb-text-dim);
    padding: 25px;
    margin-bottom: 25px;
}

.game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.game-btn {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--bb-kelly);
    color: var(--bb-kelly);
    padding: 15px;
    font-family: var(--font-code);
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
}
.game-btn:hover { background: var(--bb-kelly); color: #000; box-shadow: 0 0 15px var(--bb-kelly); }

.feedback-msg {
    margin-top: 15px;
    font-family: var(--font-code);
    font-weight: bold;
    min-height: 24px;
}
.feedback-success { color: var(--bb-kelly); }
.feedback-fail { color: var(--bb-error); }

/* Progress Dots */
.level-indicators { display: flex; gap: 5px; }
.level-dot { width: 10px; height: 10px; background: #333; border-radius: 50%; }
.level-dot.active { background: var(--bb-kelly); box-shadow: 0 0 5px var(--bb-kelly); }

/* =========================================================
   MODULE 19: BB'S POMODORO TIMER
========================================================= */

/* Main Layout Shell */
.pomodoro-shell {
    display: grid;
    grid-template-columns: 1fr 350px; /* Timer on left, Settings/Info on right */
    grid-template-rows: auto auto;
    gap: 30px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.pomodoro-header-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 200, 83, 0.2);
    margin-bottom: 20px;
}

.pomodoro-title {
    font-family: var(--font-tech);
    color: var(--bb-kelly);
    text-transform: uppercase;
    font-size: 2rem;
    margin: 0;
}

/* --- THE TIMER CARD (Left Side) --- */
.pomodoro-timer-card {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    background: var(--bb-bg-glass);
    border: 1px solid var(--bb-kelly);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 200, 83, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 600px;
}

/* Phase Buttons (Work / Short / Long) */
.timer-phase-modes {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-radius: 30px;
}

.timer-phase-button {
    border-radius: 25px;
    border: none !important;
    font-size: 0.9rem;
    padding: 8px 20px;
    opacity: 0.7;
    transition: 0.3s;
}

.timer-phase-button.active {
    background: var(--bb-kelly) !important;
    color: #000 !important;
    opacity: 1;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.4);
}

/* The SVG Ring & Time Display */
.timer-visual-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 40px;
}

.timer-ring-container {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start from top */
}

#timer-ring { width: 100%; height: 100%; }

.timer-ring-bg { stroke: rgba(255,255,255,0.05); }
.timer-ring-fg { stroke: var(--bb-kelly); transition: stroke-dashoffset 0.5s linear; }

.timer-display {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.timer-time {
    font-family: var(--font-code);
    font-size: 4.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
}

.timer-phase-label {
    font-family: var(--font-tech);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--bb-kelly);
    margin-top: 10px;
}

.timer-session-counter {
    font-size: 0.85rem;
    color: var(--bb-text-muted);
    margin-top: 5px;
}

/* Controls */
.timer-main-button {
    font-size: 1.5rem !important;
    padding: 15px 50px !important;
    margin-bottom: 20px;
    width: 200px;
}

.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.timer-status-line {
    font-family: var(--font-code);
    color: var(--bb-text-main);
    min-height: 1.5em;
    margin-bottom: 20px;
}

.timer-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.9rem;
    color: var(--bb-text-muted);
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
}

/* --- SETTINGS & INFO CARDS (Right Side) --- */
.pomodoro-settings-card, .pomodoro-info-card {
    grid-column: 2 / 3;
    background: rgba(10, 16, 20, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 25px;
}

.pomodoro-settings-card h3, .pomodoro-info-card h3 {
    color: var(--bb-kelly);
    font-family: var(--font-tech);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.timer-preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.timer-preset-button {
    background: transparent;
    border: 1px solid var(--bb-text-dim);
    color: var(--bb-text-muted);
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}

.timer-preset-button.active, .timer-preset-button:hover {
    border-color: var(--bb-kelly);
    color: var(--bb-kelly);
    background: rgba(0, 200, 83, 0.05);
}

.timer-custom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.timer-custom-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--bb-text-muted);
}

.timer-custom-grid input {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-family: var(--font-code);
}

.timer-custom-grid input:focus {
    border-color: var(--bb-kelly);
    outline: none;
}

.timer-settings-note {
    font-size: 0.8rem;
    color: var(--bb-kelly);
    margin-top: 10px;
    min-height: 1.2em;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .pomodoro-shell {
        grid-template-columns: 1fr;
    }
    .pomodoro-timer-card {
        grid-row: auto;
    }
}

/* =========================================================
   MODULE 20: WIRESHARK CHEAT SHEET & SIMULATOR
========================================================= */

/* --- FILTER CARDS --- */
.filter-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.filter-card {
    background: linear-gradient(145deg, rgba(0, 40, 30, 0.95), rgba(0, 10, 5, 0.98));
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.35);
    padding: 0.9rem 1rem 1rem 1rem;
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.15);
}

.filter-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    color: #bfffe0; /* Keeping your specific pale green */
    font-family: var(--font-tech);
}

.filter-card p {
    margin: 0.25rem 0 0.4rem 0;
    font-size: 0.9rem;
    color: var(--bb-text-muted);
}

.filter-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.filter-tag {
    font-family: var(--font-code);
    font-size: 0.78rem;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 136, 0.55);
    background: rgba(0, 0, 0, 0.65);
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    color: #fff;
}

/* --- PACKET EXPLANATION CARDS --- */
.packet-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.packet-card {
    background: linear-gradient(145deg, rgba(0, 25, 40, 0.96), rgba(0, 5, 20, 0.98));
    border-radius: 12px;
    border: 1px solid rgba(0, 180, 255, 0.4);
    padding: 0.9rem 1rem 1rem 1rem;
}

.packet-card h3 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: #c6e8ff; /* Keeping your pale blue */
    font-family: var(--font-tech);
}

.packet-card p {
    margin: 0.2rem 0;
    font-size: 0.88rem;
    color: var(--bb-text-muted);
}

.packet-fields {
    margin-top: 0.4rem;
    font-family: var(--font-code);
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 6px 8px;
    color: var(--bb-text-main);
}

/* --- WIRESHARK SIMULATOR UI --- */
.ws-sim-container {
    margin-top: 1.5rem;
}

.ws-sim {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.ws-sim-header {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.25);
    font-size: 0.9rem;
    background: radial-gradient(circle at top left, rgba(0, 255, 136, 0.18), rgba(0, 0, 0, 0.8));
    color: var(--bb-text-muted);
}

.ws-sim-grid {
    display: grid;
    grid-template-rows: 40% 35% 25%;
    flex: 1;
}

.ws-sim-pane {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 8px;
    overflow: auto;
    font-size: 0.85rem;
}

.ws-sim-pane h4 {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #00ff88; /* Your neon green */
    font-family: var(--font-tech);
}

.ws-sim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    font-family: var(--font-code);
}

.ws-sim-table thead {
    background: rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1;
}

.ws-sim-table th, .ws-sim-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    text-align: left;
    color: var(--bb-text-muted);
}

.ws-sim-table th {
    font-weight: 600;
    color: #bfffe0;
}

.ws-sim-row { cursor: pointer; }
.ws-sim-row:hover { background: rgba(0, 255, 136, 0.07); }
.ws-sim-row.active { background: rgba(0, 255, 136, 0.16); }
.ws-sim-row.active td { color: #fff; }

.ws-sim-details-layer { margin-bottom: 4px; }
.ws-sim-details-layer strong { color: #bfffe0; }
.ws-sim-details-layer ul { margin: 3px 0 4px 16px; padding: 0; }
.ws-sim-details-layer li { list-style: disc; margin-bottom: 1px; color: var(--bb-text-muted); }

.ws-sim-bytes {
    font-family: var(--font-code);
    white-space: pre;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    padding: 6px;
    color: var(--bb-text-muted);
}

/* Hover Tooltips */
.ws-explain {
    position: relative;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    color: #fff;
}

.ws-explain::after {
    content: attr(data-explain);
    position: absolute;
    z-index: 30;
    left: 0;
    top: 1.4em;
    background: rgba(0, 0, 0, 0.96);
    border: 1px solid rgba(0, 255, 136, 0.85);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.3;
    min-width: 220px;
    max-width: 320px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    color: #fff;
}

.ws-explain:hover::after { opacity: 1; visibility: visible; }

@media (max-width: 900px) {
    .ws-sim-grid { grid-template-rows: 45% 30% 25%; }
}


/* =========================================================
   MODULE 21: FLASHCARD SYSTEM (RESPONSIVE + TACTICAL VISUALS)
========================================================= */

/* --- GRID LAYOUT --- */
.flashcard-grid {
  display: grid;
  /* Fluid columns: Stays 300px on PC, drops to 100% on phones */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* --- CARD CONTAINER (Perspective) --- */
.flashcard {
  position: relative;
  width: 100%;
  height: 250px; /* Fixed height for 3D flip stability */
  perspective: 1000px;
  cursor: pointer;
}

/* The invisible checkbox that controls the state */
.flashcard-toggle {
  display: none;
}

/* --- SHARED FACE STYLES --- */
.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0; top: 0;
  border-radius: 12px;
  padding: 25px;
  backface-visibility: hidden; /* Critical for flip */
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(0, 200, 83, 0.2);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* --- FRONT FACE VISUALS --- */
.flashcard-front {
  background: var(--bb-bg-surface);
  transform: rotateY(0deg); 
  z-index: 2;
}

.flashcard-front:hover {
  border-color: var(--bb-kelly);
  box-shadow: 0 0 15px rgba(0, 200, 83, 0.2);
}

.flashcard-front h3 {
  font-family: var(--font-tech);
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 5px;
  text-shadow: 0 0 10px rgba(0, 200, 83, 0.3);
}

.protocol-category {
  font-size: 0.9rem;
  color: var(--bb-text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
}

/* --- BACK FACE VISUALS --- */
.flashcard-back {
  background: linear-gradient(145deg, rgba(0, 30, 20, 0.95), #000);
  transform: rotateY(180deg);
  border: 1px solid var(--bb-kelly);
}

.port-line {
  font-family: var(--font-code);
  font-size: 1.4rem;
  color: var(--bb-kelly);
  font-weight: 700;
  margin-bottom: 10px;
}

.flashcard-back p {
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.4;
}

.exam-tip {
  font-size: 0.85rem !important;
  color: var(--bb-gold) !important;
  background: rgba(255, 214, 0, 0.05);
  padding: 8px;
  border-radius: 4px;
  border-left: 2px solid var(--bb-gold);
  width: 100%;
  margin-top: auto; 
}

/* --- FLIP ANIMATION LOGIC --- */
.flashcard-toggle:checked ~ .flashcard-front { transform: rotateY(-180deg); }
.flashcard-toggle:checked ~ .flashcard-back { transform: rotateY(0deg); }

/* --- MOBILE TWEAKS --- */
@media (max-width: 600px) {
  .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: rgba(10, 10, 10, 0.92);
  --bb-green: #00ff88;
  --bb-green-2: #00c26a;
  --bb-red: #ff4b4b;
  --bb-yellow: #ffd60a;
  --bb-shadow: 0 14px 50px rgba(0,0,0,.58);
  --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 rgba(0, 255, 136, 0.28);
  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 rgba(0,255,136,0.15);
}

.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 rgba(0,255,136,0.55);
  border: 1px solid rgba(0,255,136,0.75);
  background: #000; 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: 12.5px; color: var(--bb-text-muted); line-height: 1.25; }

/* HIGH VISIBILITY TOGGLE BUTTON */
.bb-dash-toggle {
  background: var(--bb-green);
  color: #00130a;
  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 rgba(0,255,136,0.4);
  transition: 0.2s ease;
}
.bb-dash-toggle:hover {
  background: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,255,255,0.6);
}
.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 rgba(255,255,255,0.1);
}

.bb-pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,136,.32);
  background: rgba(0,0,0,.35);
  color: var(--bb-text-muted);
  font-weight: 800;
  font-size: 12px;
  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 rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.bb-filter .label {
  font-size: 12px; font-weight: 900; color: var(--bb-text-muted); margin-right: 2px;
}
.bb-fbtn {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: #fff;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  transition: 0.2s;
}
.bb-fbtn:hover { border-color: rgba(0,255,136,.45); }
.bb-fbtn.active {
  border-color: rgba(0,255,136,.75);
  background: rgba(0,255,136,.10);
  box-shadow: 0 0 15px rgba(0,255,136,.20);
}

/* 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:13.5px; }

/* Merged Look for Instructions/Focus */
.bb-instructions {
  display:grid; gap:8px; padding: 14px;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(0,255,136,.22);
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.bb-step { display:flex; gap:10px; align-items:flex-start; font-size:13.5px; 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 rgba(0,255,136,.55);
  flex:0 0 auto;
}

.bb-focus {
  margin-top: -1px; /* Overlap borders */
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(0,255,136,.22);
  border-top: none;
  background: rgba(0,0,0,.22);
  padding: 14px;
  display:grid; gap:8px;
}
.bb-focus .title {
  font-weight: 950; font-size: 13px; color: #fff;
  display:flex; justify-content:space-between; align-items:center;
}
.bb-focus .hint { font-size: 12px; 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: 12.5px; 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 rgba(0,255,136,.22);
  background: rgba(10,10,10,.95);
  box-shadow: 0 0 25px rgba(0,255,136,0.18);
  overflow:hidden;
  position: relative;
}
.bb-qcard::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width: 6px;
  background: rgba(0,255,136,.25); box-shadow: 0 0 18px rgba(0,255,136,.12);
}
.bb-qcard.diff-easy::before { background: rgba(0,255,136,.35); box-shadow: 0 0 20px rgba(0,255,136,.18); }
.bb-qcard.diff-medium::before { background: rgba(255,214,10,.32); box-shadow: 0 0 20px rgba(255, 214, 10, .14); }
.bb-qcard.diff-hard::before { background: rgba(255,75,75,.30); box-shadow: 0 0 20px rgba(255,75,75,.14); }

.bb-qhead { padding: 14px 18px 10px; border-bottom: 1px solid rgba(0,255,136,.14); background: rgba(0,0,0,.18); margin-left: 6px; }
.bb-qmeta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; color: var(--bb-text-muted); font-size: 12px; font-weight: 800; }
.bb-tag { border: 1px solid rgba(0,255,136,.26); border-radius: 999px; padding: 6px 8px; background: rgba(0,0,0,.25); }
.bb-tag.obj { border-color: rgba(120,160,255,.40); background: rgba(120,160,255,.08); color: #dbe4ff; }
.bb-tag.diff.easy { border-color: rgba(0,255,136,.55); background: rgba(0,255,136,.10); color: #bfffe4; }
.bb-tag.diff.medium { border-color: rgba(255, 214, 10, .55); background: rgba(255, 214, 10, .10); color: #fff2b8; }
.bb-tag.diff.hard { border-color: rgba(255,75,75,.60); background: rgba(255,75,75,.10); color: #ffd0d0; }
.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 rgba(0,255,136,.28); background: rgba(0,0,0,.28);
  cursor:pointer; transition: 0.15s ease; user-select:none; position:relative;
}
.bb-opt:hover { transform: translateY(-1px); border-color: rgba(0,255,136,.75); box-shadow: 0 0 22px rgba(0,255,136,.28); }
.bb-radio {
  width: 20px; height: 20px; border-radius:999px; border: 2px solid rgba(0,255,136,.75);
  box-shadow: 0 0 14px rgba(0,255,136,.22); flex:0 0 auto; position:relative; background: rgba(0,0,0,.35);
}
.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: rgba(0,255,136,.98); background: rgba(0,255,136,.10); }
.bb-opt.is-selected .bb-radio::after { background: var(--bb-green); box-shadow: 0 0 18px rgba(0,255,136,.75); }
.bb-qcard.is-locked .bb-opt { cursor: default; }
.bb-qcard.is-locked .bb-opt.is-correct { border-color: rgba(0,255,136,.98); background: rgba(0,255,136,.14); }
.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: rgba(255,75,75,.88); background: rgba(255,75,75,.08); }
.bb-qcard.is-locked .bb-opt.is-wrong .bb-radio { border-color: rgba(255,75,75,.90); }
.bb-qcard.is-locked .bb-opt.is-wrong .bb-radio::after { background: rgba(255,75,75,.95); }

.bb-explain {
  margin-top: 14px; padding: 12px; border-radius: 14px; border: 1px solid rgba(0,255,136,.24);
  background: rgba(0,0,0,.25); 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:12px; font-weight:900; border: 1px solid rgba(0,255,136,.40); color: var(--bb-green); background: rgba(0,255,136,.08); }
.bb-badge.bad { border-color: rgba(255,75,75,.55); color: #ffd0d0; background: rgba(255,75,75,.10); }
.bb-explain p { margin:0; line-height:1.45; font-size:13.5px; 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:12px; 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: #fff;
    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 rgba(0,0,0,0.8);
}

/* 3. Dossier Image Scanners */
.dossier-visual {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 200, 83, 0.4);
}
.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, #1a262f 0%, #05080a 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 rgba(0, 200, 83, 0.3);
    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 rgba(255,255,255,0.1);
    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: rgba(10, 16, 20, 0.9);
    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 rgba(0, 200, 83, 0.3);
    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: 0.7rem;
    color: var(--bb-kelly);
    margin-top: 4px;
}

.host-node .name {
    font-family: var(--font-tech);
    font-weight: 700;
    color: #fff;
    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: #0f161b;
    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 rgba(0, 200, 83, 0.1);
    animation: pulseBorder 3s infinite;
}

.infra-node.interactive:hover {
    background: rgba(0, 200, 83, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.4);
}

@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: 0.8rem;}

.quarantine-box {
    background: rgba(44, 4, 28, 0.4);
    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: rgba(227, 36, 43, 0.2);
    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: rgba(0,0,0,0.85);
    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 rgba(0,0,0,0.95);
    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 rgba(0, 200, 83, 0.2);
    display: flex; 
    flex-direction: column;
}

.modal-panel.system-box.error-mode {
    border-color: var(--bb-error);
    box-shadow: 0 0 50px rgba(255, 82, 82, 0.2);
}

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

.modal-header {
    background: var(--bb-kelly);
    color: #000;
    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: rgba(0, 200, 83, 0.1);
    color: var(--bb-kelly);
    border-bottom: 1px solid var(--bb-kelly);
    letter-spacing: 2px;
}

.modal-panel.system-box.error-mode .modal-header {
    background: rgba(255, 82, 82, 0.1);
    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: 1rem;
}

.modal-tabs {
    display: flex;
    background: rgba(0,0,0,0.5);
    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: rgba(255,255,255,0.05); color: #fff; }
.modal-tab.active {
    background: rgba(0, 200, 83, 0.1);
    color: var(--bb-kelly);
    border-bottom: 2px solid var(--bb-kelly);
}

.modal-content-area {
    position: relative;
    background: #0c0c0c; 
    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 rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.close-btn {
    background: none; border: none; color: #000; 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: #0c0c0c;
    padding: 20px; 
    font-family: var(--font-code); 
    font-size: 1.1rem;
    position: relative;
    box-sizing: border-box;
    border: 1px solid rgba(0, 200, 83, 0.2);
}

.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: #cccccc; 
    padding-bottom: 20px;
    white-space: pre-wrap; 
    line-height: 1.4;
}

.terminal-input-line {
    display: flex; 
    align-items: center; 
    border-top: 1px solid #333; 
    padding-top: 15px;
    flex-shrink: 0; /* Ensures this area never shrinks/disappears */
    background: #0c0c0c;
    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: #fff;
    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: #000;
    color: var(--bb-text-muted);
    font-family: var(--font-code);
    font-size: 0.85rem;
    padding: 20px;
    overflow-y: auto;
    height: 100%; 
    width: 100%;
}

.log-entry { margin-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,0.05); 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: 0.9rem;
}
.fw-rules-table th {
    text-align: left;
    padding: 15px;
    background: rgba(0, 200, 83, 0.1);
    color: var(--bb-kelly);
    border-bottom: 1px solid var(--bb-kelly);
}
.fw-rules-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}
.fw-toggle-btn {
    background: rgba(0,0,0,0.5);
    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: #000;
    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: rgba(0,0,0,0.3);
    border-right: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
}
.email-message-view {
    padding: 30px;
    overflow-y: auto;
    background: rgba(255,255,255,0.02);
    position: relative;
}
.email-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: 0.2s;
}
.email-item:hover { background: rgba(255,255,255,0.05); }
.email-item.active { background: rgba(0, 200, 83, 0.1); border-left: 3px solid var(--bb-kelly); }

.email-item.unread .email-subject { font-weight: bold; color: #fff; }
.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: 0.8rem; color: var(--bb-text-muted); display: block; margin-bottom: 2px; }
.email-subject { font-size: 0.9rem; display: block; margin-bottom: 2px; }
.email-date { font-size: 0.7rem; color: var(--bb-text-dim); float: right; }

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

.phishing-btn {
    position: absolute; top: 30px; right: 30px;
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid var(--bb-error);
    color: var(--bb-error);
    padding: 10px 15px;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}
.phishing-btn:hover { background: var(--bb-error); color: #000; }
.phishing-btn.flagged { background: var(--bb-error); color: #fff; 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: rgba(0, 200, 83, 0.05); 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: 0.9rem; line-height: 1.6; }
.intel-card ol { padding-left: 20px; }
.intel-card ol li { margin-bottom: 10px; color: var(--bb-text-muted); font-size: 0.9rem; }
.intel-card strong { color: #fff; }
.code-snippet {
    background: #000; color: var(--bb-error); font-family: var(--font-code);
    padding: 5px 8px; border-radius: 4px; font-size: 0.85rem;
}

.locked-intel {
    margin-top: 60px; padding: 60px;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.5), rgba(0,0,0,0.5) 10px, rgba(20,20,20,0.5) 10px, rgba(20,20,20,0.5) 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: rgba(0, 200, 83, 0.03);
    border: 1px solid rgba(0, 200, 83, 0.2);
    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: rgba(0, 200, 83, 0.08);
    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: rgba(0, 200, 83, 0.1); }
.cvss-card.incorrect { border-left: 3px solid var(--bb-error); background: rgba(255, 82, 82, 0.1); }

/* Drop Zones */
.metric-zone {
    background: rgba(0,0,0,0.3);
    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 rgba(0, 200, 83, 0.1);
}

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

/* UI Helpers */
.vector-box {
    background: #000;
    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;
  }
}


