/* StreamPack — Main Stylesheet */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f0f1a;
  --bg-card:   #16213e;
  --bg-input:  #0f3460;
  --border:    #1e3a5f;
  --accent:    #e94560;
  --accent-dim:#2d1a2e;
  --live:      #4ade80;
  --live-bg:   #1a472a;
  --warn:      #fbbf24;
  --warn-bg:   #3d2a00;
  --error:     #f87171;
  --error-bg:  #4a1942;
  --info:      #60a5fa;
  --info-bg:   #1e3a5f;
  --text:      #e2e8f0;
  --text-2:    #94a3b8;
  --text-3:    #475569;
  --radius:    10px;
  --shadow:    0 20px 60px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ── */
.hidden  { display: none !important; }
.center  { text-align: center; }
.mt-sm   { margin-top: 8px; }
.mt-md   { margin-top: 16px; }
.mt-lg   { margin-top: 24px; }
.mb-md   { margin-bottom: 16px; }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.nav-logo span { font-size: 1.4rem; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a { color: var(--text-2); padding: 6px 14px; border-radius: 6px; font-size: 0.9rem; transition: all 0.15s; }
.nav-links a:hover { color: var(--text); background: var(--bg-card); text-decoration: none; }
.btn-nav { background: var(--accent) !important; color: #fff !important; font-weight: 600; }
.btn-nav:hover { filter: brightness(1.1); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius); border: none;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease; text-decoration: none;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.85rem; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 10px 14px;
  font-size: 0.95rem; outline: none; transition: border-color 0.15s;
}
input:focus { border-color: var(--accent); }
.form-error { color: var(--error); background: var(--error-bg); border-radius: 6px; padding: 10px 14px; font-size: 0.85rem; margin-bottom: 12px; }
.form-success { color: var(--live); background: var(--live-bg); border-radius: 6px; padding: 10px 14px; font-size: 0.85rem; margin-bottom: 12px; }

/* ── Cards ── */
.card {
  background: var(--bg-card); border-radius: 12px; padding: 24px;
  border: 1px solid var(--border);
}

/* ── Hero ── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(233,69,96,0.12) 0%, transparent 70%);
}
.hero-badge {
  display: inline-block; background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 20px;
  padding: 4px 14px; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 20px; letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--text-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero h1 em { -webkit-text-fill-color: var(--accent); font-style: normal; }
.hero p { font-size: 1.15rem; color: var(--text-2); max-width: 560px; margin: 0 auto 36px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Features ── */
.features { padding: 80px 24px; max-width: 1100px; margin: 0 auto; }
.section-label { font-size: 0.8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }

/* ── Comparison table ── */
.compare-section { padding: 80px 24px; background: var(--bg-card); }
.compare-inner { max-width: 800px; margin: 0 auto; }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 32px; }
.compare-table th, .compare-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); }
.compare-table th.ours { color: var(--accent); }
.compare-table td:first-child { color: var(--text-2); font-size: 0.9rem; }
.compare-table td.ours { color: var(--live); font-weight: 600; }
.compare-table td.theirs { color: var(--text-3); }

/* ── Pricing ── */
.pricing { padding: 80px 24px; max-width: 900px; margin: 0 auto; text-align: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px 28px; position: relative;
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 3px 14px; border-radius: 20px; white-space: nowrap; }
.pricing-name { font-size: 1rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.pricing-price { font-size: 2.8rem; font-weight: 800; margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-2); }
.pricing-desc { color: var(--text-2); font-size: 0.85rem; margin-bottom: 24px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 28px; }
.pricing-features li { padding: 6px 0; font-size: 0.9rem; color: var(--text-2); display: flex; gap: 10px; }
.pricing-features li::before { content: '✓'; color: var(--live); font-weight: 700; flex-shrink: 0; }

