/* ============================================================
   InfographAI — app.css
   Design: Dark luxury with electric accents
   Fonts: Syne (display) + DM Sans (body)
============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:         #080C14;
  --bg2:        #0D1220;
  --bg3:        #121929;
  --card:       #0F1622;
  --card2:      #141D2E;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);

  --cyan:       #00E5FF;
  --cyan2:      #00B8D9;
  --violet:     #7C3AED;
  --violet2:    #9F67FF;
  --rose:       #FF3D71;
  --amber:      #FFB800;
  --green:      #00E096;

  --text:       #E8EDF5;
  --text2:      #8A96B0;
  --text3:      #556070;

  --radius:     14px;
  --radius-sm:  8px;
  --radius-lg:  20px;
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 24px 64px rgba(0,0,0,0.7);
  --glow-cyan:  0 0 40px rgba(0,229,255,0.15);
  --glow-violet:0 0 40px rgba(124,58,237,0.2);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Background mesh ───────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 10%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(0,229,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Typography ────────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan2); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ════════════════════════════════════════════════════════════
   NAV
════════════════════════════════════════════════════════════ */
.topnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 0 32px; height: 64px;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  color: var(--text); text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  font-size: 22px;
  background: linear-gradient(135deg, var(--cyan), var(--violet2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex; align-items: center; gap: 4px; margin-left: 32px;
}
.nav-link {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px; font-weight: 500;
  transition: all .2s; text-decoration: none;
}
.nav-link svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--cyan); background: rgba(0,229,255,0.08); }

.nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.credit-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 99px;
  background: rgba(0,229,255,0.07);
  border: 1px solid rgba(0,229,255,0.2);
  font-size: 13px;
}
.credit-icon { color: var(--cyan); font-size: 11px; }
.credit-val { font-family: var(--font-display); font-weight: 700; color: var(--cyan); }
.credit-lbl { color: var(--text3); }

.nav-user {
  position: relative; display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 5px 10px 5px 5px;
  border-radius: var(--radius-sm); transition: background .2s;
}
.nav-user:hover { background: var(--bg3); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: 14px; font-weight: 500; color: var(--text); }
.chevron { width: 16px; height: 16px; fill: var(--text3); }
.user-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px; padding: 6px;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.user-menu.open { display: block; animation: fadeDown .15s ease; }
.umenu-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px; transition: all .15s;
}
.umenu-item svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.umenu-item:hover { background: var(--bg3); color: var(--text); }
.umenu-danger:hover { color: var(--rose); background: rgba(255,61,113,0.08); }

/* ════════════════════════════════════════════════════════════
   FLASH MESSAGES
════════════════════════════════════════════════════════════ */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; margin: 16px 32px 0;
  border-radius: var(--radius-sm); font-size: 14px;
  border-left: 3px solid;
  animation: slideIn .3s ease;
}
.flash span { font-weight: 700; }
.flash-success { background: rgba(0,224,150,0.08); border-color: var(--green); color: var(--green); }
.flash-error   { background: rgba(255,61,113,0.08); border-color: var(--rose);  color: var(--rose); }
.flash-info    { background: rgba(0,229,255,0.08);  border-color: var(--cyan);  color: var(--cyan); }

