/* ==========================================================================
   CODEXSEC LABS • PROTOCOL 02 // RECURSION
   Dedicated Design System inheriting 100% from Cyber Warfare (styles.css)
   Palette: Cyber Mint/Lime (#00f59b), Cyber Blue (#00d2ff), Obsidian (#030712)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PROTOCOL MATRIX MEGA MENU IN NAVBAR
   -------------------------------------------------------------------------- */
.protocol-nav-item {
  position: relative;
}

.protocol-active-pill {
  color: var(--lime) !important;
  font-weight: 700 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.74rem !important;
  letter-spacing: 0.04em !important;
}

.protocol-mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #090e1a;
  border: 1px solid rgba(0, 245, 155, 0.25);
  border-radius: 1.25rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 245, 155, 0.15);
  padding: 1.25rem;
  width: 520px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 120;
  backdrop-filter: blur(24px);
  text-align: left;
}

.nav-item:hover .protocol-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.proto-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
}

.proto-head-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--lime);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.proto-clearance-pill {
  padding: 0.18rem 0.5rem;
  border-radius: 9999px;
  background: rgba(0, 245, 155, 0.12);
  border: 1px solid var(--lime);
  color: var(--lime);
  font-weight: 800;
  font-size: 0.65rem;
}

.protocol-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.proto-menu-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.proto-menu-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.proto-menu-card.active {
  background: rgba(0, 245, 155, 0.08);
  border-color: var(--lime);
  box-shadow: 0 0 20px rgba(0, 245, 155, 0.15);
}

.proto-card-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 900;
  color: #94a3b8;
  flex-shrink: 0;
}
.proto-menu-card.active .proto-card-badge {
  background: rgba(0, 245, 155, 0.15);
  border-color: var(--lime);
  color: var(--lime);
}

.proto-card-body {
  flex: 1;
}

.proto-card-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.proto-card-name .active-tag {
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--lime);
  color: #030712;
  font-weight: 900;
}

.proto-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.proto-card-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}
.proto-card-status.online {
  color: var(--lime);
  background: rgba(0, 245, 155, 0.12);
  border: 1px solid rgba(0, 245, 155, 0.3);
}
.proto-card-status.active {
  color: #030712;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
.proto-card-status.soon {
  color: #64748b;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   2. SECONDARY SUBNAV PILLS ROW (Matching season-portal.css)
   -------------------------------------------------------------------------- */
.ops-subnav-container {
  max-width: 1320px;
  margin: 2.5rem auto 2.5rem;
  padding: 0 1.5rem;
}

.ops-pills-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(11, 21, 45, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}
.ops-pills-row::-webkit-scrollbar { display: none; }

.ops-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ops-pill-item svg { width: 14px; height: 14px; }

.ops-pill-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.ops-pill-item.active {
  color: #030712;
  background: var(--lime);
  box-shadow: 0 0 18px var(--lime-glow);
  font-weight: 800;
}
.ops-pill-item.active svg { stroke: #030712; }

.ops-pill-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
.ops-pill-item.active .ops-pill-badge {
  background: #030712;
  color: var(--lime);
}

/* --------------------------------------------------------------------------
   3. PROBLEM OF THE DAY (POTD) MISSION CARD (Matching rewards daily-drop)
   -------------------------------------------------------------------------- */
.potd-mission-banner {
  background: linear-gradient(135deg, rgba(14, 25, 54, 0.95) 0%, rgba(7, 14, 32, 0.98) 100%);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  padding: 1.8rem 2.2rem;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.potd-mission-banner::before {
  content: "DAILY CIPHER DROP";
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.3rem 1.1rem;
  background: var(--lime);
  color: #030712;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  border-bottom-left-radius: 10px;
}

.potd-info-col { max-width: 720px; }

.potd-tag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.diff-chip-cyber {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.diff-chip-cyber.easy { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid #10b981; }
.diff-chip-cyber.med { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid #f59e0b; }
.diff-chip-cyber.hard { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid #ef4444; }

.potd-meta-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.potd-mission-banner h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.45rem;
}
.potd-mission-banner p {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.potd-bounty-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.potd-bounty-row .bounty { color: var(--lime); display: flex; align-items: center; gap: 0.4rem; font-weight: 700; }
.potd-bounty-row .timer { color: #38bdf8; display: flex; align-items: center; gap: 0.4rem; font-weight: 700; }

/* --------------------------------------------------------------------------
   4. 6 SECTOR MATRIX CARDS (Cyber Warfare Style)
   -------------------------------------------------------------------------- */
.cyber-sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.cyber-sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.cyber-sector-card:hover {
  transform: translateY(-6px);
  border-color: var(--lime);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-card-hover);
}

.sector-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sector-code-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--lime);
  letter-spacing: 0.06em;
}

.sector-icon-pill {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 245, 155, 0.1);
  border: 1px solid rgba(0, 245, 155, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lime);
}

.cyber-sector-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.cyber-sector-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  min-height: 48px;
}

.sector-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.sector-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f59b 0%, #00d2ff 100%);
  border-radius: 9999px;
}

.sector-meta-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.btn-sector-deploy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.72rem;
  border-radius: 9999px;
  background: rgba(0, 245, 155, 0.08);
  border: 1px solid rgba(0, 245, 155, 0.3);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-sector-deploy:hover {
  background: var(--lime);
  color: #030712;
  box-shadow: 0 0 18px var(--lime-glow);
}

/* --------------------------------------------------------------------------
   5. 1V1 DUELS ARENA BANNER (Matching squad-lobby-box in index.html)
   -------------------------------------------------------------------------- */
.duels-warzone-banner {
  background: linear-gradient(135deg, rgba(14, 25, 54, 0.95) 0%, rgba(7, 14, 32, 0.98) 100%);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  padding: 1.8rem 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.duels-banner-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.duels-orb-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 245, 155, 0.15);
  border: 2px solid var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lime);
  box-shadow: 0 0 20px var(--lime-glow);
  flex-shrink: 0;
}

.duels-banner-text h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.3rem;
}
.duels-banner-text p {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.btn-duels-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 9999px;
  background: var(--lime);
  color: #030712;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  box-shadow: 0 4px 18px var(--lime-glow);
  white-space: nowrap;
}
.btn-duels-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 245, 155, 0.6);
  filter: brightness(1.1);
}

