/* =============================================================================
   styles/nexus-v3-theme.css — NEXUSLAB ORBITAL GLASS × BRILLIANT.ORG DESIGN SYSTEM
   Shared across index.html, danhgia.html, download.html & modern NexusLab portals.
   ============================================================================= */

:root,
html[data-theme="dark"] {
  --bg: #050814;
  --bg-elev: rgba(12, 18, 36, 0.92);
  --bg-card: rgba(14, 22, 43, 0.74);
  --bg-card-hover: rgba(20, 31, 58, 0.92);
  --bg-soft: rgba(255, 255, 255, 0.048);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(56, 189, 248, 0.46);
  --ink: #f8fafc;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --cyan: #38bdf8;
  --blue: #6366f1;
  --green: #22c55e;
  --green-deep: #15803d;
  --emerald: #34d399;
  --pink: #f472b6;
  --amber: #fbbf24;
  --purple: #a855f7;
  --rose: #fb7185;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --shadow-card: 0 22px 54px rgba(0, 0, 0, 0.46);
  --grid-dot: rgba(148, 163, 184, 0.14);
  --nav-bg: rgba(7, 11, 24, 0.86);
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elev: rgba(255, 255, 255, 0.96);
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-soft: #f1f5f9;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(14, 165, 233, 0.5);
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --cyan: #0284c7;
  --blue: #4f46e5;
  --green: #16a34a;
  --green-deep: #15803d;
  --emerald: #059669;
  --pink: #db2777;
  --amber: #d97706;
  --purple: #7c3aed;
  --rose: #e11d48;
  --shadow-card: 0 14px 36px rgba(15, 23, 42, 0.08);
  --grid-dot: rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.9);
}

html {
  scroll-behavior: smooth;
}

body.nexus-v3 {
  font-family: "Plus Jakarta Sans", "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.28s ease, color 0.28s ease;
  margin: 0;
  min-height: 100vh;
}

.nexus-v3 .bg-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 28px 28px;
}

.nexus-v3 .aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(115px);
  opacity: 0.30;
  animation: nxFloatOrb 20s ease-in-out infinite alternate;
}

html[data-theme="light"] .nexus-v3 .aurora {
  opacity: 0.16;
}

