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

:root {
  --red: #FF0000;
  --red-dark: #cc0000;
  --bg: #0f0f0f;
  --bg-2: #1a1a1a;
  --bg-3: #242424;
  --border: #2e2e2e;
  --text: #f1f1f1;
  --text-muted: #888;
  --radius: 12px;
  --nav-h: 56px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

main { flex: 1; }

/* ── Header / Nav ── */
.site-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-container::-webkit-scrollbar { display: none; }

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-3); }
.nav-link.active { color: var(--text); background: var(--bg-3); }

.btn-api-key {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 12px;
  transition: color .15s, border-color .15s;
}
.btn-api-key:hover { color: var(--text); border-color: #555; }
.btn-api-key.has-key { color: #4ade80; border-color: #4ade80; }

/* ── API Key Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 480px;
}

.modal-box h2 { font-size: 1.1rem; margin-bottom: 8px; }
.modal-box p { color: var(--text-muted); font-size: .88rem; margin-bottom: 16px; line-height: 1.55; }
.modal-box a { color: #60a5fa; }

.modal-input {
  width: 100%;
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .9rem;
  font-family: "SF Mono", "Fira Code", monospace;
  padding: 10px 14px;
  outline: none;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.modal-input:focus { border-color: var(--red); }

.modal-actions { display: flex; gap: 8px; }

.btn-primary {
  flex: 1;
  background: var(--red);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  padding: 10px 16px;
  transition: background .2s;
}
.btn-primary:hover { background: var(--red-dark); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .9rem;
  padding: 10px 16px;
  transition: color .15s;
}
.btn-ghost:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  padding: 64px 0 48px;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255,0,0,.1) 0%, transparent 70%);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Search box ── */
.search-box {
  display: flex;
  gap: 8px;
  max-width: 620px;
  margin: 0 auto;
}

.search-box input, .search-box select {
  flex: 1;
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .95rem;
  padding: 13px 16px;
  outline: none;
  transition: border-color .2s;
}
.search-box input::placeholder { color: #555; }
.search-box input:focus, .search-box select:focus { border-color: var(--red); }

.search-box button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  padding: 13px 22px;
  flex-shrink: 0;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.search-box button:hover { background: var(--red-dark); }
.search-box button:active { transform: scale(.97); }
.search-box button.loading { opacity: .7; pointer-events: none; }

.error-msg { color: #f87171; margin-top: 12px; font-size: .9rem; }

.hero-note { margin-top: 14px; font-size: .78rem; color: #555; }
.hero-note code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .75rem;
  color: #777;
}

/* ── History ── */
.history-section {
  padding: 0 0 32px;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.history-header h3 { font-size: .88rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.btn-clear-history { background: none; border: none; color: #555; font-size: .8rem; cursor: pointer; }
.btn-clear-history:hover { color: var(--text-muted); }
.history-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.history-list::-webkit-scrollbar { display: none; }
.history-item {
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  width: 100px;
  transition: border-color .15s;
}
.history-item:hover { border-color: var(--red); }
.history-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.history-item span { display: block; font-size: .68rem; color: var(--text-muted); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: monospace; }

/* ── Results ── */
.results { padding: 40px 0 56px; }

.video-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 32px;
}
.video-meta img { width: 112px; height: 63px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--bg-3); }
.meta-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.meta-value { font-size: .88rem; margin-top: 2px; word-break: break-all; }
.mono { font-family: "SF Mono", "Fira Code", monospace; }
.small { font-size: .78rem !important; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.tab-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  padding: 8px 16px;
  transition: all .15s;
}
.tab-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── Thumbnail grid ── */
.section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; letter-spacing: -.3px; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.thumb-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.thumb-card:hover { border-color: #444; transform: translateY(-2px); }

.thumb-card-img {
  position: relative;
  background: var(--bg-3);
  aspect-ratio: 16/9;
}
.thumb-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unavailable {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .82rem;
}

.thumb-card-body { padding: 12px 14px; }
.thumb-resolution { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.thumb-dimensions { font-size: .75rem; color: var(--text-muted); margin-bottom: 12px; }

.thumb-actions { display: flex; gap: 6px; }

.btn-download {
  flex: 1;
  background: var(--red);
  border: none;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: background .2s;
}
.btn-download:hover { background: var(--red-dark); }
.btn-download:disabled { opacity: .35; pointer-events: none; }

.btn-copy-url {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  transition: color .15s, border-color .15s;
}
.btn-copy-url:hover { color: var(--text); border-color: #555; }
.btn-copy-url.copied { color: #4ade80; border-color: #4ade80; }

/* ── Format toggle ── */
.format-toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.format-toggle label { font-size: .85rem; color: var(--text-muted); }
.toggle-group { display: flex; gap: 4px; }
.toggle-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 12px;
  transition: all .15s;
}
.toggle-btn.active { background: var(--bg-2); border-color: #555; color: var(--text); }

/* ── Social Share ── */
.social-share { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.social-share p { font-size: .85rem; color: var(--text-muted); margin-bottom: 12px; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-share {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  padding: 8px 14px;
  text-decoration: none;
  transition: all .15s;
}
.btn-share:hover { color: var(--text); border-color: #555; }
.btn-share.whatsapp:hover { border-color: #25d366; color: #25d366; }
.btn-share.twitter:hover  { border-color: #1d9bf0; color: #1d9bf0; }
.btn-share.telegram:hover { border-color: #229ed9; color: #229ed9; }
.btn-share.facebook:hover { border-color: #1877f2; color: #1877f2; }

/* ── How-to ── */
.how-to { padding: 48px 0; border-top: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.step-num {
  width: 36px; height: 36px;
  background: var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  margin: 0 auto 12px;
}
.step h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: .85rem; }

/* ── Features ── */
.features { padding: 48px 0; border-top: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-icon { font-size: 1.5rem; margin-bottom: 10px; }
.feature-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { color: var(--text-muted); font-size: .84rem; line-height: 1.5; }

/* ── Sizes table ── */
.sizes-section { padding: 48px 0; border-top: 1px solid var(--border); }
.section-intro { color: var(--text-muted); margin-bottom: 20px; font-size: .9rem; line-height: 1.6; max-width: 680px; }
.sizes-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.sizes-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sizes-table th, .sizes-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.sizes-table th { background: var(--bg-2); color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; }
.sizes-table tbody tr:last-child td { border-bottom: none; }
.sizes-table tbody tr:hover { background: var(--bg-2); }

/* ── FAQ ── */
.faq-section { padding: 48px 0; border-top: 1px solid var(--border); }
.faq-list { display: flex; flex-direction: column; gap: 8px; max-width: 700px; }
.faq-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .93rem;
  padding: 16px 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--text-muted); margin-left: 12px; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--red); }
.faq-item p { padding: 0 18px 16px; color: var(--text-muted); font-size: .88rem; line-height: 1.6; }
.faq-item p code { background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-family: monospace; font-size: .85em; color: #ccc; }

/* ── Tool cards grid (tool pages hero bottom) ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 48px; }
.tool-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .15s;
}
.tool-card:hover { border-color: var(--red); transform: translateY(-2px); }
.tool-card .tool-icon { font-size: 1.8rem; margin-bottom: 10px; }
.tool-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.tool-card p { font-size: .78rem; color: var(--text-muted); }

/* ── Result cards (banner, profile, etc.) ── */
.result-section { padding: 40px 0 56px; }
.result-section .card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 18px; }

/* Channel info strip */
.channel-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.channel-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--bg-3); flex-shrink: 0; }
.channel-name { font-weight: 700; font-size: 1rem; }
.channel-subs { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

/* Banner images */
.banner-grid { display: flex; flex-direction: column; gap: 20px; }
.banner-item { }
.banner-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.banner-img { width: 100%; border-radius: 8px; display: block; background: var(--bg-3); }

/* Profile pic grid */
.profile-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.profile-item { text-align: center; }
.profile-img { display: block; border-radius: 50%; background: var(--bg-3); object-fit: cover; }
.profile-item .dim { font-size: .75rem; color: var(--text-muted); margin-top: 8px; }

/* ── Tag Finder ── */
.video-info-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.video-info-card img { width: 120px; height: 68px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--bg-3); }
.video-info-title { font-weight: 700; font-size: .95rem; margin-bottom: 6px; line-height: 1.3; }
.video-info-meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

.tag-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tag-actions button {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  padding: 7px 12px;
  transition: all .15s;
}
.tag-actions button:hover { color: var(--text); border-color: #555; }
.tag-actions button.copied { color: #4ade80; border-color: #4ade80; }

.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: .82rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.tag-chip:hover { border-color: var(--red); color: #fff; }

.tag-count { font-size: .82rem; color: var(--text-muted); margin-bottom: 12px; }

/* ── Comment Picker ── */
.picker-options {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.picker-options label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); cursor: pointer; }
.picker-options input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--red); }
.picker-options input[type=text] {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .85rem;
  padding: 6px 10px;
  outline: none;
  width: 160px;
}

.comment-stats { font-size: .82rem; color: var(--text-muted); margin-bottom: 14px; }

.comments-preview {
  height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  background: var(--bg-2);
}
.comment-row {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
}
.comment-row:last-child { border-bottom: none; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.comment-author { font-weight: 600; font-size: .8rem; margin-bottom: 2px; }
.comment-text { color: var(--text-muted); line-height: 1.4; }

.pick-btn-wrap { text-align: center; margin-bottom: 28px; }
.btn-pick {
  background: var(--red);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 36px;
  transition: background .2s, transform .1s;
  letter-spacing: .3px;
}
.btn-pick:hover { background: var(--red-dark); }
.btn-pick:active { transform: scale(.97); }
.btn-pick:disabled { opacity: .5; pointer-events: none; }

.winner-card {
  background: var(--bg-2);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  animation: pop .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.winner-label { font-size: .75rem; color: var(--red); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 14px; }
.winner-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; display: block; background: var(--bg-3); }
.winner-name { font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.winner-comment { color: var(--text-muted); font-size: .9rem; line-height: 1.5; max-width: 500px; margin: 0 auto 16px; }
.btn-repick {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .88rem;
  padding: 9px 18px;
  transition: all .15s;
}
.btn-repick:hover { color: var(--text); border-color: #555; }

/* ── API required notice ── */
.api-required {
  background: var(--bg-2);
  border: 1px solid #f59e0b44;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
}
.api-required strong { color: #f59e0b; }
.api-required button {
  margin-top: 12px;
  background: #f59e0b;
  border: none;
  border-radius: 8px;
  color: #000;
  cursor: pointer;
  font-weight: 700;
  font-size: .88rem;
  padding: 9px 18px;
}

/* ── Spinner ── */
.spinner {
  width: 15px; height: 15px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Load more ── */
.btn-load-more {
  display: block;
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .88rem;
  padding: 11px;
  margin-top: 10px;
  transition: all .15s;
}
.btn-load-more:hover { color: var(--text); border-color: #555; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; }
.footer-copy { color: var(--text-muted); font-size: .82rem; }
.footer-disclaimer { color: #444; font-size: .75rem; max-width: 520px; line-height: 1.5; }
.footer-disclaimer a { color: #555; text-decoration: underline; }
.footer-disclaimer a:hover { color: #888; }

/* ── Ad units ── */
.ad-unit {
  margin: 8px 0;
  min-height: 90px;
  text-align: center;
}
.ad-unit-section {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Result controls (format + tabs in one row) ── */
.result-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.result-controls .format-toggle { margin-bottom: 0; }
.result-controls .tabs { margin-bottom: 0; }

.toggle-label { font-size: .85rem; color: var(--text-muted); }

.frames-note { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; }

/* ── Responsive: tablet (≤ 768px) ── */
@media (max-width: 768px) {
  .hero { padding: 48px 0 36px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .sizes-table th:last-child,
  .sizes-table td:last-child { display: none; }
}

/* ── Responsive: mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: .9rem; }
  .hero-note { font-size: .72rem; }
  .hero-note code { padding: 1px 4px; font-size: .7rem; }

  .search-box { flex-direction: column; }
  .search-box button { justify-content: center; width: 100%; }
  .search-box input, .search-box button { padding: 14px 16px; font-size: .95rem; }

  .result-controls { flex-direction: column; align-items: flex-start; gap: 10px; }

  .video-meta { flex-direction: column; align-items: flex-start; }
  .video-meta img { width: 100%; height: auto; aspect-ratio: 16/9; }

  .thumb-grid { grid-template-columns: 1fr; }

  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }

  .share-btns { gap: 6px; }
  .btn-share { font-size: .78rem; padding: 8px 10px; }

  .section-title { font-size: 1.1rem; }

  .faq-item summary { font-size: .88rem; padding: 14px 16px; }
  .faq-item p { padding: 0 16px 14px; font-size: .85rem; }

  .tab-btn { font-size: .8rem; padding: 7px 12px; }
  .toggle-btn { font-size: .78rem; padding: 5px 10px; }

  .step { padding: 16px; }
  .step h3 { font-size: .88rem; }
  .step p { font-size: .8rem; }
}

/* ── Responsive: very small (≤ 360px) ── */
@media (max-width: 360px) {
  .steps { grid-template-columns: 1fr; }
  .hero-note code { display: none; }
  .hero-note code:first-of-type { display: inline; }
}
