/* =============================================================
   CamStats — Diseño principal
   Paleta oscura elegante, temática cam, sin gradientes chillones
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Paleta base */
  --bg:          #080810;
  --surface:     #0c0c18;
  --card:        #111124;
  --card-hover:  #161630;
  --border:      #1c1c38;
  --border-soft: #12122a;

  /* Acento principal — violeta profundo */
  --accent:      #8b5cf6;
  --accent-dim:  #5b21b6;
  --accent-glow: rgba(139,92,246,0.15);

  /* Plataformas */
  --cb:    #f59e0b;
  --sc:    #ec4899;
  --bc:    #3b82f6;
  --c4:    #22c55e;

  /* Estado */
  --live:  #22c55e;
  --red:   #ef4444;
  --amber: #f59e0b;

  /* Texto */
  --text:      #f1f0ff;
  --text-dim:  #a8a4c8;
  --muted:     #6b6890;
  --faint:     #3d3a5c;

  /* Tipografía */
  --font:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', monospace;

  /* Bordes */
  --radius:   8px;
  --radius-lg: 14px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #a78bfa; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Tipografía ─────────────────────────────────────────────── */
.mono { font-family: var(--mono); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-live { color: var(--live); }
.text-amber { color: var(--amber); }

/* ── Layout ─────────────────────────────────────────────────── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.grid-main { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 16px; }

/* ── Navbar ─────────────────────────────────────────────────── */
.nav {
  background: rgba(8,8,16,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex; align-items: center;
  height: 56px; gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.3px;
  color: var(--text);
}
.logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
}
.logo-dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 6px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  transition: all 0.15s; border: none; background: none; cursor: pointer;
}
.nav-link:hover { color: var(--text); background: var(--border); }
.nav-link.active { color: var(--accent); background: var(--accent-glow); }

.nav-platforms { display: flex; align-items: center; gap: 6px; }
.plat-btn {
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all 0.15s;
  background: transparent; color: var(--muted);
}
.plat-btn:hover { border-color: currentColor; }
.plat-btn.active { color: #fff; border-color: transparent; }
.plat-btn.cb { --c: var(--cb); }
.plat-btn.sc { --c: var(--sc); }
.plat-btn.bc { --c: var(--bc); }
.plat-btn.c4 { --c: var(--c4); }
.plat-btn.active { background: var(--c); }

.nav-spacer { flex: 1; }

/* Buscador nav */
.nav-search {
  position: relative; width: 200px;
}
.nav-search input {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 12px 7px 32px;
  color: var(--text); font-size: 13px; outline: none;
  transition: border-color 0.15s;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-search svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--muted);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(139,92,246,0.25);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.8px; line-height: 1.2;
  margin-bottom: 12px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 15px; color: var(--text-dim);
  max-width: 520px; line-height: 1.7;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.card:hover { border-color: #2a2a50; }
.card-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 18px; }

/* KPI card */
.kpi { padding: 18px; }
.kpi-val {
  font-size: 26px; font-weight: 700;
  font-family: var(--mono); letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-sub { font-size: 11px; color: var(--faint); margin-top: 2px; }

/* ── Platform badges ────────────────────────────────────────── */
.plat-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.3px;
  padding: 2px 7px; border-radius: 4px;
}
.plat-badge.chaturbate { background: rgba(245,158,11,0.12); color: var(--cb); }
.plat-badge.stripchat  { background: rgba(236,72,153,0.12); color: var(--sc); }
.plat-badge.bongacams  { background: rgba(59,130,246,0.12); color: var(--bc); }
.plat-badge.cam4       { background: rgba(34,197,94,0.12);  color: var(--c4); }

/* ── Live indicator ─────────────────────────────────────────── */
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); flex-shrink: 0;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100%{ opacity:1; transform:scale(1); }
  50%{ opacity:.4; transform:scale(.75); }
}
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; color: var(--live);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 2px 7px; border-radius: 4px;
}