/* ════════════════════════════════════════════════════════════
   LAYOUT WRAPPERS
════════════════════════════════════════════════════════════ */
.page-wrap { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.page-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.page-header h1 { font-size: 28px; color: var(--text); }
.page-header p  { color: var(--text2); margin-top: 6px; font-size: 15px; }

/* ════════════════════════════════════════════════════════════
   CARDS
════════════════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--border2); }
.card-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.card-sub { font-size: 13px; color: var(--text3); margin-bottom: 20px; }

/* ════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s; white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan2), var(--cyan));
  color: #000; box-shadow: 0 4px 20px rgba(0,229,255,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(0,229,255,0.35); color: #000; }
.btn-violet {
  background: linear-gradient(135deg, var(--violet), var(--violet2));
  color: #fff; box-shadow: 0 4px 20px rgba(124,58,237,0.3);
}
.btn-violet:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(124,58,237,0.4); }
.btn-ghost {
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-danger { background: rgba(255,61,113,0.12); color: var(--rose); border: 1px solid rgba(255,61,113,0.2); }
.btn-danger:hover { background: rgba(255,61,113,0.2); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ════════════════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text2); margin-bottom: 7px; letter-spacing: .03em;
  text-transform: uppercase;
}
.form-control {
  width: 100%; padding: 11px 15px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  transition: all .2s; outline: none;
}
.form-control:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.1); }
.form-control::placeholder { color: var(--text3); }
.form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--rose); margin-top: 5px; }

/* ── URL input special ── */
.url-input-wrap {
  display: flex; gap: 0;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color .2s;
}
.url-input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.1); }
.url-input-wrap .form-control { border: none; background: transparent; box-shadow: none; flex: 1; }
.url-input-wrap .btn { border-radius: 0; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   STEP WIZARD
════════════════════════════════════════════════════════════ */
.step-bar {
  display: flex; align-items: flex-start; gap: 0;
  margin-bottom: 40px; position: relative;
}
.step-bar::before {
  content: ''; position: absolute; top: 17px; left: 20px; right: 20px; height: 2px;
  background: var(--border2); z-index: 0;
}
.step-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 8px; position: relative; z-index: 1; cursor: pointer;
}
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  border: 2px solid var(--border2); background: var(--bg2);
  color: var(--text3); transition: all .3s;
}
.step-item.done  .step-dot { background: var(--green);  border-color: var(--green);  color: #000; }
.step-item.active .step-dot { background: var(--cyan); border-color: var(--cyan); color: #000; box-shadow: 0 0 20px rgba(0,229,255,0.4); }
.step-label { font-size: 11px; font-weight: 600; color: var(--text3); text-align: center; letter-spacing: .04em; text-transform: uppercase; }
.step-item.active .step-label { color: var(--cyan); }
.step-item.done  .step-label  { color: var(--green); }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeIn .3s ease; }

/* ── Pipeline progress ── */
.pipeline {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.pipe-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--border);
  transition: all .3s;
}
.pipe-item.active { border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.04); }
.pipe-item.done   { border-color: rgba(0,224,150,0.3); background: rgba(0,224,150,0.04); }
.pipe-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--bg2); border: 1px solid var(--border);
}
.pipe-item.active .pipe-icon { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.2); }
.pipe-item.done   .pipe-icon { background: rgba(0,224,150,0.1); border-color: rgba(0,224,150,0.2); }
.pipe-info { flex: 1; }
.pipe-name { font-size: 14px; font-weight: 600; color: var(--text2); }
.pipe-item.active .pipe-name { color: var(--cyan); }
.pipe-item.done   .pipe-name { color: var(--green); }
.pipe-desc { font-size: 12px; color: var(--text3); margin-top: 2px; }
.pipe-status { font-size: 12px; font-weight: 600; }
.pipe-item.active .pipe-status { color: var(--cyan); }
.pipe-item.done   .pipe-status { color: var(--green); }
.pipe-item.pending .pipe-status { color: var(--text3); }

/* ── Big progress bar ── */
.progress-outer {
  height: 6px; background: var(--bg2); border-radius: 3px;
  overflow: hidden; margin: 20px 0;
}
.progress-inner {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width .5s ease;
  box-shadow: 0 0 12px rgba(0,229,255,0.4);
}