.nexus-v3 .aurora-1 { width: 520px; height: 520px; top: -150px; left: -120px; background: #0ea5e9; }
.nexus-v3 .aurora-2 { width: 540px; height: 540px; top: 20%; right: -160px; background: #6366f1; animation-delay: -7s; }
.nexus-v3 .aurora-3 { width: 460px; height: 460px; bottom: -140px; left: 30%; background: #22c55e; animation-delay: -12s; }

@keyframes nxFloatOrb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(34px, 26px) scale(1.07); }
}

.nexus-v3 .mono { font-family: "JetBrains Mono", monospace; }
.nexus-v3 .nx-container { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

/* =========================================================================
   TACTILE 3D BUTTONS (BRILLIANT STYLE)
   ========================================================================= */
.nexus-v3 .nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  white-space: nowrap;
}

.nexus-v3 .nx-btn-brilliant {
  background: linear-gradient(180deg, #2ee06c 0%, #1db954 100%);
  color: #03150a;
  box-shadow: 0 4px 0 #128038, 0 10px 26px rgba(34, 197, 94, 0.3);
}
.nexus-v3 .nx-btn-brilliant:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 5px 0 #128038, 0 14px 30px rgba(34, 197, 94, 0.42); }
.nexus-v3 .nx-btn-brilliant:active { transform: translateY(3px); box-shadow: 0 1px 0 #128038; }

.nexus-v3 .nx-btn-cyan {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 0 #075985, 0 10px 26px rgba(14, 165, 233, 0.3);
}
.nexus-v3 .nx-btn-cyan:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nexus-v3 .nx-btn-cyan:active { transform: translateY(3px); box-shadow: 0 1px 0 #075985; }

.nexus-v3 .nx-btn-amber {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  color: #1c1002;
  box-shadow: 0 4px 0 #b45309, 0 10px 24px rgba(245, 158, 11, 0.32);
}
.nexus-v3 .nx-btn-amber:hover { filter: brightness(1.06); transform: translateY(-1px); }
.nexus-v3 .nx-btn-amber:active { transform: translateY(3px); box-shadow: 0 1px 0 #b45309; }

.nexus-v3 .nx-btn-purple {
  background: linear-gradient(180deg, #c084fc 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 4px 0 #4c1d95, 0 10px 26px rgba(139, 92, 246, 0.34);
}
.nexus-v3 .nx-btn-purple:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nexus-v3 .nx-btn-purple:active { transform: translateY(3px); box-shadow: 0 1px 0 #4c1d95; }

.nexus-v3 .nx-btn-ghost {
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}
.nexus-v3 .nx-btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.nexus-v3 .nx-btn-ghost:active { transform: translateY(2px); box-shadow: none; }
.nexus-v3 .nx-btn-lg { padding: 13px 24px; font-size: 14.5px; }
.nexus-v3 .nx-btn-sm { padding: 7px 14px; font-size: 12px; }

/* =========================================================================
   FLOATING GLASS NAVBAR + AUTH SLOT + STREAK PILL
   ========================================================================= */
.nexus-v3 .navbar-wrap {
  position: sticky;
  top: 12px;
  z-index: 60;
  width: min(1220px, calc(100% - 24px));
  margin: 12px auto 0;
}

.nexus-v3 .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 15px;
  border-radius: 18px;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.nexus-v3 .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.nexus-v3 .brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
}
.nexus-v3 .brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}
.nexus-v3 .brand-sub { font-size: 11px; color: var(--muted); }

.nexus-v3 .nav-links { display: flex; align-items: center; gap: 3px; }
.nexus-v3 .nav-link {
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nexus-v3 .nav-link:hover,
.nexus-v3 .nav-link.active {
  color: var(--ink);
  background: rgba(56, 189, 248, 0.14);
}

.nexus-v3 .nav-dropdown { position: relative; }
.nexus-v3 .dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 276px;
  padding: 8px;
  border-radius: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
  z-index: 80;
}
.nexus-v3 .nav-dropdown:hover .dropdown-menu,
.nexus-v3 .nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nexus-v3 .dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all 0.14s ease;
  text-decoration: none;
}
.nexus-v3 .dd-item:hover {
  background: rgba(56, 189, 248, 0.14);
  color: var(--ink);
}
.nexus-v3 .dd-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.nexus-v3 .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nexus-v3 .streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.nexus-v3 .streak-pill:hover { transform: translateY(-1px); }

.nexus-v3 .icon-btn {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.nexus-v3 .icon-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.nexus-v3 .mobile-menu-btn { display: none; }

.nexus-v3 .mobile-drawer {
  display: none;
  margin-top: 8px;
  padding: 12px;
  border-radius: 16px;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  flex-direction: column;
  gap: 6px;
}
.nexus-v3 .mobile-drawer.open { display: flex; }

/* Hide duplicate auth sound button inside compact navbar to keep nav sleek */
.nexus-v3 #authHeaderSlot .nexus-sound-btn { display: none !important; }
html[data-theme="light"] .nexus-v3 #authHeaderSlot button {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .nexus-v3 #authHeaderSlot .text-white { color: #0f172a; }
html[data-theme="light"] .nexus-v3 #authHeaderSlot #nexusUserDropdownMenu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .nexus-v3 #authHeaderSlot #nexusUserDropdownMenu button,
html[data-theme="light"] .nexus-v3 #authHeaderSlot #nexusUserDropdownMenu a {
  background: transparent;
  color: #334155;
}

/* =========================================================================
   HERO & PLAYGROUND WIDGET
   ========================================================================= */
.nexus-v3 .hero {
  padding: clamp(34px, 4.8vw, 62px) 0 26px;
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 32px;
  align-items: center;
}

.nexus-v3 .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.34);
  color: var(--emerald);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.nexus-v3 .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: nxPulse 2s infinite;
}
@keyframes nxPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(1.3); } }

