/* ============================================================
   DevOps Learning Hub — Shared Design System
   Inter + JetBrains Mono — Dark Blue Premium Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg-0: #080e1a;
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --bg-3: #273347;
  --bg-4: #334155;

  --text-1: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;

  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --accent-hover: #0ea5e9;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --purple: #a855f7;

  --border: rgba(148, 163, 184, 0.15);
  --border-hover: rgba(56, 189, 248, 0.35);

  /* Volume page specific */
  --color-volume: #8b5cf6;
  --color-bind: #f97316;
  --color-tmpfs: #eab308;

  /* Legacy compat variables (Dockerfile page) */
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-accent: #38bdf8;
  --color-accent-hover: #0ea5e9;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-border: rgba(148, 163, 184, 0.15);

  --primary: #3b82f6;
  --primary-dark: #1e40af;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
}

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

/* ── Base ─────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-1);
  color: var(--text-1);
  line-height: 1.7;
  min-height: 100svh;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Site Header (sticky top bar — Docker detail pages) ────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(8, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 700;
}

.site-header .brand-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.site-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.site-header .breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.site-header .breadcrumb a:hover {
  opacity: 0.75;
}

.site-header .sep {
  color: var(--text-4);
}

/* ── Container ────────────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px;
}

/* ── Page Hero Header ─────────────────────────────────────── */
header {
  text-align: center;
  margin-bottom: 28px;
  padding: 48px 28px 40px;
  background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-radius: 20px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(56, 189, 248, 0.1), transparent);
  pointer-events: none;
}

h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text-1);
}

.subtitle {
  color: var(--text-3);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Tab Navigation ───────────────────────────────────────── */
.tabs,
.nav-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  background: var(--bg-2);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.nav-tabs,
#nav-tabs {
  position: sticky;
  top: 60px;
  z-index: 50;
  overflow-x: auto;
  margin-bottom: 0;
  padding: 8px 16px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.5);
}

.nav-tabs::-webkit-scrollbar,
#nav-tabs::-webkit-scrollbar {
  height: 6px;
  display: block;
}
.nav-tabs::-webkit-scrollbar-track,
#nav-tabs::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
}
.nav-tabs::-webkit-scrollbar-thumb,
#nav-tabs::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 10px;
}
.nav-tabs::-webkit-scrollbar-thumb:hover,
#nav-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.8);
}

.tab-btn,
.tab {
  padding: 9px 20px;
  background: transparent;
  color: var(--text-3);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
}

