:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --text: #1c1e21;
  --muted: #6b7280;
  --border: #e2e5ea;
  --accent: #1e88e5;
  --accent-dark: #1669b3;
  --pill-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
:root[data-theme="dark"] {
  --bg: #14161b;
  --bg-soft: #1c1f26;
  --text: #eceef1;
  --muted: #9aa0aa;
  --border: #2b2f38;
  --accent: #4da3ff;
  --accent-dark: #7cbcff;
  --pill-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--accent); }

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); }

/* Page shell */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 60px;
  text-align: center;
}
h1.headline {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
}
p.tagline {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 32px;
}

/* Search-bar style input + inline button */
.search-pill {
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--pill-shadow);
  padding: 6px 6px 6px 22px;
  gap: 8px;
}
.search-pill input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.search-pill button {
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 0 26px;
  cursor: pointer;
  white-space: nowrap;
}
.search-pill button:hover { background: var(--accent-dark); }
.search-pill button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Row of supported-platform links, shown under the search bar */
.platform-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.platform-chip:hover { border-color: var(--chip-color, var(--accent)); color: var(--text); }
.platform-chip.current { background: var(--chip-color, var(--accent)); border-color: transparent; color: white; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color, var(--muted)); flex-shrink: 0; }
.platform-chip.current .chip-dot { background: white; }

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--text); }

.error {
  color: #d93025;
  font-size: 13px;
  margin-top: 14px;
  display: none;
  background: #fdeceb;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: left;
}

/* Result card */
.result {
  margin-top: 28px;
  display: none;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.thumb { width: 100%; border-radius: 10px; margin-bottom: 14px; display: block; }
.title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 14px;
}
.time-row { display: flex; gap: 10px; margin-bottom: 4px; }
.time-row input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.time-row label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.hint { font-size: 11px; color: var(--muted); margin: 0 0 16px; }

.download-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.download-btn:hover { background: var(--accent-dark); }
.download-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.status { color: var(--muted); font-size: 13px; margin-top: 10px; text-align: center; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite; margin-right: 6px; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
}

/* How to use card */
.how-to {
  max-width: 640px;
  margin: 40px auto 0;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--border);
}
.how-to h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  text-align: center;
}
.how-to ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.how-to li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
}
.step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-to li span.step-text { padding-top: 2px; }

/* Ad placement slots — replace the placeholder content with your HBAgency
   ad tag/script once approved. Sized to common IAB units. */
.ad-slot {
  max-width: 728px;
  margin: 24px auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--bg-soft);
}
.ad-slot.leaderboard { min-height: 90px; }
.ad-slot.rectangle { max-width: 336px; min-height: 280px; }

/* Site-wide footer navigation (About / Blog / Privacy) */
.site-footer-nav {
  text-align: center;
  padding: 20px 20px 32px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer-nav a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 10px;
}
.site-footer-nav a:hover { color: var(--accent); }
.site-footer-nav .copyright { display: block; margin-top: 10px; font-size: 11px; }

/* Long-form article pages (About, Privacy, Blog) */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 20px;
  text-align: left;
}
.article h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
}
.article .updated {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 28px;
}
.article h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
}
.article p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 14px;
}
.article ul { margin: 0 0 14px; padding-left: 20px; }
.article li { font-size: 14px; line-height: 1.7; margin-bottom: 6px; }
.article a { color: var(--accent); }

/* Blog index cards */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.blog-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.blog-card:hover { border-color: var(--accent); }
.blog-card h3 { margin: 0 0 6px; font-size: 15px; }
.blog-card p { margin: 0; font-size: 13px; color: var(--muted); }
.blog-card .date { font-size: 11px; color: var(--muted); margin-bottom: 6px; display: block; }

/* Floating feature card — sits above the headline, cycles icon+title+description */
.features {
  display: flex;
  justify-content: center;
  padding: 22px 20px 0;
}
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 400px;
  padding: 14px 22px;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--pill-shadow);
  color: var(--text);
  animation: pillFloat 3.2s ease-in-out infinite;
}
.feature-pill .feature-pill-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}
.feature-pill-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  transition: opacity 0.25s ease;
}
.feature-pill-title {
  font-size: 14px;
  font-weight: 700;
}
.feature-pill-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.feature-pill .feature-pill-icon.fading,
.feature-pill-copy.fading {
  opacity: 0;
}
@keyframes pillFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* YouTube keyword search */
.kw-search { margin-top: 18px; }
.kw-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0 14px;
}
.kw-divider::before, .kw-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.kw-divider span { padding: 0 10px; }
.kw-results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kw-result {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  align-items: center;
  transition: border-color 0.15s;
}
.kw-result:hover { border-color: var(--accent); }
.kw-result img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-soft);
}
.kw-thumb-placeholder {
  width: 96px;
  height: 54px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--muted);
}
.kw-result-info { min-width: 0; }
.kw-result-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kw-result-meta { font-size: 11px; color: var(--muted); }
.kw-status { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

/* Supported Sites reference page */
.sites-search {
  margin: 20px 0 32px;
}
.sites-search input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.sites-search input:focus { outline: none; border-color: var(--accent); }
.site-category { margin-bottom: 26px; }
.site-category h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 12px;
}
.site-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.site-chip.hidden { display: none; }
.sites-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.no-results {
  font-size: 13px;
  color: var(--muted);
  display: none;
  padding: 20px 0;
  text-align: center;
}


