/* ===========================================
   NUVIO SETUP — Nuvio.tv Clone Aesthetic
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  /* Dark Theme (Default) */
  --bg-dark: #030305;
  --bg-card-dark: #09090C;
  --fg-dark: #F6F7F9;
  --fg-dim-dark: #A1A1AA;
  --border-dark: rgba(255,255,255,0.08);
  --border-hover-dark: rgba(255,255,255,0.15);
  --accent-dark: #6a5acd;
  --accent-fg-dark: #FFFFFF;

  /* Light Theme */
  --bg-light: #FBFBFD;
  --bg-card-light: #F3F4F8;
  --fg-light: #090A0E;
  --fg-dim-light: #71717A;
  --border-light: rgba(0,0,0,0.08);
  --border-hover-light: rgba(0,0,0,0.15);
  --accent-light: #000000;
  --accent-fg-light: #FFFFFF;

  /* Current Active Theme (Dark by default) */
  --bg: var(--bg-dark);
  --bg-card: var(--bg-card-dark);
  --fg: var(--fg-dark);
  --fg-dim: var(--fg-dim-dark);
  --border: var(--border-dark);
  --border-hover: var(--border-hover-dark);
  --accent: var(--accent-dark);
  --accent-fg: var(--accent-fg-dark);

  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --r-l: 24px;
  --r: 16px;
  --r-s: 8px;
}

/* For Alternating Sections */
.section-alt {
  --bg: var(--bg-light);
  --bg-card: var(--bg-card-light);
  --fg: var(--fg-light);
  --fg-dim: var(--fg-dim-light);
  --border: var(--border-light);
  --border-hover: var(--border-hover-light);
  --accent: var(--accent-light);
  --accent-fg: var(--accent-fg-light);
  background-color: var(--bg);
  color: var(--fg);
}

  --bg: var(--bg-light);
  --bg-card: var(--bg-card-light);
  --fg: var(--fg-light);
  --fg-dim: var(--fg-dim-light);
  --border: var(--border-light);
  --border-hover: var(--border-hover-light);
  --accent: var(--accent-light);
  --accent-fg: var(--accent-fg-light);
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 18px; /* Increased base font size */
  line-height: 1.75; /* Increased line height for better sentence spacing */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  color: var(--fg);
  font-family: var(--font-serif);
}

h1 { font-size: clamp(3.5rem, 8vw, 6rem); margin-bottom: 24px; }
h2 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 24px; }
h3 { font-size: 1.75rem; letter-spacing: -0.02em; margin-bottom: 20px; }
h4 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 16px; }

p { 
  color: var(--fg-dim); 
  margin-bottom: 24px; 
}
p:last-child {
  margin-bottom: 0;
}

a { color: inherit; text-decoration: none; }

/* Layout */
.contain {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 160px 0; /* Huge padding */
}

.section-label {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  margin-bottom: 24px;
}

/* Buttons */
.btn-main, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.btn-main {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn-main:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--border);
}

/* Navigation */
.nav {
  position: fixed;
  top: 24px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 48px); max-width: 1200px; height: 64px;
  background: rgba(3, 3, 5, 0.6);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
  position: fixed;
  top: 24px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 48px); max-width: 1200px; height: 64px;
  background: rgba(3, 3, 5, 0.6);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav.scrolled {
  background: rgba(3, 3, 5, 0.85);
  border: 1px solid rgba(106, 0, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(106,0,255,0.1);
}
  background: rgba(3, 3, 5, 0.85);
  border: 1px solid rgba(106, 0, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(106,0,255,0.1);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 40px;
}
.nav-link {
  font-size: 0.95rem;
  color: var(--fg-dim-dark);
  font-weight: 500;
  transition: color 0.2s;
}
  color: var(--fg-dim-light);
}
.nav-link:hover, .nav-link.active {
  color: var(--fg-dark);
}
  color: var(--fg-light);
}
.nav-burger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 24px; height: 24px;
  flex-direction: column; justify-content: center; gap: 6px;
}
.nav-burger span {
  display: block; width: 100%; height: 2px;
  background: var(--fg); transition: 0.3s;
}

