/* =========================================================
   BB'S CYBER ELITE THEME - CORE TOKENS
========================================================= */

@import url('/css/shared/font-standard.css') ;

:root {
  --bb-bg-deep: var(--theme-learning-surface-247);
  --bb-bg-surface: var(--theme-component-surface-31);
  --bb-panel: var(--theme-learning-surface-249);
  --bb-text-main: var(--theme-component-ink-18);
  --bb-text-muted: var(--theme-component-muted-13);
  --bb-kelly: var(--theme-component-primary-1);
  --bb-green: var(--theme-component-primary-100);
  --bb-cyan: var(--theme-component-info-16);
  --bb-error: var(--theme-component-error-1);
  --bb-red: var(--theme-component-error-27);
  --bb-gold: var(--theme-learning-warning-257);
  --bb-yellow: var(--theme-learning-warning-258);
  --bb-glow-primary: 0 0 20px var(--theme-component-primary-35);
  --bb-radius: 12px;
  --bb-shadow: 0 14px 50px var(--theme-learning-shadow-color-260);
  --font-tech: 'Ultra', Georgia, serif;
  --font-body: 'Geist', sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  /* A+ Core 1 Domain Specific Colors */
  --c-mobile: var(--theme-learning-error-261);

  /* 1.0 Mobile Devices */
  --c-network: var(--theme-learning-info-262);

  /* 2.0 Networking */
  --c-hardware: var(--theme-learning-info-263);

  /* 3.0 Hardware */
  --c-cloud: var(--theme-learning-info-264);

  /* 4.0 Cloud & Virtualization */
  --c-trbl: var(--theme-learning-error-265);

  /* 5.0 Hardware & Network Troubleshooting */
  --easeOut: cubic-bezier(.16,1,.3,1);
  --easeInOut: cubic-bezier(.65,0,.35,1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bb-bg-deep);
  color: var(--bb-text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* Hide cursor on all interactive elements */

button, a, select, input, label, .card, .fused-tile {
  cursor: none !important;
}

/* --- 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: 2147483646;
  transition: width 0.2s, height 0.2s, border-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 4px var(--theme-learning-success-111);
  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::before, .cursor::after {
  content: '';
  position: absolute;
  opacity: 0.8;
}

.cursor::before {
  width: 50%;
  height: 1px;
  border-top: 2px dotted var(--bb-kelly);
}

.cursor::after {
  height: 50%;
  width: 1px;
  border-left: 2px dotted var(--bb-kelly);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--theme-catalog-surface-31);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2147483647;
  box-shadow: 0 0 4px var(--theme-component-border-7);
}

.cursor.active {
  width: 70px;
  height: 70px;
  border-color: var(--theme-component-border-7);
  box-shadow: 0 0 15px var(--bb-kelly);
  background-color: var(--theme-learning-success-bg-21);
}

/* Background Grid Animation */

body::before {
  content: ";
  position: fixed; inset: 0;
  background-image: linear-gradient(var(--theme-learning-success-bg-21) 1px, transparent 1px), 
    linear-gradient(90deg, var(--theme-learning-success-bg-21) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

/* =========================================================
   DASHBOARD & APP LAYOUT
========================================================= */
.bb-lab {
  max-width: 1500px;
  margin: 20px auto;
  padding: 0 20px 40px;
}

.bb-dashboard {
  background: var(--theme-learning-page-266);
  border: 1px solid var(--theme-learning-success-267);
  border-radius: var(--bb-radius);
  box-shadow: var(--bb-shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bb-dash-head {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--theme-learning-success-bg-268);
  border-bottom: 1px solid var(--theme-learning-success-269);
  flex-wrap: wrap;
  gap: 15px;
}

.bb-brand { display: flex; align-items: center; gap: 15px; }

.bb-titlewrap .bb-title {
  font-family: var(--font-tech);
  font-size: 1.4rem;
  text-transform: uppercase;
  color: var(--theme-component-ink-5);
  letter-spacing: 1px;
  margin: 0;
}
.bb-titlewrap .bb-subtitle {
  font-size: 15px;
  color: var(--bb-text-muted);
}

.bb-dash-body {
  padding: 20px;
}

/* KPIs */
.kpi-row {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pill {
  font-family: var(--font-code);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--theme-component-page-50);
  border: 1px solid var(--theme-component-border-15);
  color: var(--bb-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pill b { color: var(--bb-kelly); }

/* Energy Meter */
.energy-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  max-width: 450px;
}
.meter {
  height: 12px;
  background: var(--theme-component-page-22);
  border: 1px solid var(--theme-component-border-15);
  border-radius: 6px;
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}
.meter-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--bb-kelly), var(--bb-cyan));
  transition: width 0.4s var(--easeOut);
  box-shadow: 0 0 10px var(--theme-learning-success-2);
}

/* Action Buttons */
.lab-btn {
  background: transparent;
  border: 1px solid var(--bb-kelly);
  color: var(--bb-kelly);
  padding: 8px 16px;
  font-family: var(--font-tech);
  text-transform: uppercase;
  font-weight: 700;
  transition: 0.2s;
  letter-spacing: 1px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: max(14px, 0.9rem);
}
.lab-btn:hover {
  background: var(--bb-kelly); color: var(--theme-component-on-primary-3);
  box-shadow: 0 0 15px var(--theme-learning-success-6);
}
.lab-btn:disabled {
  opacity: 0.3; border-color: var(--bb-text-dim); color: var(--bb-text-dim);
}
.lab-btn.secondary { border-color: var(--bb-text-muted); color: var(--bb-text-muted); }
.lab-btn.secondary:hover { border-color: var(--theme-component-border-7); color: var(--theme-component-ink-5); background: var(--theme-catalog-surface-541); }
.lab-btn.danger { border-color: var(--bb-red); color: var(--bb-red); }
.lab-btn.danger:hover { background: var(--bb-red); color: var(--theme-component-ink-5); }
a.lab-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }


/* =========================================================
   CATEGORY PRACTICE TABS
========================================================= */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--theme-learning-success-271);
  background: var(--theme-component-page-27);
  border-radius: 8px;
}
.category-tab {
  border: 1px solid var(--theme-component-border-10);
  background: var(--theme-catalog-surface-90);
  color: var(--bb-text-muted);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--font-tech);
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
  transition: 180ms ease;
}
.category-tab:hover,
.category-tab.active {
  border-color: var(--bb-kelly);
  color: var(--bb-kelly);
  box-shadow: 0 0 18px var(--theme-learning-success-274);
  background: var(--theme-learning-success-bg-275);
}
.category-tab.chaos {
  border-color: var(--theme-learning-warning-276);
  color: var(--bb-gold);
}
.category-tab.chaos.active {
  background: var(--theme-learning-warning-bg-277);
  box-shadow: 0 0 20px var(--theme-learning-warning-278);
}
.category-callout {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--theme-component-info-23);
  background: var(--theme-learning-info-bg-280);
  border-radius: 8px;
  color: var(--bb-text-muted);
  font-size: max(14px, .9rem);
  line-height: 1.45;
}
.category-callout b { color: var(--theme-component-ink-5); }

