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

/* ── Variables ───────────────────────────────────────── */
:root {
  --bg:       #ffffff;
  --s1:       #f9f9f7;
  --s2:       #f2f2ef;
  --b1:       rgba(0,0,0,0.07);
  --b2:       rgba(0,0,0,0.13);
  --tx:       #111111;
  --t2:       #666666;
  --t3:       #aaaaaa;
  --accent:   #e00000;
  --accent-h: #c00000;
  --gold:     #a07218;
  --r:        8px;
  --r-lg:     12px;
}

/* ── Base ─────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--tx);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── Header ───────────────────────────────────────────── */
.hdr {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--b1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg);
}

.logo-eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 4px;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--tx);
}

.logo a { color: var(--tx); }
.logo-accent { color: var(--gold); }
.logo-sub { font-size: 11px; color: var(--t3); margin-top: 4px; }

.hdr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat { text-align: right; }
.stat-n { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; line-height: 1; color: var(--tx); }
.stat-n.red { color: var(--accent); }
.stat-l { font-size: 10px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.stat-div { width: 1px; height: 22px; background: var(--b2); }

.buy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--r);
  transition: background 0.15s;
  white-space: nowrap;
}
.buy-btn:hover { background: var(--accent-h); }

/* ── Progress ─────────────────────────────────────────── */
.prog-wrap {
  padding: 8px 28px;
  border-bottom: 1px solid var(--b1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.prog-track { flex: 1; height: 3px; background: var(--s2); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.5s ease; }
.prog-label { font-size: 11px; color: var(--t3); white-space: nowrap; }
.prog-label strong { color: var(--t2); font-weight: 600; }

/* ── Success banner ───────────────────────────────────── */
.success-banner {
  display: none;
  background: rgba(34,197,94,0.08);
  border-bottom: 1px solid rgba(34,197,94,0.2);
  padding: 12px 28px;
  font-size: 13px;
  color: #15803d;
  gap: 10px;
  align-items: center;
}
.success-banner.show { display: flex; }

/* ── Grid ─────────────────────────────────────────────── */
.grid-outer { padding: 14px 28px 28px; }

#grid, #niche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 3px;
}

.sf {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  background: var(--s2);
  border-radius: 2px;
  transition: opacity 0.2s;
  border: 1px solid var(--b1);
}
.sf img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.sf:hover img { transform: scale(1.07); }

.sov {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.72);
  opacity: 0; transition: opacity 0.2s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 5px;
}
.sf:hover .sov { opacity: 1; }
.st { font-size: 8px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc { font-size: 7px; color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

.sp {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-55%) scale(0.75);
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  background: rgba(220,0,0,0.9);
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.sf:hover .sp { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.se {
  aspect-ratio: 16/9;
  background: var(--s1);
  border: 0.5px dashed var(--b2);
  border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  gap: 2px;
}
.se:hover { border-color: var(--accent); background: rgba(220,0,0,0.04); }
.ep { font-size: 13px; color: var(--t3); transition: color 0.2s; }
.epr { font-size: 7px; color: var(--t3); letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.se:hover .ep, .se:hover .epr { color: var(--accent); }

/* ── Footer ───────────────────────────────────────────── */
.ftr {
  padding: 14px 28px 20px;
  border-top: 1px solid var(--b1);
  background: var(--s1);
}
.ftr-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ftr-text { font-size: 11px; color: var(--t3); }
.ftr-text a { color: var(--accent); }
.niche-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.niche-link { font-size: 11px; color: var(--t3); padding: 3px 10px; border: 0.5px solid var(--b1); border-radius: 20px; cursor: pointer; transition: all 0.15s; }
.niche-link:hover { color: var(--tx); border-color: var(--b2); }

/* ── Modal ────────────────────────────────────────────── */
#mwrap {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
#mwrap.open { display: flex; }

#modal {
  background: var(--bg);
  border: 1px solid var(--b2);
  border-radius: var(--r-lg);
  width: 420px; max-width: 100%; max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.mhd {
  padding: 16px 18px;
  border-bottom: 1px solid var(--b1);
  display: flex; align-items: flex-start; justify-content: space-between;
  background: var(--s1);
}
.mt { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--tx); }
.ms { font-size: 11px; color: var(--t3); margin-top: 2px; }
.mx { background: none; border: none; color: var(--t3); font-size: 22px; cursor: pointer; line-height: 1; padding: 0; transition: color 0.15s; font-family: inherit; }
.mx:hover { color: var(--tx); }

#mbd { padding: 18px; }

.fl { font-size: 11px; color: var(--t2); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 7px; }

.ui {
  width: 100%;
  background: var(--bg); border: 1px solid var(--b2);
  color: var(--tx); padding: 11px 13px;
  font-family: inherit; font-size: 14px;
  outline: none; border-radius: var(--r);
  transition: border-color 0.15s;
}
.ui:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(220,0,0,0.08); }
.ui::placeholder { color: var(--t3); }
.ui:disabled { opacity: 0.4; }

.ht { font-size: 11px; color: var(--t3); margin-top: 6px; }
.er { font-size: 11px; color: var(--accent); margin-top: 6px; }

.pth { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: var(--r); margin-top: 14px; background: var(--s2); }
.pm { background: var(--s1); border: 1px solid var(--b1); border-top: none; border-radius: 0 0 var(--r) var(--r); padding: 10px 12px; margin-bottom: 14px; }
.pmt { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; color: var(--tx); }
.pmc { font-size: 11px; color: var(--t2); }

.np-btn {
  background: none; border: 1px solid var(--b2); color: var(--t2);
  padding: 6px 8px; font-size: 11px; cursor: pointer;
  border-radius: var(--r); transition: all 0.15s;
  font-family: inherit; text-align: center;
}
.np-btn:hover { border-color: var(--t2); color: var(--tx); }

/* ── Plan selector ────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.plan-btn {
  background: var(--bg);
  border: 1.5px solid var(--b2);
  border-radius: var(--r);
  padding: 11px 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
  position: relative;
}

.plan-btn:hover { border-color: var(--t2); }

.plan-btn.active {
  border-color: var(--accent);
  background: rgba(220,0,0,0.03);
}

.plan-btn-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tx);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-btn-price {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--tx);
  line-height: 1;
}

.plan-btn-price span {
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
}

.plan-btn-note {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.save-badge {
  background: rgba(34,197,94,0.12);
  color: #15803d;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ── Waitlist ─────────────────────────────────────────── */
.waitlist-box {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-top: 10px;
}

.waitlist-label {
  font-size: 11px;
  color: var(--t2);
  margin-bottom: 6px;
}

.waitlist-row {
  display: flex;
  gap: 6px;
}

.waitlist-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--b2);
  color: var(--tx);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  border-radius: var(--r);
  transition: border-color 0.15s;
}
.waitlist-input:focus { border-color: var(--accent); }
.waitlist-input::placeholder { color: var(--t3); }