/* ── Download section ── */
.downloads { padding: 80px 24px; max-width: 900px; margin: 0 auto; text-align: center; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.download-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.download-card h3 { font-size: 1.05rem; font-weight: 700; margin: 12px 0 8px; }
.download-card p { color: var(--text-2); font-size: 0.85rem; margin-bottom: 20px; }
.download-note { color: var(--text-3); font-size: 0.8rem; margin-top: 10px; }

/* ── Auth modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow); position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-2);
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.modal-logo-icon { font-size: 1.6rem; }
.modal-logo-text { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.modal-tagline { color: var(--text-2); font-size: 0.85rem; margin-bottom: 24px; }
.modal-tabs { display: flex; background: var(--bg-input); border-radius: 8px; margin-bottom: 24px; overflow: hidden; }
.modal-tab { flex: 1; padding: 9px; border: none; background: transparent; color: var(--text-2); cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.15s; }
.modal-tab.active { background: var(--accent); color: #fff; }

/* ── Account dashboard ── */
.dashboard { display: none; min-height: 100vh; }
.dashboard.visible { display: block; }
.dash-header {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.dash-logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user-email { color: var(--text-2); font-size: 0.85rem; }

/* Dashboard tab nav */
.dash-tabs {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 0 24px; display: flex; gap: 0; overflow-x: auto;
}
.dash-tab {
  padding: 14px 20px; border: none; background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 0.9rem; font-weight: 600;
  border-bottom: 2px solid transparent; transition: all 0.15s; white-space: nowrap;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.dash-body { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 28px; }
.dash-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.dash-card h3 { font-size: 0.75rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.dash-stat { font-size: 2rem; font-weight: 700; margin-bottom: 4px; }
.dash-stat-label { color: var(--text-2); font-size: 0.85rem; }
.dash-section { margin-bottom: 28px; }
.dash-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Ingest table */
.ingest-table { display: flex; flex-direction: column; }
.ingest-row {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.ingest-row:last-child { border-bottom: none; }
.ingest-label {
  font-size: 0.82rem; color: var(--text-2); font-weight: 600;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.ingest-val {
  font-family: 'Courier New', monospace; font-size: 0.85rem; color: var(--info);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: none; border: none; display: block; width: 100%;
}
.ingest-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ingest-note { color: var(--text-2); font-size: 0.8rem; margin-top: 14px; line-height: 1.6; }
.badge-rec {
  background: rgba(74,222,128,0.15); color: var(--live);
  font-size: 0.68rem; padding: 1px 6px; border-radius: 4px; font-weight: 700;
}

@media (max-width: 600px) {
  .ingest-row { grid-template-columns: 1fr; gap: 6px; }
  .ingest-label { margin-bottom: 2px; }
}

/* Setup guide */
.setup-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.setup-tab {
  padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-2); cursor: pointer;
  font-size: 0.9rem; font-weight: 600; transition: all 0.15s;
}
.setup-tab:hover { border-color: var(--accent); color: var(--accent); }
.setup-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-content { display: flex; flex-direction: column; gap: 20px; }
.setup-step { display: flex; gap: 16px; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.step-body { flex: 1; }
.step-title { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.step-body p { color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }
.setup-code-block {
  background: var(--bg-input); border-radius: 8px; padding: 12px 16px;
  margin-top: 10px; display: flex; flex-direction: column; gap: 8px;
}
.setup-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.setup-code-row span { color: var(--text-2); font-size: 0.8rem; min-width: 100px; }
.setup-code-row code { font-family: 'Courier New', monospace; font-size: 0.82rem; color: var(--info); flex: 1; }
.setup-note {
  background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.2);
  border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: var(--text-2); line-height: 1.6;
}

/* Destinations */
.dest-add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dest-add-row input:first-child { flex: 2; min-width: 200px; }
.dest-add-row input:nth-child(2) { flex: 1; min-width: 120px; }
.dest-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.preset-btn {
  padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 0.8rem;
  transition: all 0.15s;
}
.preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.dest-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.dest-item:last-child { border-bottom: none; }
.dest-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dest-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-type { background: var(--info-bg); color: var(--info); font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e3a5f; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 20px; font-size: 0.9rem; font-weight: 600;
  z-index: 9999; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Copy button (used in ingest table and setup guide) ── */
.copy-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-2); border-radius: 4px; padding: 3px 10px; font-size: 0.75rem; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.status-live    { background: var(--live-bg); color: var(--live); }
.status-standby { background: var(--info-bg); color: var(--info); }
.status-error   { background: var(--error-bg); color: var(--error); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; }

/* ── Footer ── */
footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 40px 24px; margin-top: 80px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-2); font-size: 0.85rem; }
.footer-copy { color: var(--text-3); font-size: 0.8rem; }

/* ── Animations ── */
@keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes fadeIn   { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInLeft { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }
@keyframes scaleIn  { from { opacity:0; transform:scale(0.92); } to { opacity:1; transform:scale(1); } }
@keyframes shimmer  { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes float    { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }
@keyframes gradientShift { 0%,100% { background-position:0% 50%; } 50% { background-position:100% 50%; } }

.fade-in { animation: fadeIn 0.25s ease-out; }

/* Scroll-reveal — elements start hidden, JS adds .revealed */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay helpers */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }
.delay-7 { transition-delay: 0.7s !important; }
.delay-8 { transition-delay: 0.8s !important; }

/* Hero animated gradient headline */
.hero h1 {
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

/* Hero badge float */
.hero-badge {
  animation: float 3s ease-in-out infinite;
}

/* Feature cards — hover lift already exists, add subtle entrance */
.feature-card {
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(233,69,96,0.15);
}

/* Pricing card hover */
.pricing-card {
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(233,69,96,0.12);
}
.pricing-card.featured:hover {
  box-shadow: 0 16px 50px rgba(233,69,96,0.25);
}

/* Compare table row highlight */
.compare-table tbody tr {
  transition: background 0.15s;
}
.compare-table tbody tr:hover {
  background: rgba(233,69,96,0.05);
}

/* Download card hover */
.download-card {
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}
.download-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233,69,96,0.12);
}

/* Nav link underline animation */
.nav-links a:not(.btn-nav) {
  position: relative;
}
.nav-links a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent);
  transition: left 0.2s, right 0.2s;
}
.nav-links a:not(.btn-nav):hover::after {
  left: 8px; right: 8px;
}

/* Live dot pulse */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; }

/* Section label animated underline */
.section-label {
  display: inline-block;
  position: relative;
}

/* Smooth scroll progress indicator */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* Hero background animated gradient */
.hero {
  background: radial-gradient(ellipse at 50% 0%, rgba(233,69,96,0.15) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 80%, rgba(96,165,250,0.06) 0%, transparent 50%);
  animation: gradientShift 8s ease infinite;
  background-size: 200% 200%;
}

/* ── Scene badge ── */
.scene-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; }
.scene-live    { background: var(--live-bg);  color: var(--live); }
.scene-low     { background: var(--warn-bg);  color: var(--warn); }
.scene-offline { background: var(--error-bg); color: var(--error); }