/* =========================================================
   FUSED MATCHES BAR
========================================================= */
.fused-wrap {
  background: var(--theme-component-page-50);
  border: 1px solid var(--theme-component-border-14);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}
.fused-top {
  font-family: var(--font-tech); font-size: 14px; color: var(--bb-cyan);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.fused-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
}
.fused-row::-webkit-scrollbar { height: 6px; }
.fused-row::-webkit-scrollbar-thumb { background: var(--theme-learning-info-bg-281); border-radius: 3px; }

.fused-tile {
  background: var(--theme-learning-page-282);
  border: 1px solid var(--theme-learning-info-283);
  border-radius: 6px;
  padding: 8px 12px;
  min-width: 180px;
  flex-shrink: 0;
  transition: 0.2s;
  cursor: pointer;
}
.fused-tile:hover { border-color: var(--bb-cyan); background: var(--theme-learning-info-bg-187); }
.fused-tile .name { font-weight: 700; color: var(--theme-component-ink-5); font-size: max(14px, 0.9rem); }
.fused-tile .cat { font-family: var(--font-code); font-size: 14px; color: var(--bb-text-muted); margin-top: 2px; }

/* =========================================================
   GAME GRIDS
========================================================= */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 980px) { .game-grid { grid-template-columns: 1fr; } }

