:root {
  --bg: #0f1115;
  --card: #181b22;
  --card-2: #1f232c;
  --line: #2a2f3a;
  --text: #eceef2;
  --muted: #9aa3b2;
  --accent: #ff0033;
  --accent-2: #ff3355;
  --ok: #2ecc71;
  --radius: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

/* Make the `hidden` attribute win over component display rules
   (e.g. .quality-list { display: flex }), so toggled sections truly hide. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1a1d26 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  min-height: 100vh;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.head { text-align: center; margin-bottom: 28px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 10px;
}
.brand-mark { display: inline-flex; }
.brand-mark svg {
  display: block;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(255, 0, 51, 0.35);
}
.brand-name {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand-name span { color: var(--accent); }
.head-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2px 0 6px;
  color: var(--text);
}
.sub { color: var(--muted); margin: 0; font-size: 15px; }

/* ---- Total-downloads hero graphic ---- */
.dl-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  margin-bottom: 18px;
  background: transparent;
}
.dl-hero-text {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 8px;
}
.dl-hero-num,
.dl-hero-label {
  background: linear-gradient(92deg, #ffb0bd 0%, #ff7a93 50%, #ff5775 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dl-hero-num {
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dl-hero-label {
  font-weight: 600;
  font-size: 15px;
}


.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.search { display: flex; gap: 10px; }
.search input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.search input:focus { border-color: var(--accent-2); }

/* URL field with inline paste button */
.url-field { position: relative; flex: 1; display: flex; }
.url-field input { padding: 13px 48px 13px 14px; }
.paste-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  border: none;
}
.paste-btn:hover { background: var(--card-2); color: var(--accent-2); }
.paste-btn:active { transform: translateY(-50%) scale(0.92); }
.paste-btn.copied { color: var(--ok); }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  padding: 13px 20px;
  font-weight: 600;
  transition: transform 0.05s, background 0.15s, opacity 0.15s;
}
button:hover { background: var(--accent-2); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.error {
  color: #ff7a8a;
  background: rgba(255, 0, 51, 0.08);
  border: 1px solid rgba(255, 0, 51, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 0;
  font-size: 14px;
}

.result { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

.meta { display: flex; gap: 14px; margin-bottom: 18px; }
.thumb-wrap { position: relative; flex: 0 0 160px; }
.thumb-wrap img {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--card-2);
  display: block;
}
.duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 5px;
}
.meta-text h2 {
  font-size: 17px;
  margin: 2px 0 6px;
  line-height: 1.3;
}
.muted { color: var(--muted); font-size: 14px; margin: 0; }

.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.tab {
  flex: 1;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 9px;
}
.tab:hover { background: transparent; color: var(--text); }
.tab.active { background: var(--card-2); color: var(--text); }

.quality-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.quality {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quality:hover { border-color: #3a4150; }
.quality.selected {
  border-color: var(--accent-2);
  background: rgba(255, 51, 85, 0.08);
}
.q-label { font-weight: 600; font-size: 15px; }
.q-size { color: var(--muted); font-size: 13px; }

.format-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  margin: 0 0 14px;
}
.format-note strong { color: var(--text); font-weight: 600; }
.format-note code {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  font-size: 12px;
  color: var(--text);
}

#turnstile-group {
  display: flex;
  justify-content: center;
  margin-top: 14px; /* little gap above the captcha when it appears */
}

.download { width: 100%; padding: 14px; font-size: 16px; }

.progress-box { margin-top: 16px; }
.progress-track {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-text { color: var(--muted); font-size: 14px; margin: 9px 0 0; text-align: center; }
.progress-text.done { color: var(--ok); }
.progress-text.failed { color: #ff7a8a; }

/* ---- SEO prose ---- */
.prose { margin: 40px 4px 8px; }
.prose h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.prose p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* ---- Section headings ---- */
.tutorial, .faq { margin-top: 44px; }
.tutorial > h2, .faq > h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  padding-left: 4px;
}
.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
  padding-left: 4px;
}

/* ---- Tutorial steps ---- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.step {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.step img {
  width: 46%;
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
  display: block;
}
.step-body { flex: 1; }
.step-body h3 { font-size: 17px; margin: 0 0 6px; }
.step-body p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.step-body code, .prose code {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  font-size: 12px;
  color: var(--text);
}

/* ---- FAQ ---- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 15px;
  padding: 15px 28px 15px 0;
  position: relative;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent-2);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  padding: 0 0 16px;
}
.faq-item a { color: var(--accent-2); }
.faq-item code {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  font-size: 12px;
  color: var(--text);
}

/* ---- Ad slots ---- */
.ad-slot {
  display: block;
  margin: 30px auto;
  text-align: center;
  min-height: 110px; /* reserve space to avoid layout shift (good CLS) */
}
.ad-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.6;
  margin-bottom: 6px;
}
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}
.ad-slot .adsbygoogle { display: block; }

/* ---- Legal pages ---- */
.legal { margin: 10px 4px 8px; }
.legal h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 4px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); }
.legal a { color: var(--accent-2); }
.legal .muted { font-size: 13px; }

/* ---- About page ---- */
.about { margin: 6px 4px 8px; }
.about h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 12px; }
.about h2 { font-size: 19px; margin: 30px 0 14px; }
.about-lead { color: var(--text); font-size: 17px; line-height: 1.6; margin: 0 0 14px; }
.about-lead strong { color: var(--text); }
.about-mission { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 6px; }
.about-back { margin-top: 26px; }
.about-back a, .about a { color: var(--accent-2); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 51, 85, 0.12);
  color: var(--accent-2);
  margin-bottom: 10px;
}
.feature-card h3 { font-size: 15px; margin: 0 0 5px; color: var(--text); }
.feature-card p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }

.format-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.format-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--muted);
  font-size: 14px;
}
.fmt-tag {
  flex: 0 0 auto;
  min-width: 48px;
  text-align: center;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.contact-card:hover { border-color: var(--accent-2); background: rgba(255, 51, 85, 0.06); }
.contact-role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.contact-mail { font-size: 14px; font-weight: 600; color: var(--accent-2); word-break: break-all; }

@media (max-width: 560px) {
  .feature-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* ---- Footer links ---- */
.foot-links { margin-bottom: 10px; }
.foot-links a { color: var(--accent-2); text-decoration: none; font-size: 13px; }
.foot-links a:hover { text-decoration: underline; }
.foot-links span { color: var(--muted); margin: 0 8px; font-size: 13px; }

/* ---- Cookie consent banner ---- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 50;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cookie-banner a { color: var(--accent-2); }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn {
  padding: 9px 16px;
  font-size: 14px;
  border-radius: 9px;
}
.cookie-btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.cookie-btn.ghost:hover { background: var(--card); }

.foot { text-align: center; margin-top: 44px; }
.foot p { color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 560px) {
  .step { flex-direction: column; align-items: stretch; }
  .step img { width: 100%; max-width: none; }
}

@media (max-width: 520px) {
  .meta { flex-direction: column; }
  .thumb-wrap, .thumb-wrap img { width: 100%; }
  .thumb-wrap img { height: auto; aspect-ratio: 16 / 9; }
  .search { flex-direction: column; }
}