/* ════════════════════════════════════════════════════════════
   INFOGRAPHIC DOWNLOAD GRID
════════════════════════════════════════════════════════════ */
.infograph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; margin-top: 24px;
}
.infograph-card {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all .25s; cursor: pointer;
}
.infograph-card:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: var(--glow-cyan); }
.infograph-thumb {
  aspect-ratio: 2/3; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; position: relative; overflow: hidden;
}
.infograph-thumb::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,229,255,0.1));
}
.infograph-footer {
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
}
.infograph-num { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text2); }
.infograph-dl {
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(0,229,255,0.1); border: 1px solid rgba(0,229,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan); transition: all .2s;
}
.infograph-dl:hover { background: var(--cyan); color: #000; }
.infograph-dl svg { width: 14px; height: 14px; fill: currentColor; }

/* ════════════════════════════════════════════════════════════
   PRICING
════════════════════════════════════════════════════════════ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 32px;
}
.plan-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px;
  position: relative; overflow: hidden; transition: all .25s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.popular {
  border-color: rgba(0,229,255,0.4);
  background: linear-gradient(160deg, rgba(0,229,255,0.04), var(--card));
  box-shadow: var(--glow-cyan);
}
.plan-badge {
  position: absolute; top: 20px; right: 20px;
  padding: 4px 12px; border-radius: 99px;
  background: linear-gradient(135deg, var(--cyan2), var(--cyan));
  color: #000; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.plan-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  color: var(--text); margin-bottom: 6px;
}
.plan-price {
  font-family: var(--font-display); font-size: 48px; font-weight: 800;
  color: var(--text); line-height: 1; margin: 20px 0 4px;
}
.plan-price span { font-size: 20px; color: var(--text2); font-weight: 500; }
.plan-period { font-size: 13px; color: var(--text3); margin-bottom: 24px; }
.plan-divider { height: 1px; background: var(--border); margin: 24px 0; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.plan-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--text2);
}
.plan-features li::before {
  content: '✓'; color: var(--green); font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

/* ════════════════════════════════════════════════════════════
   HISTORY
════════════════════════════════════════════════════════════ */
.history-list { display: flex; flex-direction: column; gap: 14px; }
.history-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 20px;
  transition: border-color .2s;
}
.history-card:hover { border-color: var(--border2); }
.history-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--bg2); border: 1px solid var(--border);
}
.history-meta { flex: 1; min-width: 0; }
.history-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-sub { font-size: 13px; color: var(--text3); margin-top: 3px; }
.history-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* ── Status badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-done     { background: rgba(0,224,150,0.1);  color: var(--green); }
.badge-queued   { background: rgba(255,184,0,0.1);  color: var(--amber); }
.badge-active   { background: rgba(0,229,255,0.1);  color: var(--cyan); }
.badge-failed   { background: rgba(255,61,113,0.1); color: var(--rose); }
.badge-partial  { background: rgba(159,103,255,0.1);color: var(--violet2); }

/* ════════════════════════════════════════════════════════════
   STATS ROW
════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}
.stat-val {
  font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--text);
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text3); margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }
.stat-accent { margin-top: 8px; font-size: 12px; font-weight: 600; }
.stat-cyan   { color: var(--cyan); }
.stat-green  { color: var(--green); }
.stat-violet { color: var(--violet2); }
.stat-amber  { color: var(--amber); }

/* ════════════════════════════════════════════════════════════
   AUTH PAGES
════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-box {
  width: 100%; max-width: 440px;
}
.auth-logo {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 800;
  color: var(--text); margin-bottom: 36px;
}
.auth-logo .logo-icon { font-size: 28px; }
.auth-card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 40px;
}
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text3); margin-bottom: 30px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text3); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text3); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border2);
}

/* ════════════════════════════════════════════════════════════
   ACCOUNT PAGE
════════════════════════════════════════════════════════════ */
.account-grid {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start;
}
.account-sidebar { display: flex; flex-direction: column; gap: 8px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.sidebar-item svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.sidebar-item:hover { background: var(--bg3); color: var(--text); }
.sidebar-item.active { background: rgba(0,229,255,0.08); color: var(--cyan); }

/* ── BYOK API key cards ── */
.apikey-grid { display: flex; flex-direction: column; gap: 14px; }
.apikey-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
}
.apikey-icon {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--card); border: 1px solid var(--border);
}
.apikey-info { flex: 1; }
.apikey-name { font-size: 14px; font-weight: 600; color: var(--text); }
.apikey-status { font-size: 12px; color: var(--text3); margin-top: 2px; }
.apikey-input { flex: 1; max-width: 280px; }

/* ════════════════════════════════════════════════════════════
   TEMPLATE SELECTOR
════════════════════════════════════════════════════════════ */
.template-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px;
}
.template-item {
  background: var(--bg2); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; transition: all .2s; text-align: center;
}
.template-item:hover { border-color: var(--border2); background: var(--card); }
.template-item.selected { border-color: var(--cyan); background: rgba(0,229,255,0.06); }
.template-emoji { font-size: 28px; }
.template-label { font-size: 12px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .04em; }
.template-item.selected .template-label { color: var(--cyan); }