.grid-panel {
  background: var(--theme-component-page-47);
  border: 1px solid var(--theme-component-border-15);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.grid-head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--theme-component-border-15);
  padding-bottom: 10px; margin-bottom: 15px;
}
.grid-head h3 { margin: 0; font-family: var(--font-tech); text-transform: uppercase; color: var(--theme-component-ink-5); }

.card-scroll {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
}
.card-scroll::-webkit-scrollbar { width: 6px; }
.card-scroll::-webkit-scrollbar-thumb { background: var(--theme-learning-success-bg-284); border-radius: 3px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  background: var(--theme-learning-page-285);
  border: 1px solid var(--theme-learning-border-49);
  border-radius: 8px;
  padding: 12px;
  min-height: 90px;
  transition: 0.2s;
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: var(--bb-kelly); transform: translateY(-2px); box-shadow: 0 0 15px var(--theme-learning-success-122); }
.card.selected {
  border-color: var(--bb-kelly);
  background: var(--theme-learning-success-bg-21);
  box-shadow: 0 0 20px var(--theme-learning-success-197);
}
.card.selected::after {
  content: ";
  position: absolute;
  inset: -50%;
  background: repeating-linear-gradient(45deg, transparent, var(--theme-learning-success-bg-21) 10px, transparent 20px);
  animation: scrollBG 20s linear infinite;
  pointer-events: none;
}

.card .term {
  font-family: var(--font-tech);
  font-weight: 700;
  color: var(--theme-component-ink-5);
  font-size: 1.1rem;
}

.card .def {
  font-size: 14px;
  color: var(--bb-text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

/* Domain Tags */

.tag {
  font-family: var(--font-code);
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

.tag.cat-mobile {
  color: var(--c-mobile);
  border: 1px solid var(--c-mobile);
  background: var(--theme-learning-error-bg-288);
}

.tag.cat-hardware {
  color: var(--c-hardware);
  border: 1px solid var(--c-hardware);
  background: var(--theme-learning-info-bg-289);
}

.tag.cat-network {
  color: var(--c-network);
  border: 1px solid var(--c-network);
  background: var(--theme-learning-info-bg-290);
}

.tag.cat-cloud {
  color: var(--c-cloud);
  border: 1px solid var(--c-cloud);
  background: var(--theme-learning-info-bg-291);
}

.tag.cat-trbl {
  color: var(--c-trbl);
  border: 1px solid var(--c-trbl);
  background: var(--theme-learning-error-bg-292);
}

/* FX & MODALS */

#fxCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--theme-component-page-48);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483646;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: 90%;
  max-width: 850px;
  background: var(--theme-learning-page-294);
  border: 1px solid var(--bb-kelly);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.modal.master-modal {
  max-width: 1120px;
}

.modal-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--theme-component-border-15);
  background: var(--theme-learning-success-bg-21);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  color: var(--bb-text-main);
}

.modal-foot {
  padding: 15px 20px;
  border-top: 1px solid var(--theme-component-border-15);
  display: flex;
  justify-content: flex-end;
}






.clue-table,
.master-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.clue-table th,
.clue-table td,
.master-table th,
.master-table td {
  border: 1px solid var(--theme-component-border-15);
  padding: 9px;
  vertical-align: top;
}

.clue-table th,
.master-table th {
  color: var(--bb-green);
  background: var(--theme-learning-success-bg-29);
  font-family: var(--font-code);
  font-size: 14px;
  text-transform: uppercase;
  text-align: left;
}

.master-category {
  margin-top: 18px;
  color: var(--theme-component-ink-5);
  font-family: var(--font-tech);
  font-size: 1.25rem;
}

.master-term {
  color: var(--theme-component-ink-5);
  font-weight: 800;
}

.master-clue {
  color: var(--bb-gold);
}

@media (max-width: 850px) {

}

/* FX Clones */

.fxClone {
  position: fixed;
  z-index: 9500;
  pointer-events: none;
  border-radius: 8px;
  overflow: hidden;
  background: var(--theme-learning-page-295);
  border: 1px solid var(--bb-kelly);
  box-shadow: 0 0 30px var(--theme-learning-success-2);
}

.fusionCore {
  position: fixed;
  z-index: 9600;
  pointer-events: none;
  min-width: 280px;
  max-width: 360px;
  padding: 14px 18px;
  border: 1px solid var(--bb-kelly);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--theme-learning-success-bg-296), var(--theme-learning-info-bg-297)), var(--theme-learning-page-298);
  box-shadow: 0 0 34px var(--theme-learning-success-299), inset 0 0 28px var(--theme-component-info-22);
  color: var(--theme-component-ink-5);
  font-family: var(--font-tech);
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
}