/* ── Ingest items ── */
.ingest-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.ingest-item:last-child { border-bottom: none; }
.ingest-item-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ingest-item-name { font-weight: 700; font-size: 0.95rem; }
.ingest-item-key  { font-family: 'Courier New', monospace; font-size: 0.75rem; color: var(--info); background: var(--bg-input); padding: 2px 8px; border-radius: 4px; }
.ingest-item-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.badge-primary { background: rgba(233,69,96,0.15); color: var(--accent); font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; }

/* ── Access level badges ── */
.access-badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.access-all         { background: rgba(74,222,128,0.15); color: var(--live); }
.access-moderator   { background: rgba(251,191,36,0.15); color: var(--warn); }
.access-broadcaster { background: rgba(233,69,96,0.15);  color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 640px) {
  nav { padding: 0 16px; }
  .nav-links a:not(.btn-nav) { display: none; }
  .hero { padding: 60px 16px 50px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .features, .pricing, .downloads { padding: 50px 16px; }
  .compare-section { padding: 50px 16px; }
  .modal { padding: 24px; }
  .dash-body { padding: 24px 16px; }
}

/* ── Task 29.13.12: Responsive dashboard at 320px–768px ── */
@media (max-width: 768px) {
  .dash-tabs { gap: 0; padding: 0 8px; }
  .dash-tab  { padding: 12px 10px; font-size: 0.8rem; }
  .dash-body { padding: 16px 12px; }
  .dash-grid { grid-template-columns: 1fr; }
  .ingest-row { grid-template-columns: 1fr; gap: 4px; }
  .ingest-actions { flex-wrap: wrap; }
  .dest-add-row { flex-direction: column; }
  .dest-add-row input { width: 100%; }
  .dest-presets { flex-wrap: wrap; gap: 6px; }
  .setup-tabs { flex-wrap: wrap; }
  .setup-step { flex-direction: column; }
  .step-num { margin-bottom: 6px; }
  .dash-header { padding: 0 12px; }
  .dash-user-email { display: none; }
  .ingest-item { flex-direction: column; align-items: flex-start; }
  .ingest-item-actions { flex-wrap: wrap; }
  .dest-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .collab-list .dest-item { flex-direction: column; }
  #dashtab-collab .dash-card > div { flex-direction: column; }
  #share-ingest, #share-duration { width: 100%; }
  canvas#bitrate-graph { height: 80px !important; }
}

@media (max-width: 480px) {
  .dash-tab { padding: 10px 8px; font-size: 0.75rem; }
  .btn-lg { padding: 12px 20px; font-size: 0.95rem; }
  .modal { padding: 20px 16px; }
  .hero { padding: 40px 12px 36px; }
  .hero h1 { font-size: 1.8rem; }
}

/* ── Hardware Section ─────────────────────────────────────────────────────── */
.hardware-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, var(--bg) 0%, #0a0a14 100%);
}
.hardware-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-sub {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 48px;
}
.section-sub.center { text-align: center; }

.hw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.hw-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.hw-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.hw-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(233,69,96,0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.hw-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.hw-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

.hw-compat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 28px;
}
.hw-compat-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.hw-compat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.hw-compat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}
.hw-compat-check {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(74,222,128,0.12);
  color: var(--live);
  font-size: 0.6rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hw-specs {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 40px;
}
.hw-specs-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.hw-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}
.hw-spec-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.hw-spec-row:last-child { border-bottom: none; }
.hw-spec-row:nth-last-child(2) { border-bottom: none; }
.hw-spec-label {
  font-size: 0.85rem;
  color: var(--text-2);
  font-weight: 500;
}
.hw-spec-val {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
}

.hw-cta {
  text-align: center;
  padding: 40px 0 0;
}

@media (max-width: 768px) {
  .hw-grid { grid-template-columns: 1fr; }
}
