/* ---------- Theme tokens ---------------------------------------------------*/
:root {
  --bg: hsl(220 20% 7%);
  --fg: hsl(210 20% 92%);
  --card: hsl(220 18% 11%);
  --card-2: hsl(220 18% 13%);
  --border: hsl(220 14% 18%);
  --muted: hsl(215 12% 50%);
  --primary: hsl(174 72% 50%);
  --primary-2: hsl(190 80% 45%);
  --primary-fg: hsl(220 20% 7%);
  --danger: hsl(0 72% 55%);
  --radius: 0.875rem;
  --gradient: linear-gradient(135deg, var(--primary), var(--primary-2));
  --shadow-glow: 0 0 50px hsl(174 72% 50% / 0.20);
  --container: 1300px;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 700px at 80% -10%, hsl(174 72% 35% / 0.10), transparent 60%),
    radial-gradient(1000px 600px at -10% 40%, hsl(220 70% 25% / 0.18), transparent 60%),
    radial-gradient(900px 700px at 110% 110%, hsl(190 80% 35% / 0.10), transparent 65%),
    linear-gradient(180deg, hsl(220 30% 5%) 0%, hsl(220 28% 7%) 40%, hsl(220 32% 6%) 100%);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 150ms; }
a:hover { color: var(--primary); }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Backdrop orbs (floating light depth) ---------------------------*/
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.35; will-change: transform; }
.orb-1 { width: 600px; height: 600px; top: -200px; right: -150px; background: hsl(174 72% 50% / 0.4);  animation: orbFloatA 18s ease-in-out infinite; }
.orb-2 { width: 500px; height: 500px; bottom: -150px; left: -100px; background: hsl(190 80% 45% / 0.35); animation: orbFloatB 22s ease-in-out infinite; }
.orb-3 { width: 360px; height: 360px; top: 35%; left: 8%;  background: hsl(174 72% 45% / 0.18); opacity: 0.45; animation: orbFloatC 26s ease-in-out infinite; }
.orb-4 { width: 420px; height: 420px; top: 55%; right: 6%; background: hsl(220 70% 40% / 0.20); opacity: 0.40; animation: orbFloatD 30s ease-in-out infinite; }
@keyframes orbFloatA { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(-30px,40px,0); } }
@keyframes orbFloatB { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(40px,-30px,0); } }
@keyframes orbFloatC { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(50px,30px,0); } }
@keyframes orbFloatD { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(-40px,-50px,0); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none !important; } }

/* ---------- Header ---------------------------------------------------------*/
.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); background: hsl(220 20% 7% / 0.7); border-bottom: 1px solid hsl(220 14% 18% / 0.6); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
.brand img { height: 38px; width: auto; display: block; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--gradient); color: var(--primary-fg); box-shadow: 0 0 18px hsl(174 72% 50% / .35); }
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { white-space: nowrap; }

/* Top page-load progress bar */
#page-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
#page-loader.is-on { opacity: 1; }
#page-loader::before { content: ""; display: block; height: 100%; width: 0%; background: var(--gradient); box-shadow: 0 0 12px hsl(174 72% 50% / .6); transition: width .25s ease; }
#page-loader.is-on::before { width: 85%; transition: width 8s cubic-bezier(.05,.85,.3,1); }
#page-loader.is-done::before { width: 100%; transition: width .25s ease; }

/* Initial page fade-in */
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.site-main { animation: pageFadeIn .4s ease both; }
@media (prefers-reduced-motion: reduce) {
  .site-main { animation: none; }
  #page-loader, #page-loader::before { transition: none !important; }
}
.nav-desktop { display: none; align-items: center; gap: 0.25rem; }
.nav-desktop a, .dropdown-trigger { padding: 0.5rem 0.875rem; border-radius: 0.625rem; color: hsl(210 20% 92% / 0.7); font-size: 15px; transition: background 150ms, color 150ms; background: transparent; border: 0; display: inline-flex; align-items: center; gap: 0.25rem; }
.nav-desktop a:hover, .dropdown-trigger:hover { color: var(--fg); background: hsl(220 16% 16% / 0.6); }
.theme-toggle { padding: 0.625rem; border-radius: 0.75rem; background: hsl(220 16% 16%); color: var(--fg); border: 0; }
.theme-toggle:hover { background: hsl(220 16% 20%); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 0.25rem); min-width: 192px; background: var(--card); border: 1px solid var(--border); border-radius: 0.875rem; padding: 0.25rem; box-shadow: 0 10px 30px hsla(0,0%,0%,0.4); display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 0.625rem 0.875rem; border-radius: 0.5rem; font-size: 15px; color: hsl(210 20% 92% / 0.85); }
.dropdown-menu a:hover { background: hsl(220 16% 16% / 0.7); color: var(--fg); }