.fusionCore .fusionLabel {
  color: var(--bb-green);
  font-family: var(--font-code);
  font-size: 14px;
  letter-spacing: 2px;
}

.fusionCore .fusionTerm {
  margin-top: 5px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.fused-tile.arrive {
  animation: fusedTileArrive 0.52s var(--easeOut) both;
}

@keyframes fusedTileArrive {

  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.78);
    filter: brightness(2);
  }

  70% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

/* Toast */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 11000;
}

.toast {
  background: var(--theme-learning-page-301);
  border: 1px solid var(--bb-kelly);
  border-radius: 8px;
  padding: 12px 20px;
  color: var(--theme-component-ink-5);
  font-size: max(14px, 0.9rem);
  margin-top: 10px;
  box-shadow: 0 0 20px var(--theme-learning-shadow-color-14);
  animation: toastIn 0.3s ease-out;
}

.toast.error {
  border-color: var(--bb-red);
  color: var(--bb-red);
}

@keyframes toastIn {

  from {
    transform: translateX(50px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes scrollBG {

  from {
    transform: translate(0,0);
  }

  to {
    transform: translate(50%,50%);
  }
}

/* --- TACTICAL RETICLE HUD --- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 55px;
  height: 55px;
  border: 1px solid var(--bb-kelly);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2147483646;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--theme-learning-success-111);
  background-image: linear-gradient(90deg, var(--bb-kelly) 20%, transparent 20%, transparent 80%, var(--bb-kelly) 80%),
                        linear-gradient(180deg, var(--bb-kelly) 20%, transparent 20%, transparent 80%, var(--bb-kelly) 80%);
  background-position: center;
  background-size: 100% 1px, 1px 100%;
  background-repeat: no-repeat;
}

.cursor::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  border-top: 1px dotted var(--bb-kelly);
  opacity: 0.4;
}

.cursor::after {
  content: '';
  position: absolute;
  height: 100%;
  width: 1px;
  border-left: 1px dotted var(--bb-kelly);
  opacity: 0.4;
}

.cursor-coords {
  position: absolute;
  right: -85px;
  top: -15px;
  font-family: var(--font-code);
  font-size: 14px;
  color: var(--bb-kelly);
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 0 0 5px var(--theme-learning-success-246);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--theme-catalog-surface-31);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147483647;
  pointer-events: none;
  box-shadow: 0 0 12px var(--theme-component-border-7);
}

.cursor.active {
  width: 85px;
  height: 85px;
  background: var(--theme-learning-success-bg-198);
  border-color: var(--theme-component-border-7);
}

#matrix-success-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  pointer-events: none;
  background: var(--theme-learning-page-302);
  z-index: 12000;
}

/* Border geometry retained from the retired palette layer. */
html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .modal-head{border-bottom-width:1px;border-bottom-style:solid;}
html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .modal-foot{border-top-width:1px;border-top-style:solid;}
html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .debrief-card{border-width:1px;border-style:solid;}
html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .clue-table th, html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .clue-table td, html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .master-table th, html.bb-page-30caaaef0e[data-bb-theme="patriotic"] .master-table td{border-width:1px;border-style:solid;}