/* --------------------------------------------------------------------------
   6. FILTERABLE PROBLEM CATALOG
   -------------------------------------------------------------------------- */
.catalog-card-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  padding: 2.2rem;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-sm);
}

.catalog-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.filter-btn-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cyber-filter-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cyber-filter-pill:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}
.cyber-filter-pill.active {
  background: rgba(0, 245, 155, 0.15);
  border-color: var(--lime);
  color: var(--lime);
}

.cyber-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  min-width: 280px;
}
.cyber-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  width: 100%;
}
.cyber-search-box input::placeholder { color: var(--text-muted); }

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.cyber-table th {
  text-align: left;
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.cyber-table td {
  padding: 1.15rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.cyber-table tr:hover td {
  background: rgba(0, 245, 155, 0.03);
}

.problem-title-link {
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.problem-title-link:hover {
  color: var(--lime);
}

.status-dot-cyber {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.status-dot-cyber.solved {
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

/* --------------------------------------------------------------------------
   7. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cyber-sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .protocol-mega-menu { width: 95vw; left: 0; transform: translateX(0); }
}

@media (max-width: 768px) {
  .cyber-sectors-grid { grid-template-columns: 1fr; }
  .potd-mission-banner { flex-direction: column; align-items: flex-start; }
  .duels-warzone-banner { flex-direction: column; align-items: flex-start; }
  .duels-banner-left { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   8. FLAGSHIP WORKBENCH IDE (recursion-workbench.html)
   ========================================================================== */
.workbench-container {
  max-width: 1720px;
  margin: 1rem auto 3rem;
  padding: 0 1.5rem;
}

.workbench-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(16px);
}

.wb-tool-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wb-select {
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.6rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wb-select:hover, .wb-select:focus {
  border-color: var(--lime);
  box-shadow: 0 0 12px rgba(0, 245, 155, 0.2);
}

.wb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.wb-btn-primary {
  background: var(--lime);
  color: #030712;
  box-shadow: 0 0 18px rgba(0, 245, 155, 0.35);
}

.wb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 245, 155, 0.55);
}

.wb-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.wb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.wb-btn-cyan {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.4);
  color: #00d2ff;
}

.wb-btn-cyan:hover {
  background: rgba(0, 210, 255, 0.22);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.35);
}

.workbench-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1.25rem;
  min-height: calc(100vh - 210px);
}

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