.tab-btn:hover,
.tab:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.tab-btn.active,
.tab.active {
  background: var(--accent);
  color: var(--bg-1);
  box-shadow: 0 2px 14px rgba(56, 189, 248, 0.35);
  font-weight: 700;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* ── Section ──────────────────────────────────────────────── */
.section,
.network-section {
  background: var(--bg-2);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.section:hover,
.network-section:hover {
  border-color: rgba(56, 189, 248, 0.18);
}

.section h2,
.network-section h2 {
  color: var(--accent);
  margin-bottom: 14px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section h3,
.network-section h3 {
  color: var(--text-1);
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.section p,
.network-section p {
  color: var(--text-2);
  margin-bottom: 12px;
}

/* ── Feature Grid & Cards ─────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.feature-card {
  background: var(--bg-3);
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border-color: var(--border-hover);
}

.feature-card h3 {
  color: var(--text-1);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card h4 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

/* ── Code Blocks — Mac terminal style ────────────────────── */
.code-block {
  background: var(--bg-0);
  border-radius: 12px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(71, 85, 105, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.code-block::before {
  content: '';
  display: block;
  height: 36px;
  background: #111827;
  border-bottom: 1px solid rgba(71, 85, 105, 0.4);
  background-image:
    radial-gradient(circle 6px at 16px 50%, #ef4444 100%, transparent),
    radial-gradient(circle 6px at 36px 50%, #f59e0b 100%, transparent),
    radial-gradient(circle 6px at 56px 50%, #22c55e 100%, transparent);
}

.code-block code,
.code-block pre {
  display: block;
  color: #86efac;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  padding: 18px 20px;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}

.code-label {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 1;
}

.command-syntax {
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  margin: 14px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-2);
}

/* ── Info Boxes ───────────────────────────────────────────── */
.info-box {
  padding: 16px 20px;
  border-radius: 12px;
  margin: 16px 0;
  color: var(--text-2);
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-left: 4px solid var(--accent);
  line-height: 1.65;
}

.info-box strong {
  color: var(--accent);
}

.info-box.warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.18);
  border-left-color: var(--warning);
}

.info-box.warning strong {
  color: var(--warning);
}

.info-box.success {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.18);
  border-left-color: var(--success);
}

.info-box.success strong {
  color: var(--success);
}

.info-box.danger {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.18);
  border-left-color: var(--error);
}

.info-box.danger strong {
  color: var(--error);
}

.warning-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-left: 4px solid var(--warning);
  padding: 16px 20px;
  border-radius: 12px;
  margin: 16px 0;
  color: var(--text-2);
}

.warning-box strong {
  color: var(--warning);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  user-select: none;
  line-height: 1;
}

.btn:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.4);
}

.btn.primary {
  background: var(--accent);
  color: var(--bg-1);
  border-color: var(--accent);
  font-weight: 700;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.4);
}

.btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Diagrams ─────────────────────────────────────────────── */
.diagram,
.network-diagram {
  background: var(--bg-3);
  padding: 28px;
  border-radius: 14px;
  margin: 20px 0;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.diagram-container {
  min-width: 600px;
}

.visual-diagram {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin: 20px 0;
  text-align: center;
}

/* ── Coloured Box Components ──────────────────────────────── */
.box,
.network-box {
  border: 2px solid;
  padding: 12px 18px;
  border-radius: 10px;
  margin: 8px;
  display: inline-block;
  min-width: 120px;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
}

.container-box {
  background: rgba(30, 58, 138, 0.4);
  border-color: #3b82f6;
  color: #93c5fd;
}

.host-box {
  background: rgba(124, 45, 18, 0.4);
  border-color: #f97316;
  color: #fdba74;
}

.bridge-box {
  background: rgba(22, 101, 52, 0.4);
  border-color: #22c55e;
  color: #86efac;
}

.overlay-box {
  background: rgba(126, 34, 206, 0.4);
  border-color: #a855f7;
  color: #e9d5ff;
}

.external-box {
  background: rgba(68, 64, 60, 0.4);
  border-color: #78716c;
  color: #d6d3d1;
}

.volume-box {
  background: rgba(91, 33, 182, 0.4);
  border-color: var(--color-volume);
  color: #d8b4fe;
}

.bind-box {
  background: rgba(154, 52, 18, 0.4);
  border-color: var(--color-bind);
  color: #fed7aa;
}

.tmpfs-box {
  background: rgba(113, 63, 18, 0.4);
  border-color: var(--color-tmpfs);
  color: #fde047;
}

.storage-box {
  background: rgba(22, 101, 52, 0.4);
  border-color: #22c55e;
  color: #86efac;
}

/* ── Card (Dockerfile page) ───────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.card {
  background: var(--bg-3);
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.card h4 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card.secondary {
  border-left-color: var(--secondary);
}

.card.secondary h4 {
  color: var(--secondary);
}

.card.accent {
  border-left-color: var(--warning);
}

.card.accent h4 {
  color: var(--warning);
}

.card.danger {
  border-left-color: var(--danger);
}

.card.danger h4 {
  color: var(--danger);
}

/* ── Layer stack ──────────────────────────────────────────── */
.layer {
  background: var(--bg-card);
  padding: 14px 18px;
  margin: 8px auto;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  max-width: 620px;
  position: relative;
}

/* ── Pros & Cons ──────────────────────────────────────────── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.pros,
.cons {
  background: var(--bg-3);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.pros {
  border-left: 4px solid var(--success);
}

.cons {
  border-left: 4px solid var(--error);
}

.pros h4 {
  color: var(--success);
  margin-bottom: 10px;
  font-weight: 700;
}

.cons h4 {
  color: var(--error);
  margin-bottom: 10px;
  font-weight: 700;
}

.pros ul,
.cons ul {
  margin-left: 18px;
  color: var(--text-2);
}

.pros li,
.cons li {
  margin-bottom: 8px;
}

/* ── Flow diagrams ────────────────────────────────────────── */
.arrow {
  display: inline-block;
  margin: 0 10px;
  color: var(--accent);
  font-size: 1.4rem;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 20px 0;
}

/* ── Tables ───────────────────────────────────────────────── */
table,
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  color: var(--text-2);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: rgba(56, 189, 248, 0.04);
}

.comparison-table th {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
}

/* ── Lifecycle Steps ──────────────────────────────────────── */
.lifecycle-diagram {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.lifecycle-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-number,
.step-indicator {
  background: var(--accent);
  color: var(--bg-1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-indicator {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  display: inline-flex;
}

.step-content {
  flex: 1;
  background: var(--bg-3);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 2px;
}

.badge.required {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge.optional {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.best-practice {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.ready {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.badge.wip {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge.locked {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-3);
  border: 1px solid var(--border);
}

/* ── Pills ────────────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: rgba(148, 163, 184, 0.08);
  margin-right: 6px;
  margin-top: 6px;
  transition: all 0.15s;
}

.pill:hover {
  border-color: var(--border-hover);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Utility ──────────────────────────────────────────────── */
.highlight {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.interactive-example {
  background: var(--bg-0);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 22px;
  margin: 20px 0;
}

.interactive-example h4 {
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 700;
}

ul,
ol {
  margin-left: 1.4rem;
  margin-top: 6px;
}

li {
  margin-bottom: 6px;
  color: var(--text-2);
}

/* ── Hub tool/index page cards ───────────────────────────── */
.tool-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
}

.tool-card .title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}

.tool-card p {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.meta {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 0.8rem;
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(8, 14, 26, 0.96);
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 14px;
  display: none;
  max-width: 820px;
  width: calc(100% - 32px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  font-size: 0.9rem;
  backdrop-filter: blur(12px);
}

.toast strong {
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  color: var(--text-3);
  margin-top: 24px;
  padding: 20px 16px;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

footer a:hover {
  opacity: 0.7;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  header {
    padding: 32px 16px;
    border-radius: 14px;
  }

  .section,
  .network-section {
    padding: 20px;
    border-radius: 12px;
  }

  .section h2,
  .network-section h2 {
    font-size: 1.4rem;
  }

  .tabs,
  .nav-tabs {
    padding: 5px;
    gap: 3px;
  }

  .tab-btn,
  .tab {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .pros-cons,
  .two-column {
    grid-template-columns: 1fr;
  }

  .diagram-container {
    min-width: 100%;
  }

  .site-header {
    padding: 0 16px;
  }

  .site-header .breadcrumb {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DNS & Networking Pages — Shared Components
   Used by: Networking/DNS_guide.html, Networking/DNS_querry.html
   ============================================================ */

/* ── Glass card ─────────────────────────────────────────────── */
.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
}

/* ── Comparison grid / cards ─────────────────────────────────── */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.comparison-card {
  background: rgba(15, 23, 42, 0.45);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.comparison-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(30, 41, 59, 0.55);
}

.comparison-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.6rem;
}

/* ── Step box (green accent) ─────────────────────────────────── */
.step-box {
  background: rgba(16, 185, 129, 0.05);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid #10b981;
  border-radius: 0.75rem;
}

.step-box h4 {
  color: #34d399;
  margin-top: 0;
}

/* ── Back-to-top FAB ─────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #3b82f6;
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
}

.back-to-top:hover {
  transform: translateY(-4px);
  background: #2563eb;
}

/* ── Fade-in animation ───────────────────────────────────────── */
.fade-in {
  animation: dnsPageFadeIn 0.5s ease-out forwards;
}

@keyframes dnsPageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── No-scrollbar utility ────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── code / pre (DNS guide content area) ───────────────────── */
.dns-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(30, 41, 59, 0.8);
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #60a5fa;
}

.dns-content pre {
  background: #020617;
  padding: 1.5rem;
  border-radius: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dns-content pre code {
  background: transparent;
  padding: 0;
  color: #cbd5e1;
}

/* ── DNS Simulator — network node cards ─────────────────────── */
.dns-node {
  position: relative;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 130px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  cursor: default;
  user-select: none;
}

.dns-node .node-icon  { font-size: 1.75rem; line-height: 1; }
.dns-node .node-label { font-size: 0.85rem; font-weight: 700; color: #e2e8f0; margin-top: 0.4rem; }
.dns-node .node-desc  { font-size: 0.68rem; color: #64748b; margin-top: 0.3rem; font-family: 'JetBrains Mono', monospace; }

.dns-node.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.35), 0 0 6px rgba(59, 130, 246, 0.2);
}

.dns-node.active::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 1.3rem;
  border: 2px solid rgba(59, 130, 246, 0.4);
  animation: pulseRing 1.2s ease-out infinite;
}

@keyframes pulseRing {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}

/* ── DNS Simulator — floating packet ────────────────────────── */
#packet {
  position: absolute;
  font-size: 1.4rem;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: left 0.8s ease-in-out, top 0.8s ease-in-out, opacity 0.3s ease;
  top: 0;
  left: 0;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.7));
}

/* ── DNS Simulator — SVG connectors ─────────────────────────── */
#connectors-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* ── DNS Simulator — activity log ───────────────────────────── */
#activity-log li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid #3b82f6;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.85rem;
  color: #94a3b8;
  animation: logFadeIn 0.4s ease-out forwards;
}

#activity-log li strong { color: #e2e8f0; }

@keyframes logFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── DNS Simulator — progress bar ───────────────────────────── */
#progress-bar-fill {
  transition: width 0.8s ease-in-out;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 3px;
}

/* ── DNS Simulator — server group label ─────────────────────── */
.server-group-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #475569;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* ── DNS Simulator — step badge ─────────────────────────────── */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

/* ── DNS Simulator — primary / secondary btns ───────────────── */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover:not(:disabled) {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── DNS guide — inline info-box overrides ───────────────────── */
.dns-info-box {
  background: rgba(59, 130, 246, 0.05);
  border-left: 4px solid #3b82f6;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0.75rem;
}

.dns-info-box strong {
  color: #60a5fa;
  display: block;
  margin-bottom: 0.5rem;
}