/* Reel Hub — Dark sidebar dashboard */

:root {
  --bg: #0a0a0f;
  --sidebar-bg: #0f0f15;
  --surface: rgba(22, 22, 30, 0.7);
  --surface-solid: #16161e;
  --surface-2: rgba(30, 30, 40, 0.6);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --text: #eceaf0;
  --muted: #8f8d98;
  --accent: #e1306c;
  --accent-soft: rgba(225, 48, 108, 0.12);
  --accent-glow: rgba(225, 48, 108, 0.3);
  --ok: #3ddc85;
  --warn: #f5b840;
  --bad: #ff5c5c;
  --radius: 12px;
  --radius-lg: 16px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --sidebar-width: 260px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0d0d15 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

h1 { 
  font-family: var(--font-display); 
  font-size: 1.8rem; 
  margin: 0; 
  letter-spacing: -0.02em;
  font-weight: 700;
}
h2 { 
  font-family: var(--font-display); 
  font-size: 1rem; 
  margin: 0 0 0.8rem; 
  color: var(--text);
  font-weight: 600;
}

/* ── Wordmark ── */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}
.wordmark span { 
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b9d 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wordmark.small { font-size: 1.3rem; }

/* ── Auth ── */
.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(-45deg, #0d0d10, #1a1a2e, #16213e, #0f0f23, #1a0a1a);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}
.auth::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(225, 48, 108, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(120, 50, 180, 0.12) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-5deg); }
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(22, 22, 27, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  animation: cardAppear 0.6s ease-out;
}
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-sub { color: var(--muted); margin: 0.4rem 0 1.8rem; font-size: 0.95rem; }
.auth-switch { margin: 1.4rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* ── Forms ── */
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
input, select {
  width: 100%;
  background: rgba(30, 30, 40, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 0.75rem 1rem;
  font: inherit;
  transition: all 0.2s ease;
}
input:hover, select:hover {
  border-color: var(--line-strong);
  background: rgba(35, 35, 45, 0.6);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-error { color: var(--bad); font-size: 0.88rem; margin: 0.4rem 0 0.8rem; }

.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover { background: rgba(50, 50, 60, 0.6); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn.primary { 
  background: linear-gradient(135deg, var(--accent) 0%, #c92a5f 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn.primary:hover { 
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn.primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.full { width: 100%; }
.btn-icon {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.btn-icon:hover { color: var(--text); background: var(--surface-2); }
.linklike {
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; cursor: pointer;
}
.linklike:hover { text-decoration: underline; }

/* ── App Layout ── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-header .sidebar-toggle { display: none; }
/* ── Balance Panel ── */
.balance-panel {
  margin: 0 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(100, 120, 200, 0.1) 0%, rgba(80, 100, 180, 0.05) 100%);
  border: 1px solid rgba(100, 120, 200, 0.2);
  border-radius: 12px;
}
.balance-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c8dff;
  margin-bottom: 0.5rem;
}
.balance-icon { font-size: 1rem; }
.balance-refresh {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.balance-refresh:hover { color: var(--ok); background: rgba(61, 220, 133, 0.1); }
.balance-refresh.spinning { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.balance-list { display: flex; flex-direction: column; gap: 0.4rem; }
.balance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.balance-account { color: var(--muted); }
.balance-coins {
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}
.balance-coins.low { color: var(--warn); }
.balance-coins.critical { color: var(--bad); }
.balance-tasks {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.5rem;
}
.balance-loading, .balance-error {
  font-size: 0.8rem;
  color: var(--muted);
}
.balance-error { color: var(--bad); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}
.nav-section {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}
.nav-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #c92a5f 100%);
  box-shadow: 0 4px 15px var(--accent-glow);
}
.nav-icon { font-size: 1.1rem; }
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.user-details { min-width: 0; }
.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: capitalize;
}

/* ── Mobile Header ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(15, 15, 21, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.5rem;
}
.header-spacer { width: 40px; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 95;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 2.5rem;
  min-height: 100vh;
}
.page { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-header {
  margin-bottom: 2rem;
}
.page-desc {
  color: var(--muted);
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

/* ── Cards & Sections ── */
.section-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.filters-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 130px; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Pickers ── */
.pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.picker {
  display: flex; 
  flex-direction: column; 
  align-items: center;
  gap: 0.5rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--surface);
  text-align: center;
}
.picker:hover { 
  border-color: var(--accent); 
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.picker.filled { 
  border-style: solid; 
  border-color: var(--accent);
  background: var(--accent-soft);
}
.picker-icon { font-size: 2rem; margin-bottom: 0.25rem; }
.picker-kicker { 
  font-size: 0.75rem; 
  text-transform: uppercase; 
  letter-spacing: 0.06em; 
  color: var(--muted);
  font-weight: 500;
}
.picker-hint { font-weight: 500; word-break: break-all; font-size: 0.9rem; }

/* ── Queue & Cards ── */
.queue, .gallery { display: grid; gap: 0.75rem; }
.gallery { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.empty { color: var(--muted); font-size: 0.92rem; }

.job-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}
.job-card:hover {
  background: rgba(40, 40, 55, 0.6);
  transform: translateX(4px);
}
.job-meta { flex: 1; min-width: 180px; }
.job-title { font-weight: 600; font-size: 0.95rem; }
.job-sub { color: var(--muted); font-size: 0.82rem; }
.job-actions { display: flex; align-items: center; gap: 0.6rem; }

.status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.queued::before { background: var(--muted); }
.status.running::before { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.status.success::before { background: var(--ok); }
.status.failed::before { background: var(--bad); }
@keyframes pulse { 50% { opacity: 0.3; } }

.retry-btn {
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
.retry-btn:hover { background: #e04545; }

/* ── Gallery cards ── */
.reel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.3s ease;
}
.reel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}
.reel-card video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.reel-card .reel-info { padding: 0.75rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.reel-card .reel-date { color: var(--muted); font-size: 0.8rem; }
.dl { 
  color: var(--accent); 
  font-weight: 600; 
  font-size: 0.85rem; 
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.dl:hover { text-decoration: underline; }

/* ── Table ── */
.table-wrap { 
  overflow-x: auto; 
  border-radius: var(--radius);
}
.jobs-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 620px; }
.jobs-table th, .jobs-table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.jobs-table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; background: rgba(0, 0, 0, 0.2); }
.jobs-table tr:last-child td { border-bottom: none; }
.jobs-table tr:hover td { background: var(--accent-soft); }

/* ── Leaderboard ── */
.leaderboard-grid { display: grid; gap: 0.6rem; }
.lb-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}
.lb-card:hover { 
  border-color: var(--accent); 
  transform: translateX(4px);
}
.lb-top-1 { 
  border-color: #ffd700; 
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
}
.lb-top-2 { border-color: #c0c0c0; background: rgba(192, 192, 192, 0.05); }
.lb-top-3 { border-color: #cd7f32; background: rgba(205, 127, 50, 0.05); }
.lb-rank { font-size: 1.4rem; min-width: 2.5rem; text-align: center; }
.lb-info { min-width: 0; }
.lb-name { font-weight: 600; font-size: 0.95rem; }
.lb-email { color: var(--muted); font-size: 0.8rem; }
.lb-stats { text-align: center; }
.lb-stat-main {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.lb-stat-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }
.lb-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; font-size: 0.78rem; color: var(--muted); }
.lb-rate { color: var(--ok); font-weight: 500; }

/* ── Settings ── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.settings-list {
  margin-top: 1rem;
}
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.settings-item:last-child { border-bottom: none; }
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.badge-ok { background: rgba(61, 220, 133, 0.15); color: var(--ok); }
.badge-warn { background: rgba(245, 184, 64, 0.15); color: var(--warn); }

/* ── Mobile ── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-header .sidebar-toggle { display: block; }
  .mobile-header { display: flex; }
  .sidebar-overlay.open { display: block; }
  .main-content {
    margin-left: 0;
    padding: 80px 1rem 2rem;
  }
  .pickers { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-card {
    grid-template-columns: auto 1fr auto;
  }
  .lb-meta {
    grid-column: 2 / -1;
    flex-direction: row;
    gap: 1rem;
    justify-content: flex-start;
  }
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ── Reels Scanner ── */
.scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.scanner-header h2 { margin: 0; }
.source-note {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}
.chip button {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
}
.chip button:hover { color: var(--accent); }

.add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.add-row input { flex: 1; }

.scanner-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.scanner-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.scanner-filters input,
.scanner-filters select {
  font-size: 0.9rem;
}

.scan-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.progress {
  flex: 1;
  min-width: 200px;
  display: none;
}
.progress.on { display: block; }
.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ff6b9d);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.scanner-error {
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 90, 90, 0.3);
  color: #ff5a5a;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.scanner-error.hidden { display: none; }

.scanner-summary {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.scanner-summary b { color: var(--text); }

.scanner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.reel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
}
.reel-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(225, 48, 108, 0.15);
}

.reel-thumb {
  position: relative;
  aspect-ratio: 9/16;
  background: var(--bg);
  overflow: hidden;
}
.reel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel-rank {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.reel-body {
  padding: 1rem;
}
.reel-handle {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}
.reel-handle:hover { text-decoration: underline; }

.reel-metrics {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.reel-views { color: var(--accent); font-weight: 600; }

.reel-caption {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.reel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.reel-age { color: var(--muted); }
.reel-foot a { font-weight: 500; }
.reel-foot a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .scanner-filters {
    grid-template-columns: 1fr 1fr;
  }
}

.scanner-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.profile-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}
.profile-count.muted {
  color: var(--muted);
  font-weight: 400;
}

.field-hint {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