.nexus-v3 .hero-title {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
  color: var(--ink);
}
.nexus-v3 .grad-text {
  background: linear-gradient(120deg, #38bdf8 0%, #818cf8 48%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .nexus-v3 .grad-text {
  background: linear-gradient(120deg, #0284c7 0%, #4f46e5 52%, #16a34a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nexus-v3 .hero-desc {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 0 24px;
}
.nexus-v3 .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 18px;
}

.nexus-v3 .playground-card {
  position: relative;
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(14, 22, 46, 0.94), rgba(6, 11, 25, 0.96));
  border: 1.5px solid rgba(56, 189, 248, 0.36);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  overflow: hidden;
}
.nexus-v3 .pg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.nexus-v3 .pg-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.nexus-v3 .pg-tab { padding: 6px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #94a3b8; border: none; background: transparent; cursor: pointer; }
.nexus-v3 .pg-tab.active { background: #38bdf8; color: #04101f; box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4); }
.nexus-v3 .pg-xp { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(250, 204, 21, 0.16); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.38); }
.nexus-v3 .pg-prompt { font-size: 13.5px; font-weight: 700; color: #e2e8f0; margin-bottom: 10px; }
.nexus-v3 .pg-svg-box {
  width: 100%;
  height: 196px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 100%, rgba(14, 165, 233, 0.18), rgba(4, 8, 20, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}
.nexus-v3 .pg-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nexus-v3 .pg-slider-group { flex: 1; min-width: 170px; }
.nexus-v3 .pg-slider-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #cbd5e1; margin-bottom: 6px; }
.nexus-v3 .pg-slider { width: 100%; accent-color: #38bdf8; cursor: pointer; height: 6px; }

/* =========================================================================
   TOPIC RIBBON, SECTIONS, CARDS & LEARNING PATHS
   ========================================================================= */
.nexus-v3 .topic-ribbon {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 16px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.nexus-v3 .topic-ribbon::-webkit-scrollbar { display: none; }
.nexus-v3 .topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}
.nexus-v3 .topic-chip:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.nexus-v3 .topic-chip .t-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; }

.nexus-v3 .section { padding: 42px 0; }
.nexus-v3 .sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.nexus-v3 .sec-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); margin-bottom: 5px; }
.nexus-v3 .sec-title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.18; color: var(--ink); margin: 0; }
.nexus-v3 .sec-sub { font-size: 14.5px; color: var(--muted); max-width: 540px; margin: 0; }

.nexus-v3 .nx-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}
.nexus-v3 .nx-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.nexus-v3 .nx-card.no-lift:hover { transform: none; }

.nexus-v3 .nx-card h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--ink); }
.nexus-v3 .nx-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 14px; }

.nexus-v3 .paths-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nexus-v3 .path-card { display: flex; flex-direction: column; justify-content: space-between; }
.nexus-v3 .path-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 800; color: var(--muted); margin-bottom: 10px; gap: 8px; }
.nexus-v3 .path-badge { padding: 4px 10px; border-radius: 999px; font-size: 11px; background: rgba(56, 189, 248, 0.14); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.3); }

