﻿/* ===== DESIGN TOKENS ===== */
:root {
  --bg-base: #080C14;
  --bg-card: #0D1321;
  --bg-card2: #111827;
  --bg-input: #0F1827;
  --bg-sidebar: #0A0F1C;
  --border-glass: rgba(255,255,255,0.08);
  --border-glow: rgba(99,102,241,0.35);

  --text-primary: #F0F4FF;
  --text-muted: #8892A4;
  --text-dim: #4A5568;

  --accent-indigo: #6366F1;
  --accent-violet: #8B5CF6;
  --accent-cyan: #06B6D4;
  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;
  --accent-pink: #EC4899;
  --accent-gold: #F59E0B;
  --accent-yt: #FF0000;
  --accent-ig: #E1306C;
  --accent-tt: #010101;

  --grad-primary: linear-gradient(135deg, #6366F1, #8B5CF6);
  --grad-yt: linear-gradient(135deg, #FF0000, #CC0000);
  --grad-emerald: linear-gradient(135deg, #10B981, #059669);
  --grad-cyan: linear-gradient(135deg, #06B6D4, #0891B2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 24px rgba(99,102,241,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== SETUP OVERLAY ===== */
.setup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 30% 40%, rgba(99,102,241,0.15), transparent 60%),
              linear-gradient(135deg, #040810, #080C14);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}

.setup-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 0 80px rgba(99,102,241,0.15), var(--shadow-card);
}

.setup-icon {
  font-size: 3rem;
  color: var(--accent-yt);
  margin-bottom: 1rem;
  text-align: center;
}

.setup-box h2 {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.setup-box > p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: var(--grad-primary);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}

.api-key-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.api-key-input-row input {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: monospace;
  outline: none;
  transition: border-color 0.2s;
}

.api-key-input-row input:focus { border-color: var(--accent-indigo); }

.api-key-input-row button {
  width: 44px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.api-key-input-row button:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

.api-error {
  color: var(--accent-rose);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(244,63,94,0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244,63,94,0.2);
}

.btn-connect {
  width: 100%;
  padding: 0.85rem;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-connect:hover { opacity: 0.9; transform: translateY(-1px); }

.setup-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

/* ===== TOP NAV ===== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 180px;
}

.brand-logo {
  width: 36px; height: 36px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #fff;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tag {
  display: inline-block;
  background: var(--grad-emerald);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
  margin-left: 0.25rem;
  letter-spacing: 0.05em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-center { flex: 1; display: flex; justify-content: center; }

.platform-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.ptab {
  padding: 0.45rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
}

.ptab:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.ptab.active { background: var(--bg-card); color: var(--text-primary); box-shadow: var(--shadow-card); }

.live-dot {
  width: 6px; height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
  justify-content: flex-end;
}

.api-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-dot.green { background: var(--accent-emerald); }
.status-dot.red { background: var(--accent-rose); }

.btn-change-key, .btn-saved-nav {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Inter', sans-serif;
}

.btn-change-key:hover, .btn-saved-nav:hover {
  color: var(--text-primary);
  border-color: var(--accent-indigo);
  background: rgba(99,102,241,0.1);
}

.btn-saved-nav span {
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ===== SEARCH HERO ===== */
.search-hero {
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.12), transparent 60%);
  border-bottom: 1px solid var(--border-glass);
  padding: 2rem 2rem 1.5rem;
}

.search-hero-inner { max-width: 1200px; margin: 0 auto; }

.platform-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
}

.platform-note.yt {
  background: rgba(255,0,0,0.08);
  border-color: rgba(255,0,0,0.2);
  color: #FFB3B3;
}

.platform-note.yt i { color: var(--accent-yt); font-size: 1.1rem; }

.search-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.search-form-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.sf-group { display: flex; flex-direction: column; gap: 0.5rem; min-width: 140px; }
.sf-wide { flex: 1; min-width: 300px; }

.sf-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sf-input {
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.sf-input:focus { border-color: var(--accent-indigo); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.sf-select {
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238892A4' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.sf-select:focus { border-color: var(--accent-indigo); }

.sf-range-pair {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sf-input-sm {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.sf-input-sm:focus { border-color: var(--accent-indigo); }

.sf-to {
  color: var(--text-dim);
  font-size: 0.8rem;
  white-space: nowrap;
}

.quick-niche-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.nchip {
  padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.nchip:hover { background: rgba(99,102,241,0.15); border-color: var(--accent-indigo); color: var(--text-primary); }
.nchip.active { background: rgba(99,102,241,0.2); border-color: var(--accent-indigo); color: var(--accent-indigo); }

.tier-quick-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
}

.tier-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}

.tpill {
  padding: 0.3rem 0.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.tpill:hover { background: rgba(6,182,212,0.12); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.tpill.active { background: rgba(6,182,212,0.18); border-color: var(--accent-cyan); color: var(--accent-cyan); }

.btn-search-live {
  padding: 0.75rem 1.75rem;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.btn-search-live:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
.btn-search-live:active { transform: translateY(0); }
.btn-search-live:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===== RESULTS SECTION ===== */
.results-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-label { font-size: 0.95rem; font-weight: 600; }
.results-label strong { color: var(--accent-cyan); }
.criteria-label { color: var(--accent-indigo); }

.results-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.results-bar-right { display: flex; align-items: center; gap: 0.75rem; }

.btn-export-sm {
  padding: 0.4rem 0.8rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
}

.btn-export-sm:hover { background: rgba(16,185,129,0.2); }

/* ===== LOADING STATE ===== */
.loading-state {
  text-align: center;
  padding: 5rem 1rem;
}

.loader-ring {
  width: 56px; height: 56px;
  border: 3px solid rgba(99,102,241,0.2);
  border-top-color: var(--accent-indigo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.loader-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); font-size: 0.88rem; }

/* ===== WELCOME STATE ===== */
.welcome-state {
  text-align: center;
  padding: 4rem 1rem;
}

.welcome-icon {
  font-size: 4rem;
  color: var(--accent-yt);
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.welcome-state h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.welcome-example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.wchip, .welcome-example-chips span {
  padding: 0.5rem 1.1rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.wchip:hover, .welcome-example-chips span:hover {
  background: rgba(99,102,241,0.2);
  border-color: var(--accent-indigo);
  transform: translateY(-2px);
}

/* ===== RESULTS GRID ===== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* ===== REAL DATA CREATOR CARD ===== */
.creator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.creator-card:hover {
  border-color: rgba(99,102,241,0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.15);
}

.card-banner {
  height: 6px;
  background: var(--grad-yt);
}

.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; }

.card-profile-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.card-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--border-glass);
  background: var(--bg-input);
}

.platform-pin {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  border: 2px solid var(--bg-card);
}

.platform-pin.youtube { background: var(--accent-yt); color: #fff; }
.platform-pin.instagram { background: var(--accent-ig); color: #fff; }

.card-identity { flex: 1; min-width: 0; }

.card-name {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-name .verified-icon { color: var(--accent-cyan); font-size: 0.78rem; }

.card-handle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ctag {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(99,102,241,0.12);
  color: var(--accent-indigo);
  border: 1px solid rgba(99,102,241,0.2);
}

.ctag.nano { background: rgba(16,185,129,0.1); color: var(--accent-emerald); border-color: rgba(16,185,129,0.2); }
.ctag.micro { background: rgba(6,182,212,0.1); color: var(--accent-cyan); border-color: rgba(6,182,212,0.2); }
.ctag.mid { background: rgba(139,92,246,0.1); color: var(--accent-violet); border-color: rgba(139,92,246,0.2); }
.ctag.macro { background: rgba(245,158,11,0.1); color: var(--accent-gold); border-color: rgba(245,158,11,0.2); }
.ctag.mega { background: rgba(244,63,94,0.1); color: var(--accent-rose); border-color: rgba(244,63,94,0.2); }

.card-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.metric-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.4rem;
  text-align: center;
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.metric-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-footer-row {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-card {
  flex: 1;
  padding: 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid;
}

.btn-card-channel {
  background: rgba(255,0,0,0.08);
  border-color: rgba(255,0,0,0.2);
  color: #FF6B6B;
  text-decoration: none;
}

.btn-card-channel:hover { background: rgba(255,0,0,0.15); text-decoration: none; }

.btn-card-pitch {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.25);
  color: var(--accent-indigo);
}

.btn-card-pitch:hover { background: rgba(99,102,241,0.18); }

.btn-card-save {
  background: transparent;
  border-color: var(--border-glass);
  color: var(--text-muted);
  width: 38px;
  flex: none;
}

.btn-card-save:hover { color: var(--accent-pink); border-color: var(--accent-pink); }
.btn-card-save.saved { color: var(--accent-pink); border-color: var(--accent-pink); background: rgba(236,72,153,0.1); }

/* ===== PLATFORM INFO PANELS ===== */
.platform-info-panel {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.pip-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
}

.pip-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.pip-icon i { color: var(--accent-ig); }

.pip-inner h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.pip-inner > p { color: var(--text-muted); font-size: 0.9rem; max-width: 500px; margin: 0 auto 2rem; line-height: 1.6; }

.pip-options { display: flex; gap: 1.25rem; flex-wrap: wrap; text-align: left; }

.pip-opt {
  flex: 1;
  min-width: 250px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.pip-opt > i { font-size: 1.25rem; margin-top: 0.15rem; flex-shrink: 0; }
.pip-opt strong { font-size: 0.9rem; display: block; margin-bottom: 0.35rem; }
.pip-opt p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

.btn-pip {
  padding: 0.45rem 0.9rem;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-indigo);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-pip:hover { background: rgba(99,102,241,0.2); }

/* ===== LOAD MORE ===== */
.btn-load-more {
  padding: 0.75rem 2rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-md);
  color: var(--accent-indigo);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-load-more:hover { background: rgba(99,102,241,0.18); transform: translateY(-2px); }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active { display: flex; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }

.modal-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 32px; height: 32px;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }

.template-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.ttab {
  flex: 1;
  padding: 0.4rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.ttab.active { background: var(--bg-card2); color: var(--text-primary); }

.modal-fields { display: flex; flex-direction: column; gap: 0.75rem; }

.mf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.mf-group { display: flex; flex-direction: column; gap: 0.35rem; }
.mf-group label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mf-group input { background: var(--bg-input); border: 1.5px solid var(--border-glass); border-radius: var(--radius-sm); padding: 0.55rem 0.75rem; color: var(--text-primary); font-size: 0.88rem; font-family: 'Inter', sans-serif; outline: none; }
.mf-group input:focus { border-color: var(--accent-indigo); }

.pitch-ta {
  width: 100%;
  height: 220px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  resize: vertical;
  line-height: 1.6;
}

.pitch-ta:focus { border-color: var(--accent-indigo); }

.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }

.btn-modal-action {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

.btn-modal-action:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }
.btn-modal-action.primary { background: var(--grad-primary); border: none; color: #fff; }
.btn-modal-action.primary:hover { opacity: 0.9; }

/* ===== DRAWER ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: flex-end;
}

.drawer-overlay.active { display: flex; }

.drawer-box {
  width: 380px;
  max-width: 95vw;
  background: var(--bg-card);
  border-left: 1px solid var(--border-glass);
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  overflow-y: auto;
}

.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }

.drawer-summary {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ds-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ds-row strong { font-weight: 700; color: var(--text-primary); }

.saved-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.saved-item img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.saved-item-info { flex: 1; min-width: 0; }
.saved-item-name { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-item-sub { font-size: 0.75rem; color: var(--text-muted); }

.btn-remove-saved {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.btn-remove-saved:hover { color: var(--accent-rose); }

/* ===== TOAST ===== */
#toastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-card2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-card);
  animation: slideInToast 0.3s ease;
  pointer-events: all;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .topnav { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.75rem; }
  .nav-center { order: 3; width: 100%; }
  .search-hero { padding: 1.25rem 1rem; }
  .search-form-row { flex-direction: column; }
  .results-section { padding: 1.25rem 1rem 3rem; }
  .results-grid { grid-template-columns: 1fr; }
  .mf-row { grid-template-columns: 1fr; }
}