/* ── Table ──────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 500;
  color: var(--muted); padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.tbl tbody tr { transition: background 0.12s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--card-hover); }
.tbl .num { text-align: right; font-family: var(--mono); }
.rank { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.rank.top { color: var(--accent); font-weight: 700; }

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  color: rgba(255,255,255,0.8);
}

/* ── Tags ───────────────────────────────────────────────────── */
.tag {
  display: inline-block; font-size: 10px;
  background: var(--border); color: var(--text-dim);
  border-radius: 4px; padding: 2px 7px;
  transition: all 0.12s; cursor: pointer;
}
.tag:hover { background: var(--accent-glow); color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Filters ────────────────────────────────────────────────── */
.filters {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-btn {
  padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; transition: all 0.12s;
}
.filter-btn:hover { color: var(--text); border-color: var(--text-dim); }
.filter-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.filter-sep { width: 1px; height: 20px; background: var(--border); }

/* ── Heatmap ────────────────────────────────────────────────── */
.heatmap { display: grid; grid-template-columns: 32px repeat(24,1fr); gap: 3px; }
.hm-label { font-size: 9px; color: var(--muted); display: flex; align-items: center; }
.hm-cell {
  height: 16px; border-radius: 2px;
  background: var(--border-soft);
  transition: opacity 0.15s;
  cursor: default;
}
.hm-cell:hover { opacity: 0.8; }
.hm-hour { font-size: 9px; color: var(--faint); text-align: center; }

/* ── Gráfica de barras simple ────────────────────────────────── */
.barchart { display: flex; align-items: flex-end; gap: 3px; height: 80px; }
.barchart-bar {
  flex: 1; border-radius: 2px 2px 0 0;
  background: var(--border);
  transition: height 0.6s ease;
  cursor: default;
}
.barchart-bar.hi { background: var(--accent); }

/* ── Model card (grid de modelos) ───────────────────────────── */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.model-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s; cursor: pointer;
}
.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,92,246,0.1);
}
.model-card-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.model-card-img .avatar { width: 56px; height: 56px; font-size: 22px; }
.model-card-body { padding: 12px; }
.model-card-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.model-card-meta { display: flex; align-items: center; justify-content: space-between; }
.viewers-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--live); font-family: var(--mono);
}

/* ── Perfil de modelo ───────────────────────────────────────── */
.profile-header {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 24px;
}
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; font-size: 28px; flex-shrink: 0; }
.profile-info h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.profile-stats { display: flex; gap: 20px; margin-top: 10px; }
.profile-stat-val { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.profile-stat-label { font-size: 11px; color: var(--muted); }

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #7c3aed; }
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-watch {
  font-size: 11px; font-weight: 600; color: var(--accent);
  padding: 3px 10px; border: 1px solid rgba(139,92,246,0.3);
  border-radius: 5px; background: var(--accent-glow);
  transition: all 0.12s;
}
.btn-watch:hover { background: var(--accent); color: #fff; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px; padding: 32px 0;
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; font-size: 12px; color: var(--muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text-dim); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--muted); border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text-dim); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Stats row ──────────────────────────────────────────────── */
.stat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.stat-row:last-child { border-bottom: none; }
.stat-row-rank { font-family: var(--mono); font-size: 12px; color: var(--faint); width: 24px; text-align: right; }
.stat-row-name { flex: 1; font-size: 13px; }
.stat-row-val { font-family: var(--mono); font-size: 13px; font-weight: 600; }

/* ── Inputs ─────────────────────────────────────────────────── */
input[type=text], input[type=search], select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px;
  color: var(--text); font-size: 13px; outline: none;
  font-family: var(--font);
}
input[type=text]:focus, input[type=search]:focus { border-color: var(--accent); }
select { cursor: pointer; }

/* ── Utilidades ─────────────────────────────────────────────── */
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.overflow-x { overflow-x: auto; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-platforms { display: none; }
  .nav-search { display: none; }
  .model-grid { grid-template-columns: repeat(2,1fr); }
}