/* Hero */
.hero {
  padding: 240px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 140vw; height: 100vw; max-width: 1600px; max-height: 1200px;
  background: radial-gradient(ellipse at top, rgba(106, 0, 255, 0.25) 0%, rgba(0, 85, 255, 0.15) 30%, transparent 70%);
  filter: blur(60px);
  z-index: -1; pointer-events: none;
}
  content: '';
  position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 140vw; height: 100vw; max-width: 1600px; max-height: 1200px;
  background: radial-gradient(ellipse at top, rgba(106, 0, 255, 0.25) 0%, rgba(0, 85, 255, 0.15) 30%, transparent 70%);
  filter: blur(60px);
  z-index: -1; pointer-events: none;
}
.hero-title {
  margin-bottom: 32px;
}
.hero-sub {
  font-size: 1.35rem;
  max-width: 700px;
  margin: 0 auto 48px;
  color: var(--fg-dim);
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Addon Headers & Logos */
.addon-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}
.addon-logo {
  width: 72px; height: 72px;
  border-radius: var(--r);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.addon-logo img, .addon-logo svg {
  width: 100%; height: 100%;
  object-fit: contain;
}
.addon-url {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  transition: opacity 0.2s;
}
.addon-url:hover { opacity: 0.7; }
.addon-role {
  display: block;
  font-size: 0.95rem;
  color: var(--fg-dim);
  margin-top: 6px;
}

/* Detail Cards */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 40px;
  transition: border-color 0.2s, transform 0.2s;
}
.detail-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.detail-icon {
  margin-bottom: 24px;
  color: var(--fg);
}
.detail-icon svg {
  width: 40px; height: 40px;
}