.nexus-v3 .path-progress-wrap { margin-bottom: 14px; }
.nexus-v3 .path-progress-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.nexus-v3 .path-progress-track { height: 7px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.nexus-v3 .path-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8, #22c55e); transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

.nexus-v3 .path-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 2px dashed rgba(148, 163, 184, 0.28);
}
.nexus-v3 .path-node {
  position: relative;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.nexus-v3 .path-node:hover { border-color: var(--border-strong); }
.nexus-v3 .path-node::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--bg);
}
.nexus-v3 .path-node.done { border-color: rgba(34, 197, 94, 0.38); background: rgba(34, 197, 94, 0.08); }
.nexus-v3 .path-node.done::before { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.nexus-v3 .path-node.current { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.1); }
.nexus-v3 .path-node.current::before { background: #38bdf8; box-shadow: 0 0 10px #38bdf8; }
.nexus-v3 .path-node-link { color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.nexus-v3 .path-node-link:hover { color: var(--cyan); }
.nexus-v3 .path-node-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nexus-v3 .node-done-btn {
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.nexus-v3 .node-done-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.nexus-v3 .node-done-btn.is-done {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
  color: var(--emerald);
}

/* =========================================================================
   GAMIFICATION: STREAK + BLORB + SCIENCE LEAGUE REWARDS
   ========================================================================= */
.nexus-v3 .gamify-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 18px; align-items: stretch; }
.nexus-v3 .streak-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.nexus-v3 .mascot-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.nexus-v3 .blorb {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 20px 20px 18px 18px;
  background: linear-gradient(145deg, #38bdf8, #6366f1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.35);
  animation: nxBlorbBob 2.6s ease-in-out infinite;
}
@keyframes nxBlorbBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.nexus-v3 .blorb-eyes { display: flex; gap: 10px; }
.nexus-v3 .blorb-eyes span { width: 8px; height: 10px; border-radius: 999px; background: #ffffff; position: relative; }
.nexus-v3 .blorb-eyes span::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #0f172a; right: 1px; top: 3px; }
.nexus-v3 .blorb-smile { width: 16px; height: 7px; border-bottom: 2.5px solid #ffffff; border-radius: 0 0 12px 12px; }

.nexus-v3 .week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 16px; }
.nexus-v3 .day-pill {
  padding: 10px 4px;
  border-radius: 13px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.nexus-v3 .day-pill.lit {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.48);
  color: var(--amber);
}
.nexus-v3 .day-pill.today { border-style: dashed; border-color: var(--cyan); }
.nexus-v3 .day-pill .flame { display: block; font-size: 17px; margin-bottom: 2px; }

.nexus-v3 .reward-rules-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.nexus-v3 .reward-rule-card {
  padding: 9px 10px;
  border-radius: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nexus-v3 .reward-rule-card.gold { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.1); }
.nexus-v3 .reward-rule-card.silver { border-color: rgba(250, 204, 21, 0.45); background: rgba(250, 204, 21, 0.1); }
.nexus-v3 .reward-rule-card.bronze { border-color: rgba(56, 189, 248, 0.42); background: rgba(56, 189, 248, 0.09); }
.nexus-v3 .reward-rule-title { font-size: 11px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.nexus-v3 .reward-rule-sub { font-size: 10px; color: var(--muted); font-family: "JetBrains Mono", monospace; }

.nexus-v3 .league-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.nexus-v3 .league-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
}
.nexus-v3 .league-row.me {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.52);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.16);
}
.nexus-v3 .league-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.nexus-v3 .league-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nexus-v3 .rank-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.16);
  flex-shrink: 0;
}
.nexus-v3 .rank-1 { background: rgba(250, 204, 21, 0.25); color: #facc15; }
.nexus-v3 .rank-2 { background: rgba(148, 163, 184, 0.28); color: #e2e8f0; }
.nexus-v3 .rank-3 { background: rgba(249, 115, 22, 0.26); color: #fb923c; }
.nexus-v3 .league-tier-tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}
.nexus-v3 .lt-tedu { background: rgba(52, 211, 153, 0.18); color: var(--emerald); border: 1px solid rgba(52, 211, 153, 0.45); }
.nexus-v3 .lt-sedu-plus { background: rgba(250, 204, 21, 0.18); color: var(--amber); border: 1px solid rgba(250, 204, 21, 0.48); }
.nexus-v3 .lt-sedu { background: rgba(56, 189, 248, 0.16); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.4); }

/* =========================================================================
   BENTO GRID, PILLARS, CATALOG, CTA & FOOTER
   ========================================================================= */
.nexus-v3 .bento-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.nexus-v3 .col-7 { grid-column: span 7; }
.nexus-v3 .col-5 { grid-column: span 5; }
.nexus-v3 .col-4 { grid-column: span 4; }
.nexus-v3 .col-6 { grid-column: span 6; }

.nexus-v3 .bento-hero-card {
  background: linear-gradient(140deg, rgba(14, 165, 233, 0.16), var(--bg-card) 58%);
  border-color: rgba(56, 189, 248, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 235px;
}
.nexus-v3 .bento-scale-card {
  background: linear-gradient(140deg, rgba(168, 85, 247, 0.18), var(--bg-card) 60%);
  border-color: rgba(168, 85, 247, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 235px;
}
.nexus-v3 .card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 12px;
}
.nexus-v3 .tag-purple { background: rgba(168, 85, 247, 0.14); color: #c084fc; border-color: rgba(168, 85, 247, 0.34); }
.nexus-v3 .tag-emerald { background: rgba(52, 211, 153, 0.14); color: var(--emerald); border-color: rgba(52, 211, 153, 0.34); }
.nexus-v3 .tag-amber { background: rgba(251, 191, 36, 0.14); color: var(--amber); border-color: rgba(251, 191, 36, 0.34); }
.nexus-v3 .tag-pink { background: rgba(244, 114, 182, 0.14); color: var(--pink); border-color: rgba(244, 114, 182, 0.34); }

.nexus-v3 .card-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--cyan); }
.nexus-v3 .nx-card:hover .card-arrow { gap: 10px; }
.nexus-v3 .pill-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.nexus-v3 .chip { padding: 4px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600; background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--border); }

.nexus-v3 .pillars-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nexus-v3 .pillar-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; border: 1px solid var(--border); }