.wb-pane {
  background: rgba(10, 16, 29, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.wb-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(3, 7, 18, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.wb-tabs {
  display: flex;
  gap: 0.35rem;
}

.wb-tab {
  padding: 0.45rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 0.45rem;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wb-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.wb-tab.active {
  color: var(--lime);
  background: rgba(0, 245, 155, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 155, 0.3);
}

.wb-content-scroll {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

/* Problem description markdown styles */
.problem-badge-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.diff-badge-hard {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.diff-badge-medium {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.diff-badge-easy {
  background: rgba(0, 245, 155, 0.15);
  border: 1px solid rgba(0, 245, 155, 0.4);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.problem-h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.problem-body-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.example-box {
  background: rgba(3, 7, 18, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.example-box h5 {
  color: var(--lime);
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.example-box code {
  color: #e2e8f0;
}

/* Code Editor Area */
.code-editor-wrapper {
  display: flex;
  flex: 1;
  background: #060a12;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.line-numbers {
  padding: 1rem 0.75rem;
  background: #030712;
  color: #475569;
  text-align: right;
  user-select: none;
  font-size: 0.78rem;
  line-height: 1.5rem;
  border-right: 1px solid var(--border-subtle);
}

.code-textarea {
  flex: 1;
  background: transparent;
  color: #f1f5f9;
  border: none;
  outline: none;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.5rem;
  resize: none;
  white-space: pre;
  tab-size: 4;
}

/* Spatial Memory Canvas */
.spatial-canvas-wrapper {
  background: #040813;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.spatial-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spatial-canvas-view {
  width: 100%;
  height: 220px;
  background: radial-gradient(circle at center, rgba(0, 245, 155, 0.03) 0%, rgba(3, 7, 18, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  position: relative;
}

/* Big-O Complexity Graph SVG container */
.bigo-graph-card {
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1rem;
  margin-top: 1rem;
}

.bigo-svg {
  width: 100%;
  height: 160px;
}

/* ==========================================================================
   9. SKILL TREE ROADMAP (recursion-matrix.html)
   ========================================================================== */
.matrix-container {
  max-width: 1540px;
  margin: 1rem auto 4rem;
  padding: 0 1.5rem;
}

.matrix-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.matrix-header h1 {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.matrix-progress-track {
  max-width: 680px;
  margin: 1.25rem auto 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  height: 14px;
  overflow: hidden;
  position: relative;
}

.matrix-progress-fill {
  background: linear-gradient(90deg, #00d2ff, var(--lime));
  height: 100%;
  width: 48%;
  border-radius: 9999px;
  box-shadow: 0 0 15px var(--lime);
  transition: width 0.8s ease;
}

.matrix-sector-row {
  margin-bottom: 3.5rem;
}

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

.sector-row-title h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.node-tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tree-node-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.tree-node-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 155, 0.4);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 245, 155, 0.15);
}

.tree-node-card.mastered {
  border-color: rgba(0, 245, 155, 0.5);
  background: rgba(0, 245, 155, 0.05);
}

.tree-node-card.unlocked {
  border-color: rgba(0, 210, 255, 0.5);
  background: rgba(0, 210, 255, 0.05);
}

.tree-node-card.locked {
  opacity: 0.5;
  filter: grayscale(0.6);
  cursor: not-allowed;
}

.node-status-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.node-status-badge.mastered {
  background: rgba(0, 245, 155, 0.15);
  color: var(--lime);
  border: 1px solid var(--lime);
}

.node-status-badge.unlocked {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border: 1px solid #00d2ff;
}

.node-status-badge.locked {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   10. STANDALONE VISUALIZER SANDBOX (recursion-visualizer.html)
   ========================================================================== */
.visualizer-stage-container {
  max-width: 1600px;
  margin: 1rem auto 4rem;
  padding: 0 1.5rem;
}

.vis-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(16px);
}

.vis-canvas-frame {
  width: 100%;
  height: 520px;
  background: #020611;
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), inset 0 0 100px rgba(0, 245, 155, 0.02);
}

.vis-terminal-log {
  margin-top: 1.5rem;
  background: #030712;
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
  height: 140px;
  overflow-y: auto;
}

/* ==========================================================================
   11. 1v1 ALGORITHMIC DUELS WARZONE (recursion-duels.html)
   ========================================================================== */
.duels-container {
  max-width: 1540px;
  margin: 1rem auto 4rem;
  padding: 0 1.5rem;
}

.duels-matchmaking-hero {
  background: radial-gradient(circle at 50% 20%, rgba(0, 210, 255, 0.12) 0%, rgba(10, 16, 29, 0.85) 70%);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 210, 255, 0.1);
}

.matchmaking-radar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 210, 255, 0.4);
  margin: 0 auto 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 210, 255, 0.4) 0deg, transparent 60deg);
  animation: radarRotate 3s linear infinite;
}

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

.duel-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 992px) {
  .duel-modes-grid { grid-template-columns: 1fr; }
}

.duel-mode-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.duel-mode-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 210, 255, 0.15);
}

.arena-vs-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  background: rgba(10, 16, 29, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 3rem;
}

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