/* Tier Selector */
.tier-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.tier-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: var(--r-s);
  cursor: pointer;
  color: var(--fg-dim);
  transition: all 0.2s;
  white-space: nowrap;
}
.tier-btn:hover {
  border-color: var(--border-hover);
  color: var(--fg);
}
.tier-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.tier-btn-name {
  font-weight: 600;
  font-size: 1rem;
}
.tier-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 48px;
  animation: fadeIn 0.4s ease;
}
.tier-panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tier-panel-head {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 32px;
}
.config-row {
  display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.config-pill {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.config-on { color: #34D399; border-color: rgba(52,211,153,0.3); }
.config-off { color: #F87171; border-color: rgba(248,113,113,0.3); }

/* Accordions */
.accordion { margin-top: 32px; }
.accordion-trigger {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: none;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--fg); font-size: 1.1rem; font-weight: 500;
  cursor: pointer;
}
.accordion-trigger svg { transition: transform 0.3s; }
.accordion-trigger.open svg { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
}
.source-tbl {
  width: 100%; border-collapse: collapse; margin-bottom: 24px;
  font-size: 0.9rem;
}
.source-tbl th, .source-tbl td {
  padding: 16px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.source-tbl th { color: var(--fg-dim); font-weight: 500; }

/* SubSense layout */
.sub-layout {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.sub-main { flex: 2; min-width: 300px; }

/* Analytics */
.analytics-pair {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 24px; align-items: center; margin-bottom: 48px;
}
.analytics-bridge {
  display: flex; flex-direction: column; align-items: center;
  color: var(--fg-dim); font-size: 0.85rem; letter-spacing: 0.1em;
}

/* Endpoints */
.endpoint-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin: 32px 0;
}
.endpoint {
  background: var(--bg-card); padding: 24px;
  border: 1px solid var(--border); border-radius: var(--r);
}
.endpoint-url {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--fg); margin: 12px 0;
  border-bottom: 1px solid var(--border);
  word-break: break-all;
}

/* Footer */
.footer {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
}
.footer-links a {
  color: var(--fg-dim); font-size: 0.95rem;
}
.footer-links a:hover { color: var(--fg); }
.footer-copy {
  color: var(--fg-dim); font-size: 0.85rem;
}

/* Mobile */
@media(max-width: 900px) {
  .analytics-pair { grid-template-columns: 1fr; }
  .analytics-bridge { flex-direction: row; gap: 12px; }
}

@media(max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero { padding: 140px 0 60px; }
  .tier-selector { padding-bottom: 16px; }
  .tier-panel { padding: 24px; }
  .endpoint-grid { grid-template-columns: 1fr; }
}

/* Drawer */
.mobile-drawer {
  position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 99;
  display: flex; flex-direction: column; padding: 32px 24px;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-drawer.open {
  transform: translateY(0); opacity: 1; pointer-events: auto;
}
.drawer-link {
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}

.reveal-up { opacity:0; transform:translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-up.visible { opacity:1; transform:translateY(0); }

/* ===========================================
   MISSING COMPONENTS FOR INDEX.HTML
   =========================================== */

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.bento-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 40px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.3s ease;
}
.bento-card:hover {
  border-color: var(--border-hover);
}
.bento-wide { grid-column: 1 / -1; }
.bento-num {
  font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--fg-dim);
  margin-bottom: 24px;
}
.bento-icon {
  margin-bottom: 24px; color: var(--fg);
}
.bento-icon svg { width: 40px; height: 40px; }
.bento-tag {
  display: inline-block; margin-top: auto;
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 6px 12px; background: rgba(255,255,255,0.05);
  border-radius: 9999px; width: fit-content;
}

/* Stack Preview */
.stack-preview {
  display: flex; gap: 16px; justify-content: center; margin-top: 60px;
}
.stack-card {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 16px 24px; border-radius: var(--r);
  display: flex; align-items: center; gap: 12px;
  color: var(--fg); font-weight: 500; font-size: 0.95rem;
}

/* Traits & Cascade */
.trait-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.trait { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--fg-dim); }
.trait svg { color: var(--fg); }

.cascade {
  display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 60px;
}
.cascade-step {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 16px 32px; border-radius: 9999px;
  font-weight: 600; display: flex; align-items: center; gap: 16px;
}
.cascade-step span {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--fg-dim);
}
.cascade-arrow { color: var(--border-hover); }

/* Sub Sidebar */
.sub-sidebar { background: var(--bg-card); border: 1px solid var(--border); padding: 32px; border-radius: var(--r); min-width: 280px; }
.sidebar-title { font-weight: 600; margin-bottom: 24px; font-size: 1.1rem; }
.provider-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.provider-dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; }

/* Check List */
.check-list { list-style: none; margin-top: 24px; }
.check-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--fg-dim); }
.check-list li::before { content: "✓"; color: var(--fg); font-weight: bold; }

/* Collections Flow */
.collection-block { display: flex; align-items: center; gap: 32px; margin-bottom: 48px; }
.flow-strip { display: flex; align-items: center; gap: 16px; background: var(--bg-card); padding: 24px; border-radius: var(--r); overflow-x: auto; }
.flow-chip { font-weight: 500; font-size: 0.95rem; white-space: nowrap; }

/* Profile Window */
.preview-window {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-l);
  overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.preview-bar {
  display: flex; align-items: center; gap: 8px; padding: 16px 24px;
  background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border);
}
.preview-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-hover); }
.preview-url { margin-left: auto; margin-right: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--fg-dim); }
.preview-body { padding: 48px; text-align: center; }
.preview-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 24px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.preview-name { font-size: 1.25rem; font-weight: 600; display: block; margin-bottom: 16px; }
.preview-badges { display: flex; gap: 8px; justify-content: center; margin-bottom: 32px; }
.p-badge { padding: 4px 12px; font-size: 0.8rem; border-radius: 9999px; background: rgba(255,255,255,0.05); }
.preview-stats { display: flex; gap: 24px; justify-content: center; }
.ps { display: flex; flex-direction: column; gap: 4px; }
.ps strong { font-size: 1.5rem; }
.ps span { font-size: 0.8rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.05em; }