.nexus-v3 .filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.nexus-v3 .filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.nexus-v3 .filter-tab {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.nexus-v3 .filter-tab.active { background: var(--cyan); color: #04101f; border-color: transparent; }
.nexus-v3 .search-box {
  padding: 9px 14px;
  border-radius: 999px;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 13px;
  outline: none;
}
.nexus-v3 .search-box:focus { border-color: var(--cyan); }
.nexus-v3 .labs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.nexus-v3 .nx-lab-tile {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
}
.nexus-v3 .nx-lab-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.nexus-v3 .nx-lab-tile h4 { font-size: 15px; font-weight: 800; line-height: 1.35; margin: 0 0 6px; color: var(--ink); }
.nexus-v3 .nx-lab-tile p { font-size: 12.5px; color: var(--muted); margin: 0; }
.nexus-v3 .lab-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--cyan); }

.nexus-v3 .cta-banner {
  margin-top: 28px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.18), rgba(34, 197, 94, 0.16));
  border: 1.5px solid rgba(56, 189, 248, 0.34);
}
.nexus-v3 .cta-banner h2 { font-size: clamp(24px, 3.2vw, 38px); font-weight: 800; margin: 0 0 10px; letter-spacing: -0.025em; color: var(--ink); }
.nexus-v3 .cta-banner p { font-size: 15px; color: var(--ink-soft); max-width: 560px; margin: 0 auto 22px; }

/* Standalone Subpage Hero (danhgia.html, download.html) */
.nexus-v3 .sub-hero {
  padding: clamp(32px, 4.5vw, 56px) 0 24px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.nexus-v3 .sub-hero .hero-desc { margin: 0 auto 22px; max-width: 640px; }

/* Download Hub Specific */
.nexus-v3 .dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nexus-v3 .dl-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.nexus-v3 .dl-os-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.nexus-v3 .dl-specs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-soft);
}
.nexus-v3 .checksum-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--cyan);
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html[data-theme="light"] .nexus-v3 .checksum-box {
  background: #f1f5f9;
  color: #0369a1;
}

/* Light-mode support for NexusReviews cards on danhgia.html */
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .glass-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08) !important;
}
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .text-white { color: #0f172a !important; }
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .text-slate-200,
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .text-slate-300 { color: #334155 !important; }
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .text-slate-400 { color: #64748b !important; }
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .bg-slate-950,
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .bg-slate-950\/80,
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .bg-slate-950\/70,
html[data-theme="light"] .nexus-v3 #nexusCommunityReviewsRoot .bg-slate-900 {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

/* Footer & Live Web Status Badge */
.nexus-v3 .footer { margin-top: 52px; padding: 36px 0 44px; border-top: 1px solid var(--border); }
.nexus-v3 .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 26px; margin-bottom: 24px; }
.nexus-v3 .footer h5 { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 11px; color: var(--ink); }
.nexus-v3 .footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.nexus-v3 .footer ul a { color: var(--muted); text-decoration: none; }
.nexus-v3 .footer ul a:hover { color: var(--cyan); }
.nexus-v3 .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.nexus-v3 .web-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--emerald);
}

/* Responsive */
@media (max-width: 1080px) {
  .nexus-v3 .hero,
  .nexus-v3 .gamify-grid { grid-template-columns: 1fr; }
  .nexus-v3 .paths-grid,
  .nexus-v3 .pillars-grid,
  .nexus-v3 .dl-grid { grid-template-columns: 1fr; }
  .nexus-v3 .col-7,
  .nexus-v3 .col-5,
  .nexus-v3 .col-4,
  .nexus-v3 .col-6 { grid-column: span 12; }
  .nexus-v3 .labs-grid,
  .nexus-v3 .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nexus-v3 .nav-links,
  .nexus-v3 .streak-pill { display: none; }
  .nexus-v3 .mobile-menu-btn { display: grid; }
}

@media (max-width: 640px) {
  .nexus-v3 .labs-grid,
  .nexus-v3 .footer-grid,
  .nexus-v3 .reward-rules-strip { grid-template-columns: 1fr; }
}


/* =========================================================================
   EMPTY LEADERBOARD STATE & 7-DAY CYCLE COUNTDOWN BANNER
   ========================================================================= */
.nexus-v3 .league-empty-state {
  padding: 24px 18px;
  border-radius: 16px;
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-soft);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.nexus-v3 .league-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.nexus-v3 .league-empty-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}
.nexus-v3 .league-empty-desc {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 390px;
  line-height: 1.55;
}
.nexus-v3 .last-cycle-banner {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.32);
  font-size: 11.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