/* ════════════════════════════════════════════════════════════
   INPUT MODE TABS (Auto / Manual)
════════════════════════════════════════════════════════════ */
.input-tabs {
  display: flex; gap: 6px; margin-bottom: 28px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px;
  width: fit-content;
}
.input-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; background: transparent;
  color: var(--text2); transition: all .2s;
}
.input-tab svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.input-tab:hover { color: var(--text); background: var(--bg3); }
.input-tab.active {
  background: linear-gradient(135deg, rgba(0,229,255,0.15), rgba(124,58,237,0.12));
  color: var(--cyan);
  border: 1px solid rgba(0,229,255,0.25);
  box-shadow: 0 2px 12px rgba(0,229,255,0.1);
}
.tab-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 99px;
  background: rgba(0,229,255,0.15); color: var(--cyan);
  border: 1px solid rgba(0,229,255,0.25);
}

/* ── Video search result card ── */
.video-result-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--bg2); border: 2px solid var(--border);
  cursor: pointer; transition: all .2s; position: relative;
}
.video-result-card:hover { border-color: var(--border2); background: var(--card); }
.video-result-card.selected {
  border-color: var(--cyan);
  background: rgba(0,229,255,0.05);
  box-shadow: 0 0 20px rgba(0,229,255,0.08);
}
.video-thumb {
  width: 120px; height: 68px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0; background: var(--bg3);
  position: relative;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center; font-size: 24px;
}
.video-duration-badge {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.8); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 5px;
  border-radius: 3px; font-family: var(--font-display);
}
.video-info { flex: 1; min-width: 0; }
.video-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--text); line-height: 1.3; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta { font-size: 12px; color: var(--text3); display: flex; gap: 10px; flex-wrap: wrap; }
.video-infograph-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.2);
  color: var(--cyan); margin-top: 7px;
}
.video-checkbox {
  width: 20px; height: 20px; flex-shrink: 0;
  accent-color: var(--cyan); cursor: pointer; margin-top: 2px;
}
.video-result-card.selected .video-title { color: var(--cyan); }
.empty-state {
  text-align: center; padding: 60px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 52px; opacity: .4; }
.empty-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text2); }
.empty-sub { font-size: 14px; color: var(--text3); max-width: 340px; }

/* ════════════════════════════════════════════════════════════
   LANDING PAGE
════════════════════════════════════════════════════════════ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '◈';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 600px; color: rgba(124,58,237,0.03);
  pointer-events: none; line-height: 1;
  font-family: var(--font-display);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 99px;
  background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.2);
  font-size: 12px; font-weight: 600; color: var(--cyan);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px);
  font-weight: 800; line-height: 1.1; max-width: 860px; margin: 0 auto 22px;
  letter-spacing: -.02em;
}
.hero-title .grad {
  background: linear-gradient(135deg, var(--cyan), var(--violet2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 18px; color: var(--text2); max-width: 540px; margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero-proof { margin-top: 20px; font-size: 13px; color: var(--text3); }

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin: 60px 0;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all .25s;
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--bg2); border: 1px solid var(--border);
}
.feature-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ════════════════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border2);
}
.data-table td {
  padding: 14px 16px; font-size: 14px; color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.data-table tr:hover td { background: var(--bg2); }
.data-table td:first-child, .data-table th:first-child { color: var(--text); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   MISC UTILITIES
════════════════════════════════════════════════════════════ */
.text-cyan   { color: var(--cyan); }
.text-violet { color: var(--violet2); }
.text-green  { color: var(--green); }
.text-rose   { color: var(--rose); }
.text-amber  { color: var(--amber); }
.text-muted  { color: var(--text3); }
.text-center { text-align: center; }
.font-display{ font-family: var(--font-display); }
.mt-auto { margin-top: auto; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════════ */
@keyframes fadeIn    { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeDown  { from { opacity:0; transform: translateY(-6px); } to { opacity:1; transform: translateY(0); } }
@keyframes slideIn   { from { opacity:0; transform: translateX(-8px); } to { opacity:1; transform: translateX(0); } }
@keyframes pulse     { 0%,100%{ opacity:1; } 50%{ opacity:.5; } }
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes shimmer   {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.animate-pulse { animation: pulse 2s infinite; }
.animate-spin  { animation: spin .8s linear infinite; }

/* loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 400px 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topnav { padding: 0 16px; }
  .nav-links { display: none; }
  .container { padding: 0 16px; }
  .account-grid { grid-template-columns: 1fr; }
  .step-bar::before { display: none; }
  .step-label { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .hero { padding: 60px 0 40px; }
  .hero-sub { font-size: 16px; }
  .apikey-card { flex-wrap: wrap; }
  .apikey-input { max-width: 100%; flex-basis: 100%; }
}