.header-actions { display: inline-flex; align-items: center; gap: 0.5rem; }
.nav-mobile-toggle { display: inline-flex; flex-direction: column; gap: 4px; padding: 0.75rem; border-radius: 0.75rem; background: hsl(220 16% 16%); border: 0; }
.nav-mobile-toggle .bar { display: block; width: 18px; height: 2px; background: var(--fg); border-radius: 2px; }
.nav-mobile { display: block; border-top: 1px solid hsl(220 14% 18% / 0.6); padding: 0.75rem 1rem; background: hsl(220 18% 11% / 0.95); }
.nav-mobile[hidden] { display: none; }
.nav-mobile a { display: block; padding: 0.75rem 0.875rem; border-radius: 0.5rem; color: hsl(210 20% 92% / 0.85); font-size: 15px; }
.nav-mobile a:hover { background: hsl(220 16% 16% / 0.6); color: var(--fg); }
.nav-section { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid hsl(220 14% 18% / 0.6); }
.nav-section-title { margin: 0; padding: 0.5rem 0.875rem; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 768px) {
  .nav-desktop { display: inline-flex; }
  .nav-mobile-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ---------- Layout helpers -------------------------------------------------*/
.site-main { padding: 2rem 0 4rem; min-height: 60vh; }
.section { padding: 3rem 0; }
.section-tight { padding: 2rem 0; }
.heading-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.875rem; border-radius: 999px; background: hsl(174 72% 50% / 0.12); color: var(--primary); font-size: 13px; font-weight: 500; margin-bottom: 1rem; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.75rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { color: hsl(210 20% 92% / 0.78); margin: 0 0 1rem; }
.lead { font-size: 1.125rem; color: hsl(210 20% 92% / 0.85); }
.text-center { text-align: center; }
.text-gradient { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-muted { color: var(--muted); }

/* ---------- Cards / surfaces -----------------------------------------------*/
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card-glow { box-shadow: var(--shadow-glow); }
.card-tight { padding: 1rem 1.25rem; }
.card-row { display: flex; align-items: center; gap: 1rem; }
.glass { background: hsl(220 18% 11% / 0.55); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Forms ----------------------------------------------------------*/
.form-grid { display: grid; gap: 0.875rem; }
.form-row { display: grid; gap: 0.875rem; }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }
.input, .textarea, .select { width: 100%; padding: 0.875rem 1rem; border-radius: 0.75rem; background: hsl(220 16% 14%); border: 1px solid var(--border); color: var(--fg); font: inherit; transition: border-color 150ms, box-shadow 150ms; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px hsl(174 72% 50% / 0.18); }
.textarea { min-height: 110px; resize: vertical; }
.label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 0.375rem; color: hsl(210 20% 92% / 0.85); }
.field-help { font-size: 12px; color: var(--muted); margin-top: 0.375rem; }

/* ---------- Buttons --------------------------------------------------------*/
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.5rem; border-radius: 0.75rem; font-weight: 600; font-size: 15px; border: 0; transition: transform 150ms, box-shadow 150ms, background 150ms, color 150ms; }
.btn-primary { background: var(--gradient); color: var(--primary-fg); box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 60px hsl(174 72% 50% / 0.35); color: var(--primary-fg); }
.btn-primary[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost { background: hsl(220 16% 16%); color: var(--fg); }
.btn-ghost:hover { background: hsl(220 16% 20%); color: var(--fg); }
.btn-outline { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn-outline:hover { background: hsl(220 16% 16% / 0.6); color: var(--fg); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 0.875rem; font-size: 13px; }

/* ---------- Hero / hero blob ----------------------------------------------*/
.hero { padding: 3rem 0 1.5rem; text-align: center; }
.hero h1 { margin-bottom: 1rem; }
.hero p { max-width: 640px; margin: 0 auto 2rem; }
.hero-form { max-width: 720px; margin: 0 auto; }

/* ---------- Tools grid -----------------------------------------------------*/
.tools-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 2rem; }
.tool-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); transition: transform 150ms, border-color 150ms, box-shadow 150ms; height: 100%; }
.tool-card:hover { transform: translateY(-3px); border-color: hsl(174 72% 50% / 0.4); box-shadow: var(--shadow-glow); color: var(--fg); }
.tool-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 0.625rem; background: hsl(174 72% 50% / 0.12); color: var(--primary); }
.tool-card h3 { font-size: 16px; margin: 0; }
.tool-card p { font-size: 13px; margin: 0; color: hsl(210 20% 92% / 0.6); }
.tool-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- Result blocks --------------------------------------------------*/
.result { display: none; margin-top: 1.5rem; }
.result.is-open { display: block; }
.result-card { padding: 1.25rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.error-banner { display: none; margin-top: 1rem; padding: 0.875rem 1rem; border-radius: 0.625rem; background: hsl(0 72% 55% / 0.12); color: hsl(0 80% 75%); border: 1px solid hsl(0 72% 55% / 0.3); font-size: 14px; }
.error-banner.is-open { display: block; }

.video-result { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .video-result { grid-template-columns: 220px 1fr; } }
.video-thumb { width: 100%; aspect-ratio: 9/16; max-width: 220px; border-radius: 0.75rem; overflow: hidden; background: hsl(220 16% 14%); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.author-row { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.75rem; }
.author-row img { width: 36px; height: 36px; border-radius: 50%; }
.stats-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; font-size: 13px; color: var(--muted); }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.gallery .item { position: relative; border-radius: 0.625rem; overflow: hidden; background: hsl(220 16% 14%); aspect-ratio: 9/16; }
.gallery .item img { width: 100%; height: 100%; object-fit: cover; }
.gallery .item .dl { position: absolute; bottom: 6px; right: 6px; }

.list-result li { padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: 0.625rem; background: hsl(220 16% 13% / 0.6); margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.list-result ul { list-style: none; padding: 0; margin: 0; }

/* Result header (title + Regenerate) */
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.875rem; flex-wrap: wrap; }
.result-head h3 { margin: 0; }
.btn-regen {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem; border-radius: 999px;
  background: hsl(174 72% 50% / 0.12);
  color: var(--primary);
  border: 1px solid hsl(174 72% 50% / 0.35);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-regen:hover { background: hsl(174 72% 50% / 0.22); border-color: hsl(174 72% 50% / 0.6); transform: translateY(-1px); box-shadow: 0 0 18px hsl(174 72% 50% / 0.25); }
.btn-regen:active { transform: translateY(0); }
.btn-regen svg { transition: transform .35s ease; }
.btn-regen:hover svg { transform: rotate(180deg); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.tag-row .tag { padding: 0.375rem 0.75rem; border-radius: 999px; background: hsl(174 72% 50% / 0.12); color: var(--primary); font-size: 13px; cursor: pointer; transition: background 150ms; border: 1px solid hsl(174 72% 50% / 0.2); }
.tag-row .tag:hover { background: hsl(174 72% 50% / 0.22); }
.hashtag-group { margin-bottom: 1.25rem; }
.hashtag-group h4 { color: var(--primary); margin-bottom: 0.5rem; }

/* User card */
.user-card { display: flex; gap: 1rem; align-items: flex-start; }
.user-card .avatar { width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; background: hsl(220 16% 14%); }
.user-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
@media (min-width: 640px) { .user-stats { grid-template-columns: repeat(4, 1fr); } }
.stat-tile { padding: 0.75rem 1rem; border-radius: 0.625rem; background: hsl(220 16% 13% / 0.6); border: 1px solid var(--border); text-align: center; }
.stat-tile .num { font-size: 1.25rem; font-weight: 700; color: var(--fg); }
.stat-tile .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Comment list */
.comment-list { display: grid; gap: 0.625rem; margin-top: 1rem; max-height: 480px; overflow-y: auto; padding-right: 0.25rem; }
.comment-item { display: grid; grid-template-columns: 36px 1fr; gap: 0.625rem; padding: 0.75rem; background: hsl(220 16% 13% / 0.6); border-radius: 0.625rem; border: 1px solid var(--border); }
.comment-item img { width: 36px; height: 36px; border-radius: 50%; }
.comment-item .meta { font-size: 12px; color: var(--muted); }

/* ---------- FAQ ------------------------------------------------------------*/
.faq-list { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.faq-item { border: 1px solid var(--border); border-radius: 0.75rem; background: hsl(220 18% 11% / 0.5); overflow: hidden; }
.faq-item summary { list-style: none; padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.25rem; color: var(--primary); transition: transform 200ms; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.25rem 1.125rem; margin: 0; color: hsl(210 20% 92% / 0.78); }

/* ---------- Footer ---------------------------------------------------------*/
.site-footer { border-top: 1px solid var(--border); padding-top: 2.5rem; padding-bottom: 1.5rem; margin-top: 3rem; background: hsl(220 18% 9% / 0.6); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-bottom: 1.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-brand img { height: 32px; width: auto; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 14px; color: var(--muted); max-width: 320px; }
.site-footer h4 { font-size: 14px; margin-bottom: 0.875rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer ul a { font-size: 14px; color: hsl(210 20% 92% / 0.7); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1rem; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Misc -----------------------------------------------------------*/
.spinner { width: 1.125rem; height: 1.125rem; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.copy-btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem; border-radius: 0.5rem; background: hsl(220 16% 16%); border: 1px solid var(--border); color: var(--fg); font-size: 12px; }
.copy-btn:hover { background: hsl(220 16% 20%); }
.copy-btn.copied { background: hsl(174 72% 50% / 0.2); color: var(--primary); border-color: hsl(174 72% 50% / 0.3); }

.qrcode-canvas { background: #fff; padding: 1rem; border-radius: 0.75rem; max-width: 280px; margin: 0 auto; }
.followers-card { background: linear-gradient(135deg, hsl(174 72% 25%), hsl(220 18% 11%)); padding: 2rem; border-radius: 1rem; text-align: center; max-width: 380px; margin: 0 auto; color: #fff; }
.followers-card .count { font-size: 3.5rem; font-weight: 700; line-height: 1; margin: 0.5rem 0; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Steps / instruction blocks */
.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 1.25rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gradient); color: var(--primary-fg); font-weight: 700; margin-bottom: 0.5rem; }

/* Article body (about/privacy/terms) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose ul li { margin-bottom: 0.5rem; }

/* =====================================================================
   Homepage redesign additions (mirrors React Index.tsx components)
   ===================================================================== */

/* ---------- Hero ---------- */
.hero { padding: 4rem 0 1rem; }
.hero-icon {
  width: 80px; height: 80px; margin: 0 auto 1.25rem;
  border-radius: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient); color: var(--primary-fg);
  box-shadow: 0 0 60px hsl(174 72% 50% / 0.45);
  animation: float 3.2s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@keyframes fadeIn   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.animate-fade-in  { animation: fadeIn  0.6s ease both; }
.animate-slide-up { animation: slideUp 0.55s ease both; animation-delay: 0.15s; }

/* ---------- Lazy section reveal (IntersectionObserver) ---------- */
.lazy-section { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.lazy-section.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lazy-section, .animate-fade-in, .animate-slide-up, .hero-icon { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- Section heading ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section-head h2 { margin: 0 0 0.75rem; }
.section-head .lead { margin: 0; }

/* ---------- Downloader form (URL input + paste + button) ---------- */
.downloader-box { padding: 12px; max-width: 760px; margin: 0 auto; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.url-form {
  display: grid;
  gap: 0.875rem;
  padding: 8px;
  background: linear-gradient(180deg, hsl(220 24% 10%) 0%, hsl(220 28% 7%) 100%);
  border: 1px solid hsl(174 60% 45% / 0.35);
  border-radius: 1.125rem;
  box-shadow:
    inset 0 1px 0 hsl(210 40% 98% / 0.04),
    inset 0 0 18px hsla(220, 50%, 2%, 0.45),
    0 0 15px hsl(174 72% 50% / 0.22);
}
[data-theme="light"] .url-form {
  padding: 8px;
  background: linear-gradient(180deg, #ffffff 0%, hsl(210 30% 97%) 100%);
  border: 1px solid hsl(174 65% 45% / 0.40);
  box-shadow:
    inset 0 1px 0 hsl(0 0% 100% / 0.7),
    inset 0 0 18px hsl(220 14% 92% / 0.4),
    0 0 15px hsl(174 70% 45% / 0.20);
}
.url-field {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, hsl(220 24% 12%) 0%, hsl(220 28% 9%) 100%);
  border: 1px solid hsl(174 60% 45% / 0.35);
  border-radius: 0.875rem;
  box-shadow:
    inset 0 1px 0 hsl(210 40% 98% / 0.04),
    inset 0 0 14px hsla(220, 50%, 2%, 0.40);
  transition: border-color 220ms cubic-bezier(.22,.9,.32,1), box-shadow 220ms cubic-bezier(.22,.9,.32,1);
}
.url-field:hover {
  border-color: hsl(174 72% 50% / 0.55);
}
.url-field:focus-within {
  border-color: var(--primary);
  box-shadow:
    inset 0 1px 0 hsl(210 40% 98% / 0.05),
    inset 0 0 14px hsla(220, 50%, 2%, 0.40),
    0 0 0 3px hsl(174 72% 50% / 0.18);
}
.url-field input { flex: 1; min-width: 0; padding: 0.625rem 0.75rem 0.625rem 2.75rem; background: transparent; border: 0; color: var(--fg); font: inherit; outline: none; }
.url-icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.btn-paste { display: inline-flex; align-items: center; gap: 0.375rem; margin-right: 0.375rem; padding: 0.5rem 0.875rem; border-radius: 0.625rem; background: hsl(220 16% 18%); color: hsl(210 20% 92% / 0.9); border: 1px solid var(--border); font-size: 13px; transition: background 150ms, color 150ms; }
.btn-paste:hover { background: hsl(174 72% 50% / 0.15); color: var(--primary); border-color: hsl(174 72% 50% / 0.35); }
.btn-paste.copied { background: hsl(174 72% 50% / 0.2); color: var(--primary); }
@media (max-width: 480px) { .paste-label { display: none; } }
.btn-lg { padding: 1rem 1.5rem; font-size: 16px; }

/* ---------- Video result (richer than the generic .result-card) ---------- */
.result.is-open { margin-top: 1.5rem; }
.video-result { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .video-result { grid-template-columns: 240px 1fr; } }

/* ---------- Download history ---------- */
.download-history { max-width: 760px; margin: 1.75rem auto 0; }
.dh-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.dh-head h2 { font-size: 14px; font-weight: 600; margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--fg); }
.dh-head h2 svg { color: var(--primary); }
.dh-clear { background: transparent; border: 0; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border-radius: 0.5rem; }
.dh-clear:hover { color: var(--danger); background: hsl(0 72% 55% / 0.1); }
.dh-list { padding: 0.5rem; display: grid; gap: 0.25rem; }
.dh-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: 0.625rem; transition: background 150ms; }
.dh-item:hover { background: hsl(220 16% 16% / 0.6); }
.dh-thumb { width: 48px; height: 48px; border-radius: 0.5rem; object-fit: cover; background: hsl(220 16% 14%); flex: 0 0 48px; }
.dh-meta { flex: 1; min-width: 0; }
.dh-meta .t { font-size: 14px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-meta .a { font-size: 12px; color: var(--muted); }
.dh-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ---------- Feature grid (6 cards) ---------- */
.feature-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.625rem; }
.feature-icon { width: 48px; height: 48px; border-radius: 0.75rem; background: hsl(174 72% 50% / 0.12); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.feature-icon.mx-auto { margin-left: auto; margin-right: auto; }
.feature-card h3 { font-size: 17px; margin: 0; }
.feature-card p { margin: 0; font-size: 14px; color: hsl(210 20% 92% / 0.7); }
.hover-rise { transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.hover-rise:hover { transform: translateY(-3px); border-color: hsl(174 72% 50% / 0.4); box-shadow: var(--shadow-glow); }
.shrink-0 { flex-shrink: 0; }

/* ---------- HomeContent prose-wide ---------- */
.prose-wide { max-width: none; }
.prose-wide h2 { margin: 2.5rem 0 1rem; font-size: clamp(1.4rem, 2.6vw, 1.875rem); text-align: center; }
.prose-wide > p, .prose-wide > header > .lead { max-width: 900px; margin-left: auto; margin-right: auto; text-align: center; }
.content-grid { display: grid; gap: 1rem; margin: 1rem 0 1.25rem; }
.content-grid.two-col   { grid-template-columns: 1fr; }
.content-grid.three-col { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .content-grid.two-col   { grid-template-columns: 1fr 1fr; }
  .content-grid.three-col { grid-template-columns: repeat(3, 1fr); }
}
.content-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.content-card h3 { font-size: 17px; margin: 0.25rem 0 0; }
.content-card p  { margin: 0; font-size: 14px; color: hsl(210 20% 92% / 0.72); line-height: 1.6; }
.content-card.text-center { align-items: center; text-align: center; }

/* ---------- HowToDownload (alternating step rows with images) ---------- */
.how-steps { display: grid; gap: 1.25rem; }
.how-step { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: center; padding: 1.5rem; }
@media (min-width: 768px) { .how-step { grid-template-columns: 1fr 1fr; padding: 2rem; gap: 2rem; } }
.how-step.reverse .how-text { order: 1; }
.how-step.reverse .how-img  { order: 2; }
@media (min-width: 768px) {
  .how-step.reverse .how-text { order: 2; }
  .how-step.reverse .how-img  { order: 1; }
}
.how-text .step-num { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gradient); color: var(--primary-fg); font-weight: 700; margin-bottom: 0.625rem; box-shadow: 0 0 24px hsl(174 72% 50% / 0.35); }
.how-text h3 { font-size: 1.125rem; margin: 0 0 0.5rem; }
.how-text p  { margin: 0; color: hsl(210 20% 92% / 0.75); }
.how-img img { width: 100%; height: auto; border-radius: 0.875rem; aspect-ratio: 16/9; object-fit: cover; box-shadow: 0 10px 30px hsla(0,0%,0%,0.35); }

/* ---------- Tip list (SafetyTips) ---------- */
.tip-list { display: grid; gap: 1rem; }
.tip-item { padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-start; }
.tip-item h3 { font-size: 17px; margin: 0 0 0.375rem; }
.tip-item p  { margin: 0; font-size: 14px; color: hsl(210 20% 92% / 0.72); }

/* ---------- BrowserSupport ---------- */
.browser-card { padding: 2rem; }
.browser-card > h3 { font-size: 1rem; margin: 0 0 1.25rem; }
.browser-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.browser-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: 0.75rem; background: hsl(174 72% 50% / 0.06); border: 1px solid hsl(174 72% 50% / 0.2); min-width: 160px; font-size: 14px; font-weight: 500; }
.browser-chip svg { color: var(--primary); }

/* ---------- FAQ rich (12 items, accordion-style with chevron) ---------- */
.content-prose { padding: 1.75rem 1.75rem 1.5rem; max-width: 920px; margin: 0 auto; }
.content-prose.w-1200 { max-width: 1200px; margin-left: auto; margin-right: auto; }
.how-steps.w-1200    { max-width: 1200px; margin-left: auto; margin-right: auto; }
.feature-grid.w-1200 { max-width: 1200px; margin-left: auto; margin-right: auto; }
.content-grid.w-1200 { max-width: 1200px; margin-left: auto; margin-right: auto; }
.faq-wrap.w-1200     { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-head.w-1200 { max-width: 1200px; margin-left: auto; margin-right: auto; }
.content-prose.w-1000 { max-width: 1000px; }
.how-steps.w-1000 { max-width: 1000px; margin-left: auto; margin-right: auto; }
.feature-grid.w-1000 { max-width: 1000px; margin-left: auto; margin-right: auto; }
.downloader-box.cp-box { max-width: 1200px !important; }
.content-prose p { margin: 0 0 1rem; line-height: 1.7; color: hsl(210 20% 92% / 0.85); font-size: 15.5px; }
.content-prose p:last-child { margin-bottom: 0; }
.content-prose strong { color: var(--fg); }
.content-prose a { color: var(--primary); text-decoration: none; border-bottom: 1px solid hsl(174 72% 50% / 0.35); transition: color 150ms, border-color 150ms; }
.content-prose a:hover { color: hsl(174 72% 60%); border-bottom-color: var(--primary); }
[data-theme="light"] .content-prose p { color: hsl(220 25% 22%); }
[data-theme="light"] .content-prose strong { color: hsl(220 25% 12%); }
.faq-wrap { padding: 1.5rem 1.5rem 0.75rem; }
.faq-item-rich { border-bottom: 1px solid var(--border); }
.faq-item-rich:last-child { border-bottom: 0; }
.faq-item-rich summary {
  list-style: none; cursor: pointer;
  padding: 1rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-weight: 500; color: var(--fg);
  transition: color 150ms;
}
.faq-item-rich summary::-webkit-details-marker { display: none; }
.faq-item-rich summary:hover { color: var(--primary); }
.faq-chev { color: var(--muted); transform: rotate(90deg); transition: transform 200ms; flex-shrink: 0; }
.faq-item-rich[open] .faq-chev { transform: rotate(270deg); color: var(--primary); }
.faq-body { padding: 0 0 1rem; color: hsl(210 20% 92% / 0.72); font-size: 15px; line-height: 1.65; }

/* ---------- Theme toggle (placeholder light-only state class) ---------- */
:root.light .dark-only { display: none; }
:root.dark  .light-only { display: none; }

/* ---------- Utility tweaks ---------- */
.section { padding: 4rem 0 1rem; }
.text-center { text-align: center; }

/* ---------- Accessibility helpers ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =====================================================================
   Video preview card (matches modern dark TikTok-downloader UI)
   ===================================================================== */
/* Three-box layout: player / meta / download options */
.vp-stack {
  display: flex; flex-direction: column; gap: 15px;
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
}
.vp-card {
  border-radius: 0.875rem;
  background: hsl(220 18% 11%);
  border: 1px solid hsl(220 14% 18%);
  outline: 0;
  overflow: hidden;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fadeIn 0.45s ease both;
}
.vp-card--player { padding: 0; }
.vp-card--meta   { padding: 0; }
.vp-card--dl     { padding: 0; }
.vp-player {
  background: hsl(220 16% 14%);
  display: flex; align-items: center; justify-content: center;
  padding: 0.5rem;
}
.vp-player video, .vp-player img {
  max-height: 78vh;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  display: block;
  object-fit: contain;
}
.vp-player--thumb { position: relative; }
.vp-player--thumb img { max-height: 70vh; }
.vp-player--avatar { padding: 2.25rem; background: hsl(220 16% 14%); }
.vp-player--avatar img {
  width: 280px; height: 280px;
  max-height: none;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid hsl(174 72% 50% / 0.35);
  box-shadow: 0 0 40px hsl(174 72% 50% / 0.18);
}
.vp-thumb-badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 4px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: #fff;
  background: hsl(220 18% 11% / 0.7);
  border: 1px solid hsl(220 14% 28%);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.vp-thumb-badge svg { color: var(--primary); }

/* ============= Generator form (title / caption / hashtag) ============== */
.downloader-box:has(.gen-form) { max-width: 800px; }

/* Engagement Calculator: handle + fetch row, 2-col stat grid, helper text */
.er-handle-row { display: flex; gap: 0.5rem; align-items: stretch; }
.er-handle-row .gen-input { flex: 1 1 auto; min-width: 0; }
.er-fetch-btn {
  flex: 0 0 auto;
  padding: 0 1.25rem;
  font-weight: 600;
  border-radius: 0.75rem;
  white-space: nowrap;
}
.er-fetch-btn[disabled] { opacity: 0.7; cursor: progress; }
.er-helper {
  font-size: 12.5px;
  color: hsl(210 14% 62%);
  margin-top: -0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid hsl(220 14% 18%);
}
.er-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.er-grid .gen-label { display: flex; align-items: center; gap: 0.4rem; }
.er-grid .gen-label svg,
.gen-form > div > .gen-label svg,
.gen-form > .gen-label svg { color: var(--primary); flex: 0 0 auto; }
@media (max-width: 560px) {
  .er-grid { grid-template-columns: 1fr; }
  .er-handle-row { flex-direction: column; }
}
[data-theme="light"] .er-helper { color: hsl(215 14% 45%); border-bottom-color: hsl(220 14% 88%); }
[data-theme="light"] .er-grid .gen-label,
[data-theme="light"] .gen-form > div > .gen-label,
[data-theme="light"] .gen-form > .gen-label { color: hsl(220 25% 12%); }

/* Generator-style <select> — compound selector to beat .gen-input's `background:` shorthand */
.gen-input.gen-select,
select.gen-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: hsl(220 18% 11%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 14px 14px !important;
  padding-right: 2.25rem;
  cursor: pointer;
}
.gen-select option { background: hsl(220 28% 9%); color: #fff; }
[data-theme="light"] .gen-input.gen-select,
[data-theme="light"] select.gen-select { background-color: #fff; }
[data-theme="light"] .gen-select option { background: #fff; color: hsl(220 25% 12%); }

/* Money Calculator dashboard */
.mc-result { display: flex; flex-direction: column; gap: 1rem; }
.mc-headline {
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, hsl(178 78% 14% / 0.55), hsl(220 28% 8% / 0.7));
  border: 1px solid hsl(178 78% 50% / 0.25);
}
.mc-headline-num { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.mc-headline-lbl { font-size: 0.85rem; color: hsl(210 14% 65%); margin-top: 0.35rem; letter-spacing: 0.06em; text-transform: uppercase; }
.mc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.mc-tile {
  background: hsl(220 28% 9% / 0.7);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.85rem;
  padding: 0.9rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  transition: border-color 0.15s, transform 0.15s;
}
.mc-tile:hover { border-color: hsl(178 78% 50% / 0.4); transform: translateY(-1px); }
.mc-tile-lbl { font-size: 11.5px; color: hsl(210 14% 62%); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.mc-tile-num { font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.2; }
.mc-tile-sub { font-size: 11.5px; color: hsl(210 14% 55%); }
.mc-tile-accent {
  background: linear-gradient(150deg, hsl(178 78% 18% / 0.6), hsl(220 28% 9% / 0.7));
  border-color: hsl(178 78% 50% / 0.4);
}
.mc-tile-accent .mc-tile-num { background: linear-gradient(90deg, #5eead4, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 900px) { .mc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .mc-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .mc-headline-num { font-size: 1.85rem; }
}
[data-theme="light"] .mc-headline {
  background: linear-gradient(180deg, hsl(178 60% 92%), hsl(0 0% 100%));
  border-color: hsl(178 60% 60% / 0.4);
}
[data-theme="light"] .mc-headline-lbl { color: hsl(215 14% 40%); }
[data-theme="light"] .mc-tile {
  background: #fff;
  border-color: hsl(220 14% 88%);
}
[data-theme="light"] .mc-tile-num { color: hsl(220 25% 12%); }
[data-theme="light"] .mc-tile-lbl { color: hsl(215 14% 40%); }
[data-theme="light"] .mc-tile-sub { color: hsl(215 14% 50%); }
[data-theme="light"] .mc-tile-accent {
  background: linear-gradient(150deg, hsl(178 78% 92%), #fff);
  border-color: hsl(178 78% 50% / 0.45);
}

/* ============================ Comment Picker ============================ */
.cp-opt { font-weight: 400; opacity: 0.6; font-size: 12px; }
.cp-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.cp-toggle {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: hsl(220 18% 11%);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cp-toggle:hover { border-color: hsl(178 78% 50% / 0.35); }
.cp-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cp-toggle-mark {
  width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 5px;
  background: hsl(220 28% 14%);
  border: 1.5px solid hsl(220 14% 28%);
  position: relative;
  margin-top: 2px;
  transition: background 0.15s, border-color 0.15s;
}
.cp-toggle input:checked ~ .cp-toggle-mark {
  background: linear-gradient(135deg, #5eead4, #22d3ee);
  border-color: hsl(178 78% 50%);
}
.cp-toggle input:checked ~ .cp-toggle-mark::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid hsl(220 28% 9%);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.cp-toggle-text { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; line-height: 1.3; }
.cp-toggle-text strong { color: var(--fg); font-weight: 600; }
.cp-toggle-text small { color: hsl(210 14% 60%); font-size: 11.5px; }
@media (max-width: 560px) { .cp-toggles { grid-template-columns: 1fr; } }

/* Result dashboard */
.cp-result { display: flex; flex-direction: column; gap: 1rem; }
.cp-stats {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem;
}
.cp-stat {
  background: hsl(220 28% 9% / 0.7);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.7rem;
  padding: 0.7rem 0.5rem;
  text-align: center;
}
.cp-stat-num { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.cp-stat-lbl { font-size: 11px; color: hsl(210 14% 60%); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }
@media (max-width: 720px) { .cp-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .cp-stats { grid-template-columns: repeat(2, 1fr); } }

.cp-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.5rem 0 0.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  color: var(--fg);
}
.cp-section-sub { font-size: 12px; font-weight: 400; color: hsl(210 14% 60%); }

.cp-winners { display: flex; flex-direction: column; gap: 0.65rem; }
.cp-winner {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, hsl(45 90% 22% / 0.35), hsl(220 28% 9% / 0.7));
  border: 1px solid hsl(45 90% 60% / 0.45);
  position: relative;
}
.cp-winner-rank {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1a1a;
  font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.cp-winner-trophy { font-size: 1.5rem; }
.cp-winner-body { flex: 1 1 auto; min-width: 0; }
.cp-winner-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cp-winner-head strong { color: #fff; }
.cp-nick { color: hsl(210 14% 65%); font-size: 12.5px; }
.cp-winner-text { color: hsl(210 18% 88%); font-size: 14px; margin: 0.2rem 0; word-wrap: break-word; }
.cp-winner-meta { color: hsl(210 14% 58%); font-size: 12px; }

.cp-av { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; object-fit: cover; }
.cp-av-empty {
  background: linear-gradient(135deg, hsl(178 78% 30%), hsl(220 18% 18%));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
}

.cp-export-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cp-export-row .btn-regen { font-size: 13px; }

.cp-sort { display: flex; gap: 0.35rem; }
.cp-sort-btn {
  background: hsl(220 28% 12%);
  border: 1px solid hsl(220 14% 22%);
  color: hsl(210 16% 75%);
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  cursor: pointer; transition: all 0.15s;
}
.cp-sort-btn:hover { border-color: hsl(178 78% 50% / 0.5); color: #fff; }
.cp-sort-btn.cp-sort-active {
  background: hsl(178 78% 18%); border-color: hsl(178 78% 50% / 0.5); color: #5eead4;
}

.cp-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.45rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: hsl(178 78% 40%) transparent;
}
.cp-list::-webkit-scrollbar { width: 8px; }
.cp-list::-webkit-scrollbar-thumb { background: hsl(178 78% 40% / 0.5); border-radius: 4px; }
.cp-row {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.6rem 0.75rem;
  background: hsl(220 28% 9% / 0.6);
  border: 1px solid hsl(220 14% 16%);
  border-radius: 0.6rem;
}
.cp-row-body { flex: 1 1 auto; min-width: 0; }
.cp-row-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.cp-row-head strong { color: #fff; font-size: 13.5px; }
.cp-row-likes { font-size: 11.5px; color: hsl(210 14% 60%); flex: 0 0 auto; }
.cp-row-text { color: hsl(210 18% 80%); font-size: 13px; margin-top: 2px; word-wrap: break-word; }
.cp-row .cp-av { width: 28px; height: 28px; flex-basis: 28px; }

.cp-fairness {
  background: hsl(220 28% 9% / 0.7);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.7rem;
  padding: 0.85rem 1rem;
}
.cp-fairness-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem;
  padding-bottom: 0.6rem; margin-bottom: 0.6rem;
  border-bottom: 1px solid hsl(220 14% 18%);
}
.cp-fairness-meta > div { display: flex; flex-direction: column; gap: 1px; }
.cp-fairness-k { font-size: 11px; color: hsl(210 14% 55%); text-transform: uppercase; letter-spacing: 0.04em; }
.cp-fairness-v { font-size: 12.5px; color: hsl(210 18% 85%); word-break: break-all; }
.cp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cp-log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.cp-log li { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 12.5px; padding: 0.25rem 0; border-bottom: 1px dashed hsl(220 14% 16%); }
.cp-log li:last-child { border-bottom: 0; }
.cp-log-msg { color: hsl(210 16% 80%); }
.cp-log-count { color: #5eead4; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .cp-fairness-meta { grid-template-columns: 1fr; } }

/* Paste-manually collapsible */
.cp-manual {
  background: hsl(220 18% 11%);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.7rem;
  overflow: hidden;
  transition: border-color 0.15s;
}
.cp-manual[open] { border-color: hsl(178 78% 50% / 0.45); }
.cp-manual > summary {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  font-size: 13.5px; color: var(--fg);
  list-style: none;
}
.cp-manual > summary::-webkit-details-marker { display: none; }
.cp-manual-icon { color: var(--primary); display: inline-flex; }
.cp-manual-chev { margin-left: auto; transition: transform 0.2s; color: hsl(210 14% 55%); }
.cp-manual[open] .cp-manual-chev { transform: rotate(90deg); color: var(--primary); }
.cp-manual-body { padding: 0 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cp-textarea { resize: vertical; min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.cp-manual-body code { background: hsl(220 28% 14%); color: #5eead4; padding: 1px 6px; border-radius: 4px; font-size: 11.5px; }

/* Loaded-comments header (matches "8 comments loaded • 8 unique users" pattern) */
.cp-loaded-head {
  background: linear-gradient(135deg, hsl(178 78% 18% / 0.4), hsl(220 28% 9% / 0.7));
  border: 1px solid hsl(178 78% 50% / 0.35);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.cp-loaded-title { font-size: 14px; color: hsl(210 18% 88%); }
.cp-loaded-title strong { color: #fff; }
.cp-loaded-sub { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.cp-pill {
  background: hsl(220 28% 12%);
  border: 1px solid hsl(220 14% 22%);
  color: hsl(210 16% 80%);
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.cp-pill-accent { background: linear-gradient(135deg, #5eead4, #22d3ee); color: hsl(220 28% 9%); border-color: transparent; }

.cp-list-tall { max-height: 520px; }

/* ---------- Pre-result reveal: 3-2-1 + reel + gift pop + confetti ---------- */
.cp-reveal {
  position: relative;
  min-height: 360px;
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(135deg, hsl(178 78% 18% / 0.45), hsl(220 28% 9% / 0.7));
  border: 1px solid hsl(178 78% 50% / 0.35);
  border-radius: 1rem;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
}
.cp-reveal-stack { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; }
.cp-countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cp-cd {
  position: absolute;
  font-size: 9rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, #5eead4, #22d3ee);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  opacity: 0;
  transform: scale(0.3);
  filter: drop-shadow(0 0 24px hsl(178 78% 50% / 0.6));
  animation: cp-cd-pop 700ms cubic-bezier(.2,.8,.2,1) forwards;
}
.cp-cd-3 { animation-delay: 0ms; }
.cp-cd-2 { animation-delay: 700ms; }
.cp-cd-1 { animation-delay: 1400ms; }
@keyframes cp-cd-pop {
  0%   { opacity: 0; transform: scale(0.3); }
  35%  { opacity: 1; transform: scale(1.15); }
  70%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

.cp-gift-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  animation: cp-gift-show 1ms 2100ms forwards;
}
.cp-gift {
  font-size: 9rem; line-height: 1;
  filter: drop-shadow(0 10px 30px hsl(178 78% 50% / 0.7));
  transform: scale(0) rotate(-25deg);
  animation: cp-gift-pop 900ms cubic-bezier(.34, 1.7, .64, 1) 2100ms forwards,
             cp-gift-wiggle 600ms ease-in-out 2900ms;
}
.cp-gift-burst {
  position: absolute; font-size: 4rem; opacity: 0;
  animation: cp-burst 800ms ease-out 2300ms forwards;
}
@keyframes cp-gift-show  { to { opacity: 1; } }
@keyframes cp-gift-pop {
  0%   { transform: scale(0) rotate(-25deg); }
  55%  { transform: scale(1.35) rotate(10deg); }
  80%  { transform: scale(0.92) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes cp-gift-wiggle {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.05) rotate(-6deg); }
  75% { transform: scale(1.05) rotate(6deg); }
}
@keyframes cp-burst {
  0%   { opacity: 0; transform: scale(0.4); }
  40%  { opacity: 1; transform: scale(2.5); }
  100% { opacity: 0; transform: scale(3.5); }
}

/* Slot reel — flickers usernames during countdown */
.cp-reel {
  width: 100%; max-width: 460px;
  height: 44px;
  border-radius: 0.6rem;
  background: hsl(220 28% 9% / 0.7);
  border: 1px solid hsl(178 78% 50% / 0.35);
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
}
.cp-reel::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, #5eead4, transparent);
  z-index: 2;
}
.cp-reel-track {
  display: flex; gap: 1.25rem; align-items: center;
  height: 100%;
  padding: 0 50%;
  white-space: nowrap;
  animation: cp-reel-spin 2400ms cubic-bezier(.15, .65, .25, 1) forwards;
}
@keyframes cp-reel-spin {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-1800px); }
}
.cp-reel-item { display: inline-flex; align-items: center; gap: 0.4rem; flex: 0 0 auto; font-size: 13.5px; color: hsl(210 18% 88%); font-weight: 600; }
.cp-reel-item img,
.cp-reel-item .cp-reel-av { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px; object-fit: cover; }
.cp-reel-av { background: linear-gradient(135deg, hsl(178 78% 30%), hsl(220 18% 18%)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }

.cp-reveal-label {
  font-size: 14px; color: hsl(210 14% 65%);
  letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600;
  opacity: 0;
  animation: cp-label-in 400ms ease 200ms forwards;
}
@keyframes cp-label-in { to { opacity: 1; } }

/* Confetti — particles burst from center when gift opens */
.cp-confetti { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.cp-confetti i {
  position: absolute; left: 0; top: 0;
  width: 8px; height: 14px;
  border-radius: 1px;
  background: #5eead4;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: cp-conf 1100ms cubic-bezier(.2, .6, .3, 1) forwards;
}
.cp-confetti i:nth-child(4n+1) { background: #fbbf24; }
.cp-confetti i:nth-child(4n+2) { background: #ec4899; }
.cp-confetti i:nth-child(4n+3) { background: #a78bfa; width: 10px; height: 10px; border-radius: 50%; }
.cp-confetti i:nth-child(4n)   { background: #22d3ee; }
@keyframes cp-conf {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--dx) - 50%), calc(var(--dy) - 50%)) scale(1) rotate(var(--rot)); }
}

@media (prefers-reduced-motion: reduce) {
  .cp-reveal, .cp-reveal * { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Result reveal + per-row stagger */
.cp-result { animation: cp-fade-up 360ms cubic-bezier(.2,.8,.2,1) both; }
.cp-result .cp-stat,
.cp-result .cp-winner { animation: cp-fade-up 380ms cubic-bezier(.2,.8,.2,1) both; }
.cp-result .cp-stat:nth-child(1)  { animation-delay: 60ms; }
.cp-result .cp-stat:nth-child(2)  { animation-delay: 110ms; }
.cp-result .cp-stat:nth-child(3)  { animation-delay: 160ms; }
.cp-result .cp-stat:nth-child(4)  { animation-delay: 210ms; }
.cp-result .cp-stat:nth-child(5)  { animation-delay: 260ms; }
.cp-result .cp-stat:nth-child(6)  { animation-delay: 310ms; }
.cp-result .cp-winner:nth-child(1) { animation-delay: 360ms; }
.cp-result .cp-winner:nth-child(2) { animation-delay: 460ms; }
.cp-result .cp-winner:nth-child(3) { animation-delay: 560ms; }
.cp-result .cp-winner:nth-child(n+4) { animation-delay: 660ms; }
.cp-result .cp-row { animation: cp-fade-up 320ms cubic-bezier(.2,.8,.2,1) both; }
.cp-loaded-head { animation: cp-fade-up 360ms cubic-bezier(.2,.8,.2,1) both; animation-delay: 280ms; }
@keyframes cp-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cp-result, .cp-result *, .cp-loaded-head { animation: none !important; }
}

/* Light theme overrides */
[data-theme="light"] .cp-manual { background: #fff; border-color: hsl(220 14% 88%); }
[data-theme="light"] .cp-manual[open] { border-color: hsl(178 78% 50% / 0.45); }
[data-theme="light"] .cp-manual > summary { color: hsl(220 25% 12%); }
[data-theme="light"] .cp-manual-body code { background: hsl(178 78% 92%); color: hsl(178 78% 25%); }
[data-theme="light"] .cp-loaded-head {
  background: linear-gradient(135deg, hsl(178 78% 92%), #fff);
  border-color: hsl(178 78% 50% / 0.5);
}
[data-theme="light"] .cp-loaded-title { color: hsl(220 25% 25%); }
[data-theme="light"] .cp-loaded-title strong { color: hsl(220 25% 12%); }
[data-theme="light"] .cp-pill { background: hsl(220 14% 95%); border-color: hsl(220 14% 80%); color: hsl(215 14% 35%); }

[data-theme="light"] .cp-toggle { background: #fff; border-color: hsl(220 14% 88%); }
[data-theme="light"] .cp-toggle-mark { background: hsl(220 14% 95%); border-color: hsl(220 14% 80%); }
[data-theme="light"] .cp-toggle-text strong { color: hsl(220 25% 12%); }
[data-theme="light"] .cp-toggle-text small { color: hsl(215 14% 50%); }
[data-theme="light"] .cp-stat,
[data-theme="light"] .cp-row,
[data-theme="light"] .cp-fairness { background: #fff; border-color: hsl(220 14% 88%); }
[data-theme="light"] .cp-stat-num,
[data-theme="light"] .cp-row-head strong,
[data-theme="light"] .cp-winner-head strong { color: hsl(220 25% 12%); }
[data-theme="light"] .cp-stat-lbl,
[data-theme="light"] .cp-row-likes,
[data-theme="light"] .cp-fairness-k { color: hsl(215 14% 45%); }
[data-theme="light"] .cp-row-text,
[data-theme="light"] .cp-fairness-v { color: hsl(220 25% 25%); }
[data-theme="light"] .cp-winner-text { color: hsl(220 25% 25%); }
[data-theme="light"] .cp-winner-meta,
[data-theme="light"] .cp-nick { color: hsl(215 14% 50%); }
[data-theme="light"] .cp-winner {
  background: linear-gradient(135deg, hsl(45 90% 88%), #fff);
  border-color: hsl(45 90% 55% / 0.5);
}
[data-theme="light"] .cp-section-title { color: hsl(220 25% 12%); }
[data-theme="light"] .cp-section-sub { color: hsl(215 14% 50%); }
[data-theme="light"] .cp-sort-btn { background: hsl(220 14% 95%); border-color: hsl(220 14% 80%); color: hsl(215 14% 35%); }
[data-theme="light"] .cp-sort-btn.cp-sort-active { background: hsl(178 78% 92%); border-color: hsl(178 78% 50% / 0.5); color: hsl(178 78% 25%); }
[data-theme="light"] .cp-fairness-meta { border-bottom-color: hsl(220 14% 88%); }
[data-theme="light"] .cp-log li { border-bottom-color: hsl(220 14% 92%); }
[data-theme="light"] .cp-log-msg { color: hsl(220 25% 25%); }
[data-theme="light"] .cp-log-count { color: hsl(178 78% 30%); }
.gen-form {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 15px;
  background: linear-gradient(180deg, hsl(220 24% 10%) 0%, hsl(220 28% 7%) 100%);
  border: 1px solid hsl(174 60% 45% / 0.35);
  border-radius: 1.125rem;
  box-shadow:
    inset 0 1px 0 hsl(210 40% 98% / 0.04),
    inset 0 0 18px hsla(220, 50%, 2%, 0.45),
    0 0 15px hsl(174 72% 50% / 0.22);
}
.gen-form > .gen-label:first-child,
.gen-form > .gen-textarea,
.gen-form > .gen-row,
.gen-form > .gen-toggles,
.gen-form > .url-submit { margin-left: 4px; margin-right: 4px; }
.gen-form > .gen-textarea { margin-left: 0; margin-right: 0; }
.gen-form > .url-submit { margin-left: 0; margin-right: 0; }
.gen-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.gen-textarea,
.gen-input {
  width: 100%;
  background: hsl(220 18% 11%);
  color: var(--fg);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.75rem;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.gen-textarea { resize: vertical; min-height: 88px; }
.gen-textarea:focus,
.gen-input:focus {
  outline: none;
  border-color: hsl(174 72% 50% / 0.55);
  box-shadow: 0 0 0 3px hsl(174 72% 50% / 0.18);
}
.gen-textarea::placeholder,
.gen-input::placeholder { color: hsl(210 16% 60%); }

.gen-row { display: grid; grid-template-columns: 1fr 220px; gap: 1.25rem; align-items: start; }
@media (max-width: 720px) { .gen-row { grid-template-columns: 1fr; } }
.gen-col { min-width: 0; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex; align-items: center;
  cursor: pointer;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.55rem 0.95rem;
  font-size: 13px; font-weight: 500;
  color: hsl(210 18% 80%);
  background: hsl(220 18% 11%);
  border: 1px solid hsl(220 14% 22%);
  border-radius: 999px;
  transition: all .15s ease;
}
.chip > span svg { flex-shrink: 0; }

.gen-toggles { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1rem; }
.chip:hover > span { border-color: hsl(220 14% 32%); color: var(--fg); }
.chip input:checked + span {
  color: #0b1220;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(174 72% 50% / 0.18);
}

.select-wrap {
  position: relative;
  display: flex; align-items: center;
  background: hsl(220 18% 11%);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.75rem;
  transition: border-color .15s, box-shadow .15s;
}
.select-wrap:focus-within {
  border-color: hsl(174 72% 50% / 0.55);
  box-shadow: 0 0 0 3px hsl(174 72% 50% / 0.18);
}
.select-icon {
  position: absolute; left: 0.85rem;
  display: inline-flex; color: var(--primary);
  pointer-events: none;
}
.gen-select {
  appearance: none; -webkit-appearance: none;
  width: 100%;
  padding: 0.85rem 2.25rem 0.85rem 2.4rem;
  background: transparent;
  color: var(--fg);
  border: 0;
  font: inherit; font-size: 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3b1c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}
.gen-select:focus { outline: none; }
.gen-select option { background: hsl(220 18% 11%); color: var(--fg); }

.how-steps--compact { gap: 14px; }
.how-step--compact { padding: 1.25rem 1.5rem; display: block; }
.how-step--compact .how-text { display: block; }
.how-step--compact .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: hsl(220 16% 14%);
  color: var(--primary);
  border: 1px solid hsl(174 72% 50% / 0.4);
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.how-step--compact h3 { margin: 0 0 0.5rem; font-size: 18px; }
.how-step--compact p { margin: 0; color: var(--muted); }

.vp-author--center { justify-content: center; text-align: center; margin-bottom: 0.5rem; }
.vp-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #0b1220;
  vertical-align: middle; margin-left: 4px;
}
.vp-private {
  display: inline-block;
  margin-left: 6px; padding: 1px 8px;
  font-size: 11px; font-weight: 600;
  color: hsl(210 20% 92% / 0.85);
  background: hsl(220 16% 18%);
  border: 1px solid hsl(220 14% 28%);
  border-radius: 999px;
}
.user-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 1rem;
}
.user-stats .stat-tile {
  background: hsl(220 16% 14%);
  border: 1px solid hsl(220 14% 18%);
  border-radius: 0.625rem;
  padding: 0.875rem 0.5rem;
  text-align: center;
}
.user-stats .stat-tile .num {
  font-size: 22px; font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
}
.user-stats .stat-tile .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: capitalize;
}
@media (max-width: 540px) {
  .user-stats { grid-template-columns: repeat(2, 1fr); }
}

.vp-dl--single { padding: 0; }
.vp-dl-btn--full {
  width: 100%;
  justify-content: center;
  padding: 1.1rem 1.25rem;
  font-size: 16px;
  border-radius: 0;
}
.vp-dl-btn--full .vp-dl-text { align-items: center; }
.vp-dl-btn--full .vp-dl-label { font-size: 16px; }
.vp-body { padding: 1.25rem 1.5rem; }
.vp-author { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.875rem; }
.vp-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: hsl(220 16% 14%); }
.vp-author strong { display: block; font-size: 15px; color: var(--fg); }
.vp-handle { font-size: 13px; color: var(--muted); }

.vp-stats {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin: 0 0 0.875rem;
  font-size: 14px; font-weight: 600;
  color: hsl(210 20% 92% / 0.85);
}
.vp-stat { display: inline-flex; align-items: center; gap: 0.375rem; }
.vp-stat svg { color: var(--muted); }
.vp-stat.vp-heart svg { color: hsl(348 85% 65%); }

.vp-music {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 13px;
  color: hsl(210 20% 92% / 0.7);
  margin: 0 0 0.625rem;
}
.vp-music svg { color: var(--primary); }

.vp-caption {
  font-size: 14px; line-height: 1.55;
  color: hsl(210 20% 92% / 0.88);
  margin: 0 0 0.875rem;
  word-break: break-word;
}

.vp-copy-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.vp-copy-row .copy-btn { padding: 0.5rem 0.875rem; font-size: 13px; }

/* Download options block */
.vp-dl {
  padding: 1.25rem 1.5rem;
  background: transparent;
}
.vp-dl-head {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 14px; font-weight: 600;
  margin: 0 0 0.875rem;
  color: var(--fg);
}
.vp-dl-head svg { color: var(--primary); }
.vp-dl-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .vp-dl-grid { grid-template-columns: repeat(3, 1fr); } }

.vp-dl-btn {
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 0.75rem;
  border-radius: 0.875rem;
  border: 1px solid var(--border);
  background: hsl(220 16% 14%);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, background 200ms ease, border-color 200ms ease, box-shadow 200ms ease, color 150ms ease;
}
.vp-dl-btn:hover { transform: translateY(-2px); border-color: hsl(174 72% 50% / 0.4); }
.vp-dl-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.vp-dl-text  { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.vp-dl-label { font-size: 14px; font-weight: 600; }
.vp-dl-sub   { font-size: 11px; color: hsl(210 20% 92% / 0.55); letter-spacing: 0.02em; margin-top: 2px; }

.vp-dl-mp3 { background: hsl(220 16% 16%); }
.vp-dl-mp3:hover { background: hsl(220 16% 19%); }

.vp-dl-sd {
  background: hsl(174 70% 42%);
  color: hsl(220 30% 8%);
  border-color: transparent;
  box-shadow: 0 6px 20px hsl(174 72% 50% / 0.25);
}
.vp-dl-sd .vp-dl-sub { color: hsl(220 30% 8% / 0.7); }
.vp-dl-sd:hover { background: hsl(174 75% 47%); box-shadow: 0 10px 30px hsl(174 72% 50% / 0.4); }

.vp-dl-hd {
  background: hsl(174 70% 42%);
  color: hsl(220 30% 8%);
  border-color: transparent;
  box-shadow: 0 6px 20px hsl(174 72% 50% / 0.25);
}
.vp-dl-hd .vp-dl-sub { color: hsl(220 30% 8% / 0.7); }
.vp-dl-hd:hover { background: hsl(174 75% 47%); box-shadow: 0 10px 30px hsl(174 72% 50% / 0.4); }

/* ---- Download button: in-flight + done states ---- */
.vp-dl-btn.is-loading,
.vp-dl-btn.is-done {
  cursor: progress;
  pointer-events: none;
  transform: none;
}
.vp-dl-btn.is-loading {
  background: hsl(174 70% 38%);
  color: hsl(220 30% 8%);
  border-color: transparent;
  animation: dlPulse 1.4s ease-in-out infinite;
}
.vp-dl-btn.is-loading .vp-dl-sub { color: hsl(220 30% 8% / 0.7); }
.vp-dl-btn.is-done {
  background: hsl(150 65% 45%);
  color: hsl(220 30% 8%);
  border-color: transparent;
  box-shadow: 0 8px 28px hsl(150 65% 45% / 0.45);
  cursor: default;
}
.vp-dl-btn.is-done .vp-dl-sub { color: hsl(220 30% 8% / 0.75); }
.dl-spinner {
  animation: dlSpin 0.85s linear infinite;
}
@keyframes dlSpin {
  to { transform: rotate(360deg); }
}
@keyframes dlPulse {
  0%, 100% { box-shadow: 0 6px 20px hsl(174 72% 50% / 0.30); filter: brightness(1); }
  50%      { box-shadow: 0 14px 40px hsl(174 72% 50% / 0.65); filter: brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .dl-spinner, .vp-dl-btn.is-loading { animation: none; }
}

/* Break the result wrapper OUT of the .downloader-box's 760px cap
   so the 3 result cards can use the requested 1200px width.
   Uses left:50% + translateX(-50%) to recentre against the page. */
.downloader-box .result.is-open {
  margin-top: 1.25rem;
  width: 1200px;
  max-width: calc(100vw - 2.5rem);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* =====================================================================
   Hero & background polish (deeper navy → black gradient with neon glow)
   ===================================================================== */
body {
  background:
    radial-gradient(900px 500px at 80% -10%, hsl(190 80% 45% / 0.18), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, hsl(174 72% 45% / 0.15), transparent 60%),
    linear-gradient(180deg, hsl(222 35% 6%) 0%, hsl(220 30% 4%) 100%);
}
/* iOS Safari has scroll-jank with fixed backgrounds, so only pin on desktop. */
@media (min-width: 1024px) and (hover: hover) {
  body { background-attachment: fixed; }
}

.hero h1 {
  font-weight: 800;
  letter-spacing: -0.025em;
  text-shadow: 0 4px 30px hsl(174 72% 50% / 0.15);
}
.hero .text-gradient {
  background: linear-gradient(135deg, hsl(180 90% 55%), hsl(190 90% 60%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Slight extra glow on the URL field when focused */
.url-field { box-shadow: 0 8px 30px hsla(0,0%,0%,0.25); }
.url-field:focus-within { box-shadow: 0 0 0 3px hsl(174 72% 50% / 0.22), 0 8px 40px hsl(174 72% 50% / 0.25); }

/* ---------- Icon size utilities (so the icon() helper's w-N / h-N work) ---- */
.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-4 { width: 1rem; }    .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }  .h-6 { height: 1.5rem; }
.w-7 { width: 1.75rem; } .h-7 { height: 1.75rem; }
.w-8 { width: 2rem; }    .h-8 { height: 2rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
svg { flex-shrink: 0; }

/* =====================================================================
   Light / Dark theme system
   - <html data-theme="dark|light"> drives variable overrides
   - Both Dark (default) and Light palettes share the same teal accent
   ===================================================================== */

/* ----- Hero icon: small rounded teal-tint card (matches both screenshots) -- */
.hero-icon {
  width: 64px; height: 64px; margin: 0 auto 1.5rem;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(174 72% 50% / 0.12);
  color: hsl(174 80% 60%);
  border: 1px solid hsl(174 72% 50% / 0.35);
  box-shadow: 0 0 40px hsl(174 72% 50% / 0.25), inset 0 0 18px hsl(174 72% 50% / 0.08);
  animation: float 3.2s ease-in-out infinite;
}

/* ----- Theme toggle button: show only the icon for the OPPOSITE theme ----- */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 0.75rem; border: 1px solid hsl(220 14% 18%); background: hsl(220 16% 16%); color: var(--fg); }
.theme-toggle:hover { background: hsl(220 16% 20%); }
.nav-mobile-toggle { flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 44px; height: 44px; padding: 0; border-radius: 0.75rem; background: hsl(220 16% 16%); border: 1px solid hsl(220 14% 18%); }
[data-theme="light"] .theme-toggle { width: 44px; height: 44px; border-radius: 0.75rem; border: 1px solid hsl(220 14% 88%); background: hsl(210 16% 96%); color: hsl(220 25% 12%); }
[data-theme="light"] .theme-toggle:hover { background: hsl(210 16% 92%); }
[data-theme="light"] .nav-mobile-toggle { width: 44px; height: 44px; border-radius: 0.75rem; background: hsl(210 16% 96%); border: 1px solid hsl(220 14% 88%); }
@media (min-width: 768px) { .nav-mobile-toggle { display: none !important; } }
.theme-icon-sun, .theme-icon-moon { display: inline-flex; }
[data-theme="dark"]  .theme-icon-moon { display: none; }   /* dark mode → show sun */
[data-theme="light"] .theme-icon-sun  { display: none; }   /* light mode → show moon */

/* ----- Recent Downloads: compact thumb to match reference ---- */
.download-history { max-width: 1200px; margin-left: auto; margin-right: auto; }
.dh-list { padding: 0.75rem; gap: 0.5rem; }
.dh-item { padding: 0.5rem 0.75rem; gap: 0.75rem; border-radius: 0.75rem; }
.dh-thumb { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 0.5rem; object-fit: cover; }
.dh-thumb-empty { background: hsl(220 16% 14%); }
.dh-meta .t { font-size: 13px; font-weight: 600; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; word-break: break-word; }
.dh-meta .a { margin-top: 0.125rem; font-size: 12px; }
.dh-time { font-size: 11px; align-self: flex-start; padding-top: 0.125rem; }
@media (max-width: 480px) {
  .dh-thumb { width: 48px; height: 48px; flex: 0 0 48px; }
}

/* =====================================================================
   LIGHT THEME — variable + selector overrides
   ===================================================================== */
:root[data-theme="light"] {
  --bg:        hsl(210 40% 98%);
  --fg:        hsl(220 25% 12%);
  --card:      hsl(0 0% 100%);
  --card-2:    hsl(210 30% 97%);
  --border:    hsl(220 14% 88%);
  --muted:     hsl(215 14% 42%);
  --primary:   hsl(174 70% 38%);
  --primary-2: hsl(190 75% 40%);
  --primary-fg:#ffffff;
  --gradient:  linear-gradient(135deg, hsl(174 70% 38%), hsl(190 75% 40%));
  --shadow-glow: 0 0 50px hsl(174 70% 50% / 0.18);
}
[data-theme="light"] body {
  color: hsl(220 25% 12%);
  background:
    radial-gradient(900px 500px at 80% -10%, hsl(190 75% 70% / 0.12), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, hsl(174 70% 60% / 0.10), transparent 60%),
    linear-gradient(180deg, hsl(210 40% 99%) 0%, hsl(210 30% 96%) 100%);
}
[data-theme="light"] p { color: hsl(220 14% 38%); }
[data-theme="light"] .lead { color: hsl(220 14% 32%); }
[data-theme="light"] .text-muted { color: hsl(215 14% 42%); }

/* Header / nav */
[data-theme="light"] .site-header {
  background: hsl(0 0% 100% / 0.85);
  border-bottom-color: hsl(220 14% 88% / 0.7);
}
[data-theme="light"] .nav-desktop a,
[data-theme="light"] .dropdown-trigger { color: hsl(220 20% 25%); }
[data-theme="light"] .nav-desktop a:hover,
[data-theme="light"] .dropdown-trigger:hover { background: hsl(210 16% 94%); color: hsl(220 25% 12%); }
[data-theme="light"] .theme-toggle {
  background: hsl(210 16% 96%);
  color: hsl(220 25% 12%);
  border-color: hsl(220 14% 86%);
}
[data-theme="light"] .theme-toggle:hover { background: hsl(210 16% 92%); }
[data-theme="light"] .nav-mobile-toggle { background: hsl(210 16% 96%); }
[data-theme="light"] .nav-mobile-toggle .bar { background: hsl(220 25% 12%); }
[data-theme="light"] .nav-mobile { background: hsl(0 0% 100% / 0.98); border-top-color: hsl(220 14% 88%); }
[data-theme="light"] .nav-mobile a { color: hsl(220 20% 25%); }
[data-theme="light"] .nav-mobile a:hover { background: hsl(210 16% 94%); color: hsl(220 25% 12%); }
[data-theme="light"] .nav-section { border-top-color: hsl(220 14% 88%); }
[data-theme="light"] .nav-section-title { color: hsl(215 14% 42%); }
[data-theme="light"] .dropdown-menu { background: #fff; border-color: hsl(220 14% 88%); box-shadow: 0 10px 30px hsla(220, 25%, 20%, 0.12); }
[data-theme="light"] .dropdown-menu a { color: hsl(220 20% 25%); }
[data-theme="light"] .dropdown-menu a:hover { background: hsl(210 16% 94%); color: hsl(220 25% 12%); }

/* Cards / surfaces */
[data-theme="light"] .glass {
  background: hsl(0 0% 100% / 0.85);
  border-color: hsl(220 14% 88%);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .downloader-box.glass {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="light"] .card,
[data-theme="light"] .feature-card,
[data-theme="light"] .content-card,
[data-theme="light"] .tip-item,
[data-theme="light"] .browser-card,
[data-theme="light"] .how-step,
[data-theme="light"] .stat-tile,
[data-theme="light"] .step,
[data-theme="light"] .tool-card,
[data-theme="light"] .comment-item {
  background: #ffffff;
  border-color: hsl(220 14% 88%);
}
[data-theme="light"] .feature-card p,
[data-theme="light"] .content-card p,
[data-theme="light"] .tip-item p,
[data-theme="light"] .how-text p,
[data-theme="light"] .tool-card p { color: hsl(220 14% 42%); }
[data-theme="light"] .feature-icon { background: hsl(174 70% 92%); color: hsl(174 70% 32%); }
[data-theme="light"] .heading-eyebrow { background: hsl(174 70% 92%); color: hsl(174 70% 28%); }

/* Hero icon variant */
[data-theme="light"] .hero-icon {
  background: hsl(174 70% 95%);
  color: hsl(174 70% 35%);
  border-color: hsl(174 70% 70% / 0.5);
  box-shadow: 0 8px 30px hsl(174 70% 50% / 0.18);
}
[data-theme="light"] .hero h1 { text-shadow: none; color: hsl(220 25% 12%); }
[data-theme="light"] .hero .text-gradient { background: linear-gradient(135deg, hsl(174 70% 38%), hsl(190 75% 40%)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Forms / inputs */
[data-theme="light"] .input,
[data-theme="light"] .textarea,
[data-theme="light"] .select {
  background: #ffffff;
  border-color: hsl(220 14% 86%);
  color: hsl(220 25% 12%);
}
[data-theme="light"] .url-field {
  background: #ffffff;
  border-color: hsl(220 14% 86%);
  box-shadow: 0 4px 16px hsla(220, 25%, 20%, 0.04);
}
[data-theme="light"] .url-field input { color: hsl(220 25% 12%); }
[data-theme="light"] .url-field input::placeholder { color: hsl(215 14% 55%); }
[data-theme="light"] .url-icon { color: hsl(174 70% 38%); }
[data-theme="light"] .btn-paste {
  background: hsl(210 16% 96%);
  color: hsl(220 20% 25%);
  border-color: hsl(220 14% 86%);
}
[data-theme="light"] .btn-paste:hover {
  background: hsl(174 70% 95%);
  color: hsl(174 70% 30%);
  border-color: hsl(174 70% 70%);
}
[data-theme="light"] .btn-ghost { background: hsl(210 16% 96%); color: hsl(220 25% 12%); }
[data-theme="light"] .btn-ghost:hover { background: hsl(210 16% 92%); color: hsl(220 25% 12%); }
[data-theme="light"] .btn-outline { background: transparent; color: hsl(220 25% 12%); border-color: hsl(220 14% 86%); }
[data-theme="light"] .btn-outline:hover { background: hsl(210 16% 96%); color: hsl(220 25% 12%); }
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .copy-btn { background: hsl(210 16% 96%); border-color: hsl(220 14% 86%); color: hsl(220 25% 12%); }
[data-theme="light"] .copy-btn:hover { background: hsl(210 16% 92%); }

/* Light theme: result list / hashtag chips */
[data-theme="light"] .list-result li {
  background: #ffffff;
  border-color: hsl(220 14% 88%);
  color: hsl(220 25% 12%);
  box-shadow: 0 2px 8px hsla(220, 25%, 20%, 0.04);
}
[data-theme="light"] .list-result li > span { color: hsl(220 25% 12%); }
[data-theme="light"] .hashtag-group h4 { color: hsl(174 70% 38%); }
[data-theme="light"] .tag-row .tag {
  background: hsl(174 72% 50% / 0.10);
  color: hsl(174 70% 32%);
  border-color: hsl(174 72% 50% / 0.30);
}
[data-theme="light"] .tag-row .tag:hover { background: hsl(174 72% 50% / 0.18); }
[data-theme="light"] .result-card { background: #ffffff; border-color: hsl(220 14% 88%); color: hsl(220 25% 12%); }
[data-theme="light"] .result-card h3,
[data-theme="light"] .result-card h4 { color: hsl(220 25% 12%); }

/* Generator form (title / caption / hashtag / username) */
[data-theme="light"] .gen-form {
  padding: 15px;
  background: linear-gradient(180deg, #ffffff 0%, hsl(210 30% 97%) 100%);
  border: 1px solid hsl(174 65% 45% / 0.40);
  box-shadow:
    inset 0 1px 0 hsl(0 0% 100% / 0.7),
    inset 0 0 18px hsl(220 14% 92% / 0.4),
    0 0 15px hsl(174 70% 45% / 0.20);
}
[data-theme="light"] .gen-label { color: hsl(220 25% 12%); }
[data-theme="light"] .gen-textarea,
[data-theme="light"] .gen-input {
  background: #ffffff;
  border-color: hsl(220 14% 86%);
  color: hsl(220 25% 12%);
  box-shadow: 0 4px 16px hsla(220, 25%, 20%, 0.04);
}
[data-theme="light"] .gen-textarea::placeholder,
[data-theme="light"] .gen-input::placeholder { color: hsl(215 14% 55%); }
[data-theme="light"] .gen-textarea:focus,
[data-theme="light"] .gen-input:focus {
  border-color: hsl(174 70% 45%);
  box-shadow: 0 0 0 3px hsl(174 70% 50% / 0.18);
}

[data-theme="light"] .chip > span {
  background: #ffffff;
  border-color: hsl(220 14% 86%);
  color: hsl(220 20% 25%);
}
[data-theme="light"] .chip:hover > span {
  border-color: hsl(174 70% 60%);
  color: hsl(220 25% 12%);
  background: hsl(174 70% 97%);
}
[data-theme="light"] .chip input:checked + span {
  background: hsl(174 70% 45%);
  border-color: hsl(174 70% 45%);
  color: #ffffff;
  box-shadow: 0 0 0 3px hsl(174 70% 50% / 0.18);
}

[data-theme="light"] .select-wrap {
  background: #ffffff;
  border-color: hsl(220 14% 86%);
  box-shadow: 0 4px 16px hsla(220, 25%, 20%, 0.04);
}
[data-theme="light"] .select-wrap:focus-within {
  border-color: hsl(174 70% 45%);
  box-shadow: 0 0 0 3px hsl(174 70% 50% / 0.18);
}
[data-theme="light"] .select-icon { color: hsl(174 70% 38%); }
[data-theme="light"] .gen-select {
  color: hsl(220 25% 12%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
[data-theme="light"] .gen-select option { background: #ffffff; color: hsl(220 25% 12%); }

/* Regenerate button */
[data-theme="light"] .btn-regen {
  background: hsl(174 70% 95%);
  color: hsl(174 70% 30%);
  border-color: hsl(174 70% 60% / 0.55);
}
[data-theme="light"] .btn-regen:hover {
  background: hsl(174 70% 90%);
  border-color: hsl(174 70% 45%);
  box-shadow: 0 0 18px hsl(174 70% 50% / 0.20);
}

/* FAQ */
[data-theme="light"] .faq-item-rich { border-bottom-color: hsl(220 14% 88%); }
[data-theme="light"] .faq-item-rich summary { color: hsl(220 25% 15%); }
[data-theme="light"] .faq-body { color: hsl(220 14% 35%); }

/* Browser chips */
[data-theme="light"] .browser-chip { background: hsl(174 70% 95%); border-color: hsl(174 70% 70% / 0.4); color: hsl(220 25% 12%); }

/* Footer */
[data-theme="light"] .site-footer { background: hsl(210 30% 97%); border-top-color: hsl(220 14% 88%); }
[data-theme="light"] .site-footer h4 { color: hsl(220 25% 12%); }
[data-theme="light"] .site-footer ul a { color: hsl(220 14% 38%); }
[data-theme="light"] .footer-bottom { border-top-color: hsl(220 14% 88%); color: hsl(215 14% 42%); }
[data-theme="light"] .footer-brand p { color: hsl(220 14% 42%); }

/* Recent downloads (light) */
[data-theme="light"] .dh-thumb-empty { background: hsl(210 16% 94%); }
[data-theme="light"] .dh-clear { color: hsl(215 14% 42%); }
[data-theme="light"] .dh-clear:hover { background: hsl(0 72% 55% / 0.08); color: hsl(0 72% 50%); }
[data-theme="light"] .dh-item:hover { background: hsl(210 16% 96%); }

/* Video preview card (light) */
[data-theme="light"] .vp-card { background: #ffffff; border: 1px solid hsl(220 14% 88%); box-shadow: none; }
[data-theme="light"] .vp-player { background: hsl(220 20% 8%); border-bottom-color: hsl(220 14% 88%); }
[data-theme="light"] .vp-author strong { color: hsl(220 25% 12%); }
[data-theme="light"] .vp-stats { color: hsl(220 14% 35%); }
[data-theme="light"] .vp-music, [data-theme="light"] .vp-caption { color: hsl(220 14% 30%); }
[data-theme="light"] .vp-dl { background: hsl(210 30% 97%); border-top-color: hsl(220 14% 88%); }
[data-theme="light"] .vp-dl-head { color: hsl(220 25% 12%); }
[data-theme="light"] .vp-dl-btn { background: #ffffff; border-color: hsl(220 14% 86%); color: hsl(220 25% 12%); }
[data-theme="light"] .vp-dl-mp3 { background: hsl(210 16% 96%); }
[data-theme="light"] .vp-dl-mp3:hover { background: hsl(210 16% 92%); }
[data-theme="light"] .vp-dl-sub { color: hsl(220 14% 50%); }
[data-theme="light"] .vp-dl-sd { background: hsl(174 65% 38%); color: #fff; box-shadow: 0 6px 20px hsl(174 70% 40% / 0.25); }
[data-theme="light"] .vp-dl-sd .vp-dl-sub { color: hsla(0,0%,100%,0.85); }
[data-theme="light"] .vp-dl-sd:hover { background: hsl(174 70% 34%); }
[data-theme="light"] .vp-dl-hd { background: hsl(174 65% 38%); color: #fff; box-shadow: 0 6px 20px hsl(174 70% 40% / 0.25); }
[data-theme="light"] .vp-dl-hd .vp-dl-sub { color: hsla(0,0%,100%,0.85); }
[data-theme="light"] .vp-dl-hd:hover { background: hsl(174 70% 34%); }

/* Misc text-on-card */
[data-theme="light"] .stat-tile .num { color: hsl(220 25% 12%); }
[data-theme="light"] .stat-tile .lbl { color: hsl(215 14% 42%); }

/* Theme transition: smooth swap */
:root, body, .site-header, .glass, .card, .feature-card, .content-card, .tip-item,
.browser-card, .how-step, .stat-tile, .step, .tool-card, .vp-card, .vp-dl-btn,
.url-field, .input, .textarea, .select, .btn-paste, .btn-ghost, .copy-btn,
.dropdown-menu, .nav-mobile, .theme-toggle, .site-footer, .dh-item {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* =====================================================================
   URL form — side-by-side on desktop / iPad, stacked on mobile
   (matches the reference: long URL field + Download button on one row)
   ===================================================================== */
.url-form { display: flex; flex-direction: column; gap: 0.875rem; align-items: stretch; }
.url-submit { white-space: nowrap; padding-left: 1.75rem; padding-right: 1.75rem; }
.url-submit svg { flex-shrink: 0; }
@media (min-width: 640px) {
  .url-form { flex-direction: row; }
  .url-form .url-field { flex: 1 1 auto; min-width: 0; }
  .url-form .url-submit { flex: 0 0 auto; min-width: 170px; }
}

/* =====================================================================
   How-to step images — show full natural portrait, no crop
   (images are 1080×1980 phone screenshots; previously force-cropped 16/9)
   ===================================================================== */
.how-img { display: flex; justify-content: center; align-items: center; padding: 0.5rem; }
.how-img img {
  width: 100%;
  height: auto;
  max-width: 240px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 1.25rem;
  display: block;
  background: hsl(220 16% 14%);
  box-shadow: 0 12px 40px hsla(0,0%,0%,0.4), 0 0 0 1px hsl(220 14% 18%);
}
@media (min-width: 768px) {
  .how-img img { max-width: 280px; }
  .how-step  { gap: 2.5rem; padding: 2rem; }
}
@media (min-width: 1024px) {
  .how-img img { max-width: 320px; }
}
[data-theme="light"] .how-img img {
  background: hsl(210 16% 96%);
  box-shadow: 0 12px 40px hsla(220, 25%, 20%, 0.12), 0 0 0 1px hsl(220 14% 88%);
}

/* =====================================================================
   Mobile / tablet polish: tighten paddings, scale hero copy
   ===================================================================== */
@media (max-width: 639px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .hero { padding: 2.25rem 0 0.75rem; }
  /* Page H1 (every page: hero + section heads). Shrink + allow word breaks
     so long titles like "TikTok Profile Picture Downloader" never overflow
     the viewport on small phones. */
  h1 {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .hero h1 {
    font-size: clamp(1.6rem, 7.2vw, 2.15rem);
    line-height: 1.18;
    margin-bottom: 0.75rem;
  }
  .hero p  { font-size: 0.95rem; padding: 0 0.25rem; }
  .downloader-box { padding: 12px; }
  .url-field input { padding: 0.625rem 0.5rem 0.625rem 2.5rem; font-size: 0.95rem; }
  .btn-paste .sr-only { position: absolute; width: 1px; height: 1px; }
  .btn-lg { padding: 0.875rem 1.25rem; font-size: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .how-step { padding: 1.25rem; gap: 1rem; }
  .how-text h3 { font-size: 1.05rem; }
  .footer-grid { gap: 1.5rem; }
}

/* iPad / small-tablet specific touch-ups */
@media (min-width: 641px) and (max-width: 1023px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Force crisp scaling on lazy-loaded media */
img, video { max-width: 100%; height: auto; }

/* =====================================================================
   URL input — thin teal border + always-on 10px glow
   ===================================================================== */
.url-field {
  border: 1px solid hsl(174 72% 50% / 0.55);
  box-shadow:
    0 0 10px hsl(174 72% 50% / 0.35),
    0 0 0 1px hsl(174 72% 50% / 0.18);
  transition: border-color 150ms ease, box-shadow 200ms ease;
}
.url-field:hover {
  border-color: hsl(174 72% 55% / 0.75);
  box-shadow:
    0 0 14px hsl(174 72% 50% / 0.45),
    0 0 0 1px hsl(174 72% 50% / 0.25);
}
.url-field:focus-within {
  border-color: hsl(174 72% 55%);
  box-shadow:
    0 0 18px hsl(174 72% 50% / 0.55),
    0 0 0 3px hsl(174 72% 50% / 0.25);
}
[data-theme="light"] .url-field {
  border: 1px solid hsl(174 72% 38% / 0.55);
  box-shadow:
    0 0 10px hsl(174 72% 38% / 0.30),
    0 0 0 1px hsl(174 72% 38% / 0.18);
}
[data-theme="light"] .url-field:hover {
  border-color: hsl(174 72% 38% / 0.80);
  box-shadow:
    0 0 14px hsl(174 72% 38% / 0.40),
    0 0 0 1px hsl(174 72% 38% / 0.25);
}
[data-theme="light"] .url-field:focus-within {
  border-color: hsl(174 72% 38%);
  box-shadow:
    0 0 18px hsl(174 72% 38% / 0.50),
    0 0 0 3px hsl(174 72% 38% / 0.22);
}

/* =====================================================================
   Lazy-section noscript fallback — if JS is disabled, sections must
   still appear instead of staying at opacity:0 forever
   ===================================================================== */
.no-js .lazy-section { opacity: 1 !important; transform: none !important; }

/* ---------- Key Features (long-row cards) + Multi-Platform chips ---------- */
.feature-rows { display: flex; flex-direction: column; gap: 1.25rem; }
.feature-row {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.5rem; border-radius: 1rem;
}
.feature-row-ic {
  flex-shrink: 0; width: 3rem; height: 3rem; border-radius: 0.75rem;
  background: rgba(45, 212, 191, 0.10); color: var(--color-primary, #2dd4bf);
  display: flex; align-items: center; justify-content: center;
}
.feature-row-body h3 { font-size: 1.125rem; margin: 0 0 0.4rem; font-weight: 700; }
.feature-row-body p  { color: var(--color-muted, #9ca3af); line-height: 1.65; margin: 0; font-size: 0.95rem; }
@media (min-width: 640px) {
  .feature-row { padding: 2rem; gap: 1.5rem; }
  .feature-row-body h3 { font-size: 1.25rem; }
  .feature-row-body p  { font-size: 1rem; }
}

.multi-platform { margin-top: 2.5rem; padding: 2rem; border-radius: 1rem; text-align: center; }
.multi-platform h3 { font-size: 1.35rem; margin: 0 0 0.6rem; font-weight: 700; }
.multi-platform > p {
  color: var(--color-muted, #9ca3af); max-width: 42rem; margin: 0 auto 1.5rem; line-height: 1.65;
}
.device-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.device-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1rem 1.25rem; min-width: 8rem; border-radius: 0.75rem;
  background: rgba(45, 212, 191, 0.06);
  color: var(--color-primary, #2dd4bf);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.device-chip:hover { transform: translateY(-2px); background: rgba(45, 212, 191, 0.12); }
.device-chip span { color: var(--color-text, #f3f4f6); font-size: 0.875rem; font-weight: 600; }
@media (min-width: 640px) { .device-chips { gap: 2rem; } }

/* Light theme overrides */
[data-theme="light"] .feature-row-ic    { background: rgba(13, 148, 136, 0.10); color: #0d9488; }
[data-theme="light"] .feature-row-body p,
[data-theme="light"] .multi-platform > p { color: #4b5563; }
[data-theme="light"] .device-chip        { background: rgba(13, 148, 136, 0.08); color: #0d9488; }
[data-theme="light"] .device-chip:hover  { background: rgba(13, 148, 136, 0.15); }
[data-theme="light"] .device-chip span   { color: #111827; }

/* ========================================================================
   TikTok Comment Generator (cg-*)
   ======================================================================== */
.cg-box { max-width: 1240px !important; padding: 1.25rem !important; }

/* Two-pane layout: form (left 400) + preview (right flex) */
.cg-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .cg-layout { grid-template-columns: 1fr; }
}
.cg-row-2 { display: grid; grid-template-columns: 1fr 110px; gap: 0.5rem; }
.cg-optional { color: hsl(210 14% 50%); font-weight: 500; font-size: 11.5px; margin-left: 0.25rem; }
.cg-avatar-field .cg-avatar-row {
  display: flex; align-items: center; gap: 0.6rem;
}
.cg-avatar-thumb {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
  background: rgba(255,255,255,0.05); color: hsl(210 14% 60%);
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.cg-avatar-thumb svg { display: block; }
.cg-avatar-thumb.has-img { background-color: transparent; color: transparent; }
.cg-avatar-thumb.has-img svg { display: none; }
.cg-upload-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem; font-size: 12.5px; font-weight: 600;
  border-radius: 10px; cursor: pointer; user-select: none;
  background: rgba(45,212,191,0.10); border: 1px dashed rgba(45,212,191,0.45);
  color: var(--fg); transition: background .15s, border-color .15s;
}
.cg-upload-btn:hover { background: rgba(45,212,191,0.18); border-color: rgba(45,212,191,0.7); }
.cg-upload-clear {
  background: transparent; border: 0; color: hsl(210 14% 60%);
  font-size: 12px; cursor: pointer; padding: 0.25rem 0.4rem; text-decoration: underline;
}
.cg-upload-clear:hover { color: #ef4444; }
[data-theme="light"] .cg-avatar-thumb { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }
[data-theme="light"] .cg-upload-btn { background: rgba(13,148,136,0.08); border-color: rgba(13,148,136,0.40); color: #0f172a; }
[data-theme="light"] .cg-upload-btn:hover { background: rgba(13,148,136,0.15); }
[data-theme="light"] .cg-optional { color: #94a3b8; }
.cg-form { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem !important; }
/* Tight, predictable inputs in the narrow form column (override .gen-input glow) */
.cg-input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 0.6rem 0.75rem !important;
  font-size: 14px !important; line-height: 1.4 !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: var(--fg) !important;
  box-shadow: none !important;
  font-family: inherit;
  margin: 0 !important;
}
.cg-input:focus { outline: none !important; border-color: rgba(45,212,191,0.45) !important; background: rgba(255,255,255,0.06) !important; }
.cg-textarea { min-height: 0 !important; resize: vertical; height: auto; }
.cg-label { margin-bottom: 0.35rem !important; font-size: 13px !important; }
.cg-field { display: flex !important; flex-direction: column !important; gap: 0 !important; margin: 0 !important; flex: 0 0 auto !important; }
.cg-form { align-items: stretch; align-self: start; }
[data-theme="light"] .cg-input { background: #fff !important; border-color: #e2e8f0 !important; color: #0f172a !important; }
[data-theme="light"] .cg-input:focus { border-color: #14b8a6 !important; background: #fff !important; }

/* Tabs (mode + style) */
.cg-tabs {
  display: flex; gap: 0.5rem; padding: 0.35rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  width: fit-content; margin: 0 auto;
}
.cg-tabs-mode { margin: 0 auto 0.25rem; }
.cg-tabs-style { margin: 0 0 0.25rem; width: 100%; }
.cg-tabs-style .cg-tab { flex: 1; justify-content: center; }
.cg-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border: 0; border-radius: 999px;
  background: transparent; color: hsl(210 14% 70%); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background 150ms, color 150ms, transform 100ms;
  font-family: inherit;
}
.cg-tab-sm { padding: 0.4rem 0.85rem; font-size: 12.5px; }
.cg-tab:hover { color: var(--fg); }
.cg-tab-active {
  background: linear-gradient(135deg, #2dd4bf 0%, #06b6d4 100%);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(45,212,191,0.30);
}

/* Section labels */
.cg-section-label {
  font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(210 14% 60%); font-weight: 700; margin: 0.5rem 0 -0.25rem;
}

/* Controls */
.cg-controls { display: flex; flex-direction: column; gap: 0.85rem; }
.cg-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cg-field { display: flex; flex-direction: column; gap: 0.4rem; flex: 1 1 240px; min-width: 0; }
.cg-field-narrow { flex: 0 0 130px; }
.cg-textarea { resize: vertical; min-height: 86px; line-height: 1.5; font-family: inherit; }
.cg-counter {
  margin-left: auto; font-size: 11.5px; font-weight: 500;
  color: hsl(210 14% 55%); text-transform: none; letter-spacing: 0;
}
.gen-label { display: flex; align-items: center; gap: 0.4rem; }

/* Pills */
.cg-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cg-pill {
  padding: 0.45rem 0.95rem; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: hsl(210 14% 78%); font-weight: 500; font-size: 13.5px;
  cursor: pointer; transition: all 150ms; font-family: inherit;
}
.cg-pill:hover { background: rgba(45,212,191,0.10); border-color: rgba(45,212,191,0.30); color: var(--fg); }
.cg-pill-active {
  background: linear-gradient(135deg, #2dd4bf 0%, #06b6d4 100%);
  border-color: transparent; color: #fff !important;
  box-shadow: 0 3px 10px rgba(45,212,191,0.30);
}

/* Action row */
.cg-action-row { display: flex; gap: 0.5rem; }
.cg-action-row .btn-regen {
  flex: 1 1 0; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 0.85rem !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.cg-action-row .btn-regen:hover { background: rgba(255,255,255,0.08) !important; }

/* Counter under textarea (right-aligned) */
.cg-counter-row { display: flex; justify-content: flex-end; margin-top: -0.25rem; }
.cg-counter { font-size: 11.5px; color: hsl(210 14% 55%); font-weight: 500; }

/* Submit button — full-width gradient pill */
.cg-submit {
  width: 100%; justify-content: center; gap: 0.5rem;
  background: linear-gradient(135deg, #2dd4bf 0%, #06b6d4 100%) !important;
  color: #fff !important; font-weight: 700;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  box-shadow: 0 6px 20px rgba(45,212,191,0.30);
}
.cg-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(45,212,191,0.40); }

/* Right preview column — fills height */
.cg-preview-col { min-height: 100%; }
.cg-preview {
  display: flex; align-items: center; justify-content: center;
  min-height: 460px;
  padding: 2rem 1.5rem; border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(45,212,191,0.10), transparent 50%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 14px, transparent 14px 28px),
    rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Comment card */
.cg-card {
  display: flex; flex-direction: column; gap: 0;
  padding: 1.15rem 1.25rem 1rem;
  border-radius: 16px;
  background: #1f262d;
  border: 1px solid rgba(255,255,255,0.06);
  max-width: 520px; width: 100%;
  position: relative;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
}
.cg-card-row { display: flex; gap: 0.85rem; }

/* Speech-bubble tail (bottom-left) for video-comment mode */
.cg-card-video::after {
  content: ''; position: absolute; left: 28px; bottom: -10px;
  width: 18px; height: 18px;
  background: inherit;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}

/* Reply variant — TRA-style white card with "Reply to ..." header + tail */
.cg-card-replyhead {
  font-size: 13px; color: hsl(210 14% 55%); font-weight: 500;
  padding-bottom: 0.85rem; margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cg-card-replyhead span { color: #2563eb; font-weight: 600; }
/* Reply card stays a clean white bubble in BOTH themes (TRA-accurate),
   but adapts its border + shadow per theme so it always pops. */
.cg-card-reply {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 14px 38px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.20) !important;
}
.cg-card-reply .cg-card-replyhead { color: #6b7280; border-bottom-color: #f1f5f9; }
.cg-card-reply .cg-card-replyhead span { color: #2563eb; }
.cg-card-reply .cg-card-user  { color: #2563eb !important; }
.cg-card-reply .cg-card-text  { color: #0f172a !important; font-weight: 600; }
.cg-card-reply .cg-card-meta  { color: #6b7280 !important; }
.cg-card-reply .cg-av         { background: #f1f5f9 !important; color: #94a3b8 !important; }
.cg-card-reply::after {
  content: ''; position: absolute; left: 38px; bottom: -10px;
  width: 18px; height: 18px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}
[data-theme="light"] .cg-card-reply {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 28px rgba(15,23,42,0.10), 0 2px 6px rgba(15,23,42,0.06) !important;
}
[data-theme="light"] .cg-card-reply::after {
  border-right-color: #cbd5e1; border-bottom-color: #cbd5e1;
}

.cg-av {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: hsl(210 14% 65%);
}
.cg-card-body { flex: 1 1 auto; min-width: 0; }
.cg-card-user { color: #2dd4bf; font-weight: 600; font-size: 13.5px; margin-bottom: 0.35rem; }
.cg-card-text {
  color: #f1f5f9; font-size: 16px; line-height: 1.45; font-weight: 700;
  word-wrap: break-word; white-space: pre-wrap;
}
.cg-card-meta {
  display: flex; gap: 1.25rem; margin-top: 0.7rem;
  font-size: 12.5px; color: hsl(210 14% 55%);
}

/* Bulk Mode editable table (TRA style) */
.cg-bulk-result { margin-top: 1rem; }
.cg-table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
  padding: 0.75rem 0; margin-bottom: 0.5rem;
}
.cg-table-toolbar-left, .cg-table-toolbar-right { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cg-tb-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; font-size: 13px; font-weight: 600;
  border-radius: 10px; cursor: pointer; user-select: none;
  border: 1px solid transparent; transition: background .15s, transform .12s;
}
.cg-tb-primary {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(20,184,166,0.30);
}
.cg-tb-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(20,184,166,0.40); }
.cg-tb-ghost {
  background: rgba(255,255,255,0.04); color: var(--fg);
  border-color: rgba(255,255,255,0.10);
}
.cg-tb-ghost:hover { background: rgba(255,255,255,0.08); }
[data-theme="light"] .cg-tb-ghost { background: #f8fafc; border-color: #e2e8f0; color: #0f172a; }
[data-theme="light"] .cg-tb-ghost:hover { background: #f1f5f9; }

.cg-table-wrap {
  border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .cg-table-wrap { background: #ffffff; border-color: #e5e7eb; }

.cg-table-empty {
  padding: 2rem 1rem; text-align: center; color: hsl(210 14% 60%); font-size: 14px;
}
[data-theme="light"] .cg-table-empty { color: #64748b; }

.cg-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.cg-table thead th {
  text-align: left; padding: 0.85rem 0.85rem;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: hsl(210 14% 55%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.015);
}
[data-theme="light"] .cg-table thead th { color: #6b7280; background: #f9fafb; border-bottom-color: #e5e7eb; }
.cg-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.05); }
.cg-table tbody tr:last-child { border-bottom: 0; }
[data-theme="light"] .cg-table tbody tr { border-bottom-color: #f1f5f9; }
.cg-table tbody td { padding: 0.65rem 0.85rem; vertical-align: middle; }
.cg-tcell-user { width: 140px; }
.cg-tcell-verified { width: 100px; }
.cg-tcell-avatar { width: 78px; text-align: center; }
.cg-tcell-actions { width: 130px; white-space: nowrap; text-align: right; }

.cg-tinput {
  width: 100%; padding: 0.5rem 0.7rem; font-size: 13.5px;
  background: rgba(255,255,255,0.03); color: var(--fg);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  outline: none; transition: border-color .15s, background .15s;
}
.cg-tinput:focus { border-color: rgba(45,212,191,0.55); background: rgba(45,212,191,0.06); }
[data-theme="light"] .cg-tinput { background: #f8fafc; border-color: #e2e8f0; color: #0f172a; }
[data-theme="light"] .cg-tinput:focus { background: #fff; border-color: #14b8a6; }

.cg-verify-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  background: transparent; color: hsl(210 14% 65%);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cg-verify-btn:hover { background: rgba(45,212,191,0.10); border-color: rgba(45,212,191,0.45); color: var(--fg); }
.cg-verify-on { background: #14b8a6; color: #fff !important; border-color: transparent !important; }
[data-theme="light"] .cg-verify-btn { color: #6b7280; border-color: #e2e8f0; }
[data-theme="light"] .cg-verify-btn:hover { background: rgba(13,148,136,0.10); border-color: rgba(13,148,136,0.40); color: #0f172a; }

.cg-row-av {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.04); color: hsl(210 14% 55%);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; background-size: cover; background-position: center;
  transition: border-color .15s, background-color .15s;
}
.cg-row-av:hover { border-color: rgba(45,212,191,0.55); }
.cg-row-av.has-img { color: transparent; }
[data-theme="light"] .cg-row-av { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }
[data-theme="light"] .cg-row-av:hover { border-color: #14b8a6; }

.cg-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-left: 4px;
  background: transparent; color: hsl(210 14% 60%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.cg-icon-btn:hover { background: rgba(45,212,191,0.10); border-color: rgba(45,212,191,0.45); color: var(--fg); }
.cg-icon-danger:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.55); color: #ef4444; }
[data-theme="light"] .cg-icon-btn { color: #6b7280; border-color: #e5e7eb; }
[data-theme="light"] .cg-icon-btn:hover { background: rgba(13,148,136,0.08); border-color: rgba(13,148,136,0.40); color: #0f172a; }
[data-theme="light"] .cg-icon-danger:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.45); color: #ef4444; }

/* ---- Light theme overrides for cg-* ---- */
[data-theme="light"] .cg-tabs { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.08); }
[data-theme="light"] .cg-tab  { color: #475569; }
[data-theme="light"] .cg-tab:hover { color: #0f172a; }
[data-theme="light"] .cg-section-label { color: #64748b; }
[data-theme="light"] .cg-counter { color: #94a3b8; }
[data-theme="light"] .cg-pill {
  background: #f1f5f9; border-color: #e2e8f0; color: #475569;
}
[data-theme="light"] .cg-pill:hover {
  background: rgba(13,148,136,0.10); border-color: rgba(13,148,136,0.30); color: #0f172a;
}
[data-theme="light"] .cg-pill-active {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  color: #fff !important;
}
[data-theme="light"] .cg-tab-active {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
}
[data-theme="light"] .cg-preview {
  background:
    radial-gradient(circle at 30% 20%, rgba(13,148,136,0.12), transparent 55%),
    repeating-linear-gradient(45deg, rgba(15,23,42,0.04) 0 14px, transparent 14px 28px),
    #eef2f7;
  border-color: #cbd5e1;
}
[data-theme="light"] .cg-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 6px 22px rgba(15,23,42,0.08);
}
[data-theme="light"] .cg-card-video::after {
  border-right-color: #e2e8f0; border-bottom-color: #e2e8f0;
}
[data-theme="light"] .cg-av { background: #f1f5f9; color: #64748b; }
[data-theme="light"] .cg-action-row .btn-regen {
  background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #0f172a !important;
}
[data-theme="light"] .cg-action-row .btn-regen:hover { background: #e2e8f0 !important; }
[data-theme="light"] .cg-card-replyhead { color: #6b7280; border-bottom-color: #f1f5f9; }
[data-theme="light"] .cg-card-user { color: #0d9488; }
[data-theme="light"] .cg-card-text { color: #0f172a; }
[data-theme="light"] .cg-card-meta { color: #64748b; }
[data-theme="light"] .cg-bulk-card {
  background: #f8fafc; border-color: #e2e8f0;
}
[data-theme="light"] .cg-bulk-num { color: #94a3b8; }


/* ====================================================================== */
/* TikTok Followers Generator — strategy cards                            */
/* ====================================================================== */
.fg-result .fg-sub {
  margin: 6px 0 18px;
  font-size: 0.95rem;
  opacity: 0.85;
}
.fg-strats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.fg-strat {
  padding: 16px 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fg-strat:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -16px rgba(0,0,0,0.45); }
.fg-strat-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 700; opacity: 0.95;
}
.fg-strat-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary, #2dd4bf), var(--primary-glow, #14b8a6));
  color: #062c2a; font-weight: 800; font-size: 0.82rem;
}
.fg-strat-icon { color: var(--primary, #2dd4bf); display: inline-flex; }
.fg-strat-tag { color: var(--primary, #2dd4bf); }
.fg-strat-title { margin: 2px 0 0; font-size: 1.02rem; line-height: 1.35; }
.fg-strat-body { margin: 0; font-size: 0.92rem; line-height: 1.55; opacity: 0.9; }
.fg-strat-cta {
  margin-top: auto; padding-top: 6px;
  font-size: 0.88rem; font-weight: 600;
  color: var(--primary, #2dd4bf); text-decoration: none;
}
.fg-strat-cta:hover { text-decoration: underline; }

[data-theme="light"] .fg-strat { background: #ffffff; border: 1px solid #e2e8f0; }
[data-theme="light"] .fg-strat-body { color: hsl(220 18% 28%); }
[data-theme="light"] .fg-strat-num { color: #ffffff; }

@media (max-width: 640px) {
  .fg-strats { grid-template-columns: 1fr; }
}

/* ====================================================================== */
/* TikTok Font Generator — 50+ Unicode style cards                        */
/* ====================================================================== */
.fg-font-result .fg-font-count {
  margin-left: 10px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.18);
  color: var(--primary, #2dd4bf);
  vertical-align: middle;
}
.fg-fonts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.fg-font-card {
  position: relative;
  padding: 14px 14px 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fg-font-card:hover {
  border-color: rgba(45, 212, 191, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.5);
}
.fg-font-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary, #2dd4bf);
}
.fg-font-preview {
  font-size: 1.18rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-feature-settings: "liga" 0;
  min-height: 1.6em;
}
.fg-font-copy {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.12);
  color: var(--primary, #2dd4bf);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.fg-font-copy:hover { background: var(--primary, #2dd4bf); color: #062c2a; }
.fg-font-copy.is-copied { background: var(--primary, #2dd4bf); color: #062c2a; }

/* ---- Light theme overrides ---- */
[data-theme="light"] .fg-font-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
[data-theme="light"] .fg-font-card:hover { border-color: #14b8a6; }
[data-theme="light"] .fg-font-preview { color: hsl(220 25% 12%); }
[data-theme="light"] .fg-font-result .fg-font-count {
  background: rgba(20, 184, 166, 0.14);
  color: #0f766e;
}
[data-theme="light"] .fg-font-copy {
  background: rgba(20, 184, 166, 0.10);
  border-color: rgba(20, 184, 166, 0.45);
  color: #0f766e;
}
[data-theme="light"] .fg-font-copy:hover,
[data-theme="light"] .fg-font-copy.is-copied {
  background: #14b8a6;
  color: #ffffff;
}

@media (max-width: 640px) {
  .fg-fonts { grid-template-columns: 1fr; }
  .fg-font-preview { font-size: 1.06rem; }
}

/* ====================================================================== */
/* About page — tools list inside content-prose                           */
/* ====================================================================== */
.about-tools-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px 18px;
}
.about-tools-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 0.96rem;
  line-height: 1.5;
}
.about-tools-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #2dd4bf);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.55);
}
.about-tools-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(45, 212, 191, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.about-tools-list a:hover {
  color: var(--primary, #2dd4bf);
  border-bottom-color: var(--primary, #2dd4bf);
}

[data-theme="light"] .about-tools-list a {
  border-bottom-color: rgba(20, 184, 166, 0.45);
}
[data-theme="light"] .about-tools-list a:hover {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

@media (max-width: 640px) {
  .about-tools-list { grid-template-columns: 1fr; }
}

/* ====================================================================== */
/* Button-as-anchor — ensure text colour stays readable                   */
/* ====================================================================== */
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:visited { text-decoration: none; }

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:visited { color: var(--primary-fg); }

a.btn-primary span,
a.btn-primary svg { color: var(--primary-fg); }

[data-theme="light"] a.btn-primary,
[data-theme="light"] a.btn-primary:hover,
[data-theme="light"] a.btn-primary span,
[data-theme="light"] a.btn-primary svg { color: #ffffff; }

/* ====================================================================== */
/* Contact page — form styling                                            */
/* ====================================================================== */
.contact-form-wrap {
  padding: 36px 32px;
  margin-left: auto;
  margin-right: auto;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg, #e6f5f3);
  letter-spacing: 0.01em;
}
.contact-label svg { color: var(--primary, #2dd4bf); flex-shrink: 0; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  background: rgba(8, 22, 28, 0.55);
  color: var(--fg, #e6f5f3);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
  box-sizing: border-box;
}
.contact-form textarea { resize: vertical; min-height: 140px; font-family: inherit; }
.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232dd4bf' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(230, 245, 243, 0.4); }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--primary, #2dd4bf);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
  background: rgba(8, 22, 28, 0.75);
}

.contact-fineprint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.14);
  font-size: 0.88rem;
  color: rgba(230, 245, 243, 0.78);
}
.contact-fineprint svg { color: var(--primary, #2dd4bf); flex-shrink: 0; }

.contact-result {
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.contact-result.is-ok {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.45);
  color: #0f766e;
}
.contact-result.is-err {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.45);
  color: #b91c1c;
}
[data-theme="dark"] .contact-result.is-ok { color: #5eead4; }
[data-theme="dark"] .contact-result.is-err { color: #fca5a5; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.contact-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Light theme overrides */
[data-theme="light"] .contact-form input[type="text"],
[data-theme="light"] .contact-form input[type="email"],
[data-theme="light"] .contact-form select,
[data-theme="light"] .contact-form textarea {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 118, 110, 0.22);
  color: #0f172a;
}
[data-theme="light"] .contact-form input::placeholder,
[data-theme="light"] .contact-form textarea::placeholder { color: rgba(15, 23, 42, 0.4); }
[data-theme="light"] .contact-form input:focus,
[data-theme="light"] .contact-form select:focus,
[data-theme="light"] .contact-form textarea:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
  background: #fff;
}
[data-theme="light"] .contact-label { color: #0f172a; }
[data-theme="light"] .contact-label svg { color: #0f766e; }
[data-theme="light"] .contact-fineprint {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.22);
  color: rgba(15, 23, 42, 0.75);
}
[data-theme="light"] .contact-fineprint svg { color: #0f766e; }

@media (max-width: 720px) {
  .contact-form-wrap { padding: 24px 18px; }
  .contact-row { grid-template-columns: 1fr; }
  .contact-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- 404 page ----------------------------------------------------- */
.error-hero { text-align: center; padding-top: 3rem; padding-bottom: 3rem; }
.error-hero .error-code {
  font-size: clamp(96px, 18vw, 220px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 60px hsl(174 72% 50% / 0.35));
}
.error-hero .hero-icon { margin: 0.25rem auto 1rem; }
.error-hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 0.75rem; }
.error-hero .lead { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.6; }
.error-hero .actions-row .btn { display: inline-flex; align-items: center; gap: 0.4rem; }
@media (max-width: 540px) {
  .error-hero .actions-row { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .error-hero .actions-row .btn { justify-content: center; width: 100%; }
}
