:root {
  --db-bg: #030509;
  --db-surface: #0a0f1c;
  --db-border: rgba(148, 178, 224, 0.2);
  --db-text-muted: #b7c4e6;
  --db-accent: #3fa9ff;
  --db-accent-2: #2dd4bf;
  --db-accent-soft: rgba(63, 169, 255, 0.14);
  --db-font-display: ui-monospace, "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;
  --db-font-brand: "Orbitron", var(--db-font-display);

  /* Layer Bootstrap's own dark-theme variables with our accent + binary-digit pattern */
  --bs-body-bg: var(--db-bg);
  --bs-body-color: #eef3fc;
  --bs-emphasis-color: #ffffff;
  --bs-link-color: var(--db-accent);
  --bs-link-hover-color: var(--db-accent-2);
  --bs-border-color: var(--db-border);
  --bs-card-bg: var(--db-surface);
  --bs-card-color: #eef3fc;
  --bs-focus-ring-color: var(--db-accent-soft);
}

body {
  padding-top: 4.5rem;
  background-color: var(--db-bg);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(63, 169, 255, 0.10), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Ctext x='10' y='32' font-family='monospace' font-weight='bold' font-size='26' fill='rgba(96,165,250,0.20)'%3E0%3C/text%3E%3Ctext x='150' y='24' font-family='monospace' font-weight='bold' font-size='18' fill='rgba(45,212,191,0.18)'%3E1%3C/text%3E%3Ctext x='70' y='66' font-family='monospace' font-weight='bold' font-size='20' fill='rgba(96,165,250,0.17)'%3E1%3C/text%3E%3Ctext x='190' y='70' font-family='monospace' font-weight='bold' font-size='16' fill='rgba(45,212,191,0.16)'%3E0%3C/text%3E%3Ctext x='20' y='112' font-family='monospace' font-weight='bold' font-size='28' fill='rgba(45,212,191,0.19)'%3E0%3C/text%3E%3Ctext x='130' y='104' font-family='monospace' font-weight='bold' font-size='16' fill='rgba(96,165,250,0.18)'%3E0%3C/text%3E%3Ctext x='195' y='140' font-family='monospace' font-weight='bold' font-size='22' fill='rgba(45,212,191,0.17)'%3E1%3C/text%3E%3Ctext x='45' y='158' font-family='monospace' font-weight='bold' font-size='18' fill='rgba(96,165,250,0.20)'%3E1%3C/text%3E%3Ctext x='110' y='186' font-family='monospace' font-weight='bold' font-size='24' fill='rgba(45,212,191,0.17)'%3E0%3C/text%3E%3Ctext x='175' y='202' font-family='monospace' font-weight='bold' font-size='16' fill='rgba(96,165,250,0.18)'%3E0%3C/text%3E%3Ctext x='5' y='210' font-family='monospace' font-weight='bold' font-size='20' fill='rgba(45,212,191,0.18)'%3E1%3C/text%3E%3Ctext x='90' y='30' font-family='monospace' font-weight='bold' font-size='14' fill='rgba(96,165,250,0.16)'%3E1%3C/text%3E%3Ctext x='215' y='190' font-family='monospace' font-weight='bold' font-size='16' fill='rgba(45,212,191,0.16)'%3E1%3C/text%3E%3Ctext x='60' y='230' font-family='monospace' font-weight='bold' font-size='18' fill='rgba(96,165,250,0.17)'%3E0%3C/text%3E%3C/svg%3E");
  background-attachment: fixed, fixed;
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 240px 240px;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--db-font-display);
  letter-spacing: 0.02em;
}

.navbar {
  border-bottom: 1px solid var(--db-border);
}

.navbar-brand,
.hero h1 {
  font-family: var(--db-font-brand);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.navbar-brand {
  color: var(--db-accent-2) !important;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: #ffffff;
}

.nav-link.active {
  color: var(--db-accent) !important;
  border-bottom: 2px solid var(--db-accent);
}

.hero {
  background: radial-gradient(circle at top left, rgba(45, 212, 191, 0.25), transparent 55%),
    linear-gradient(135deg, #0a1730 0%, #0f2c52 55%, #123a63 100%);
  color: #f2f6ff;
  padding: 2.5rem 1rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--db-border);
}

.hero-carousel .carousel-item img {
  height: 440px;
  object-fit: cover;
  filter: brightness(0.5) saturate(1.05);
}

.hero-carousel .carousel-caption {
  bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  max-width: 34rem;
  margin: 0 auto;
}

.hero-carousel .carousel-caption h3,
.hero-carousel .carousel-caption p {
  color: #0a0e1a;
}

.hero-carousel .carousel-caption h3 {
  font-family: var(--db-font-display);
}

.hero-carousel .carousel-indicators [data-bs-target] {
  background-color: #ffffff;
  border: 1px solid rgba(3, 5, 9, 0.3);
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 2.75rem;
  height: 2.75rem;
  background-color: rgba(255, 255, 255, 0.8);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  border-radius: 50%;
}

.hero-carousel .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230a0e1a'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.hero-carousel .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230a0e1a'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.hero-carousel {
  border-bottom: 1px solid var(--db-border);
}

.card {
  border-top: 2px solid var(--db-accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(63, 169, 255, 0.15);
}

.card-img-top {
  object-fit: cover;
  height: 180px;
}

.btn-primary {
  --bs-btn-bg: var(--db-accent);
  --bs-btn-border-color: var(--db-accent);
  --bs-btn-hover-bg: var(--db-accent-2);
  --bs-btn-hover-border-color: var(--db-accent-2);
  --bs-btn-active-bg: var(--db-accent-2);
  --bs-btn-active-border-color: var(--db-accent-2);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--db-accent);
  box-shadow: 0 0 0 0.2rem var(--db-accent-soft);
}

.related-section h3 {
  margin-top: 2rem;
  color: var(--db-accent-2);
}

.placeholder-note,
.text-muted {
  color: var(--db-text-muted) !important;
}

iframe.rounded,
.ratio iframe {
  border: 1px solid var(--db-border);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--db-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 6px;
}

.low-data-toggle-btn {
  margin-left: 0.75rem;
}

.low-data-mode .low-data-toggle-btn {
  background: var(--db-accent);
  border-color: var(--db-accent);
  color: #06121f;
}

.low-data-wrapper {
  cursor: pointer;
  position: relative;
  display: block;
}

.low-data-placeholder-img {
  background: repeating-linear-gradient(45deg, var(--db-surface), var(--db-surface) 10px, rgba(255, 255, 255, 0.03) 10px, rgba(255, 255, 255, 0.03) 20px);
  border: 1px dashed var(--db-border);
}

.low-data-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  color: var(--db-text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.low-data-placeholder-iframe {
  cursor: pointer;
  background: repeating-linear-gradient(45deg, var(--db-surface), var(--db-surface) 10px, rgba(255, 255, 255, 0.03) 10px, rgba(255, 255, 255, 0.03) 20px);
  border: 1px dashed var(--db-border);
}

/* .ratio (Bootstrap) is already position:relative, and a plain .low-data-wrapper sets it too -
   .low-data-label's own position:absolute + inset:0 is what positions it in both cases, not
   Bootstrap's ".ratio > *" rule, so this works whether the label lands inside a .ratio container
   or a .low-data-wrapper. Do not try to render this via ::after on the iframe itself - Chrome
   computes ::after content/display on <iframe> correctly but never paints it (verified: a real
   visible sibling element is required, not generated content). */