.waitlist-btn {
  background: var(--tx);
  color: var(--bg);
  border: none;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--r);
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.waitlist-btn:hover { opacity: 0.8; }

/* ── Divider / price row / action btn ─────────────────── */
.dv { height: 1px; background: var(--b1); margin: 16px 0; }
.pr { display: flex; align-items: center; justify-content: space-between; }
.pb2 { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; line-height: 1; color: var(--tx); }
.pi { font-size: 11px; color: var(--t3); text-align: right; line-height: 1.8; }

.ab {
  width: 100%; background: var(--accent); color: #fff; border: none;
  padding: 13px; font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer;
  border-radius: var(--r); margin-top: 16px;
  transition: background 0.15s;
}
.ab:hover { background: var(--accent-h); }
.ab:disabled { background: var(--s2); color: var(--t3); cursor: not-allowed; }

/* ── Loading / success ────────────────────────────────── */
.loading-msg { text-align: center; padding: 28px 0; color: var(--t3); font-size: 13px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.success-view { text-align: center; padding: 36px 20px; }
.success-circle { width: 56px; height: 56px; border-radius: 50%; background: rgba(34,197,94,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; }
.sh { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--tx); }
.sp2 { font-size: 13px; color: var(--t2); line-height: 1.7; margin-bottom: 24px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.25s ease; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
  .hdr { padding: 14px 16px; }
  .hdr-right { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .grid-outer { padding: 10px 12px 20px; }
  .prog-wrap { padding: 8px 16px; }
  .ftr { padding: 12px 16px; }
  .logo { font-size: 18px; }
  #grid, #niche-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 2px; }
  .plan-grid { grid-template-columns: 1fr; }
}

/* ── Top Thumbs ───────────────────────────────────────── */
#tt-section {
  border-bottom: 1px solid var(--b1);
  padding: 14px 28px;
  background: var(--bg);
}

.tt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.tt-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tt-fire { font-size: 20px; line-height: 1; }

.tt-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--tx);
  line-height: 1;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.tt-sub {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.05em;
}

.tt-refresh {
  font-size: 11px;
  color: var(--t3);
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--b2);
  border-radius: 20px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.tt-refresh:hover { color: var(--tx); border-color: var(--t2); }

.tt-updated {
  font-size: 10px;
  color: var(--t3);
  align-self: center;
}

#tt-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  align-items: flex-start;
}
#tt-row::-webkit-scrollbar { display: none; }

.tt-card {
  flex-shrink: 0;
  width: 158px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}
.tt-card:hover { transform: translateY(-2px); }

.tt-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--s2);
  border: 1px solid var(--b1);
}

.tt-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.tt-card:hover img { transform: scale(1.06); }

.tt-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.tt-info { padding: 5px 2px 0; }

.tt-card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 1px;
}

.tt-card-channel { font-size: 10px; color: var(--t3); }

.tt-clicks {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.tt-empty, .tt-loading {
  font-size: 12px;
  color: var(--t3);
  padding: 20px 0;
  width: 100%;
}
