/* YouTube-inspired black theme for youtubevideodownloader.video
   Visual overrides only — keep existing class/ID contracts for JS. */

:root,
:host {
  --font-sans: "Plus Jakarta Sans Variable", "Inter Variable", sans-serif;
  --font-heading: "Plus Jakarta Sans Variable", "Inter Variable", sans-serif;
  --color-background: #0f0f0f;
  --color-surface: #181818;
  --color-elevated: #212121;
  --color-input: #121212;
  --color-secondary: #272727;
  --color-hover: #303030;
  --color-footer: #0a0a0a;
  --color-border: #2f2f2f;
  --color-outline: #3f3f3f;
  --color-primary: #f1f1f1;
  --color-body: #aaaaaa;
  --color-muted-readable: #8c8c8c;
  --color-brand: #ff0000;
  --color-brand-action: #e60000;
  --color-brand-hover: #cc0000;
  --color-brand-tint: #2a1212;
  --color-success: #3ddc84;
  --color-error: #ff5c5c;
  --accent-soft: #ff4d4d;
  --glow-red: rgba(255, 0, 0, 0.18);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

html {
  scroll-padding-top: 88px;
}

body {
  background:
    radial-gradient(1200px 520px at 50% -120px, rgba(255, 0, 0, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 20%, rgba(255, 40, 40, 0.05), transparent 50%),
    var(--color-background);
  color: var(--color-body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
}

::selection {
  background: rgba(255, 0, 0, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.container {
  width: min(1200px, 100% - 56px);
  margin-inline: auto;
}

.skip-link {
  background: var(--color-brand);
  border-radius: 999px;
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-header {
  height: 70px;
  background: rgba(15, 15, 15, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header > .container {
  width: min(1200px, 100% - 56px);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.94);
  border-bottom-color: rgba(255, 0, 0, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.brand {
  gap: 0;
}

.brand img,
.brand svg {
  width: auto;
  height: 50px;
  max-width: min(250px, 64vw);
  display: block;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 760;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.brand-mark-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--color-brand);
  display: inline-grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(255, 0, 0, 0.28);
  flex-shrink: 0;
}

.brand-mark-icon svg {
  width: 12px;
  height: 12px;
  margin-left: 1px;
}

.brand-mark-text span {
  color: var(--color-brand);
}

.main-navigation {
  gap: 4px;
}

.main-navigation a {
  position: relative;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(232, 236, 244, 0.72);
  background: transparent;
  transition: color .2s ease;
}

.main-navigation a::after {
  content: "";
  position: absolute;
  inset: auto 14px 7px 14px;
  left: 14px;
  right: 14px;
  bottom: 7px;
  top: auto;
  width: auto;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2e4d, #ff7a18);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
  color: #fff;
  background: transparent;
}

.main-navigation a:hover::after,
.main-navigation a:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.main-navigation a[aria-current] {
  color: #fff;
  background: transparent;
}

.main-navigation a[aria-current]::after {
  transform: scaleX(1);
  opacity: 1;
}

.icon-button {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- Hero / Downloader ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 50% -40% auto;
  width: 520px;
  height: 520px;
  transform: translateX(40%);
  background: radial-gradient(circle, rgba(255, 0, 0, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  padding-block: 72px 64px;
}

.hero-eyebrow {
  color: #ffb3b3;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.status-dot {
  background: var(--color-brand);
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.18);
}

.hero h1 {
  margin: 22px auto 14px;
  max-width: 14ch;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 780;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.heading-period {
  color: var(--color-brand);
  letter-spacing: 0;
  margin-left: 0.08em;
}

.hero-description {
  max-width: 560px;
  margin-inline: auto;
  color: #cfcfcf;
  font-size: 16px;
  line-height: 1.75;
}

.downloader-panel {
  max-width: 860px;
  margin: 36px auto 0;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(33, 33, 33, 0.95), rgba(24, 24, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 0, 0, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.field-heading label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d6d6d6;
}

.url-field {
  border-radius: 999px;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.url-field:focus-within {
  border-color: rgba(255, 0, 0, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.14);
}

.url-field input {
  height: 52px;
  padding: 0 96px 0 18px;
  font-size: 14px;
}

.paste-button {
  border-radius: 999px;
  color: #ddd;
}

.paste-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.button-primary {
  background: var(--color-brand-action);
  box-shadow: 0 10px 28px rgba(255, 0, 0, 0.28);
}

.button-primary:hover:not(:disabled) {
  background: var(--color-brand-hover);
}

.button-secondary {
  background: #272727;
  border-color: rgba(255, 255, 255, 0.12);
}

.service-terms {
  margin-top: 14px;
  color: var(--color-muted-readable);
}

.service-terms a:hover {
  color: var(--accent-soft);
}

.responsibility-note,
.panel-helper {
  color: var(--color-muted-readable);
}

/* ---------- Sections ---------- */
.section-space {
  padding-block: 78px;
}

.section-kicker {
  color: var(--accent-soft);
  letter-spacing: 0.16em;
  font-size: 11px;
}

.section-intro h2,
.features-intro h2,
.faq-intro h2,
.home-cta-copy h2,
.about-strip h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.04em;
}

.steps-grid {
  gap: 16px;
  margin-top: 36px;
}

.step {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #1b1b1b, #141414);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 0, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.step-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.25);
  color: #ffb3b3;
}

.step-number {
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 760;
}

.features-section,
.about-strip,
.blog-related {
  background: #121212;
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.feature-icon {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.28);
  color: #ff8a8a;
  border-radius: 14px;
}

.feature-badge {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.28);
  color: #ff9b9b;
}

.faq-list details {
  border-color: rgba(255, 255, 255, 0.08);
}

.faq-list summary .icon,
.faq-list details[open] summary .icon {
  color: var(--accent-soft);
}

.text-link {
  color: #fff;
}

.text-link .icon,
.text-link:hover {
  color: var(--accent-soft);
}

.home-cta,
.guide-cta,
.blog-article-cta,
.blog-hero,
.blog-article-hero {
  background:
    radial-gradient(700px 280px at 20% 0%, rgba(255, 0, 0, 0.16), transparent 60%),
    linear-gradient(180deg, #1a1010 0%, #121212 55%, #0f0f0f 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.home-cta-inner {
  padding-block: 56px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-main {
  padding-block: 48px 36px;
  gap: 48px;
}

.footer-brand p {
  max-width: 380px;
  margin-top: 16px;
  color: #b6b6b6;
  font-size: 15px;
  line-height: 1.75;
}

.footer-nav {
  gap: 56px;
}

.footer-nav-label {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer-nav a {
  min-height: 34px;
  color: #a7a7a7;
  font-size: 13px;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-block: 20px;
}

.footer-copy {
  color: #8f8f8f;
  font-size: 12px;
}

/* ---------- Reading / legal / contact ---------- */
.reading-page {
  width: min(760px, calc(100% - 48px));
  padding-block: 56px 72px;
}

.reading-page .page-header {
  position: relative;
}

.reading-page .page-header::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 34px;
  width: 4px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-brand), transparent);
}

.guide-page .guide-toc,
.legal-toc {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.contact-form {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.breadcrumb {
  color: #8d8d8d;
}

.page-heading {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.045em;
}

.page-lead {
  color: #c8c8c8;
}

.page-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.prose a,
.legal-notice a,
.blog-prose a,
.blog-card-title a:hover {
  color: #ff7a7a;
}

.about-contact,
.contact-form,
.legal-toc,
.guide-toc,
.guide-panel,
.device-card,
.troubleshoot-list li,
.blog-card,
.blog-empty,
.blog-author-card {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.legal-notice,
.guide-note {
  border-left-color: var(--color-brand);
  background: #171212;
}

.form-field input,
.form-field textarea,
.form-field select,
.blog-search input {
  background: #0f0f0f;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.blog-search input:focus,
.url-field:focus-within {
  border-color: rgba(255, 0, 0, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.14);
}

.feedback {
  background: #2a1212;
  border-color: rgba(255, 92, 92, 0.35);
  color: #ffb4b4;
}

.feedback[data-tone=success] {
  background: #102218;
  border-color: rgba(61, 220, 132, 0.35);
  color: var(--color-success);
}

/* ---------- Result panel ---------- */
.result-options {
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.quality-option-body {
  background: #222;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.quality-option input:checked + .quality-option-body {
  background: var(--color-brand-action);
  border-color: var(--color-brand-action);
  box-shadow: 0 10px 24px rgba(255, 0, 0, 0.28);
}

.blog-chip,
.blog-filter.is-active,
.quality-badge-accent {
  background: rgba(255, 0, 0, 0.12);
  border-color: rgba(255, 0, 0, 0.3);
  color: #ff9b9b;
}

.blog-card-fallback,
.blog-prose li::marker {
  color: #ff8a8a;
}

.blog-card-fallback {
  background: linear-gradient(135deg, #3a1515, #161616);
}

.blog-prose blockquote {
  border-left-color: var(--color-brand);
}

.download-ready-file {
  color: #ff7a7a;
}

.skeleton-status:before {
  background: var(--color-brand);
  box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.5);
}

@keyframes skeleton-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
  to { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .container,
  .reading-page {
    width: calc(100% - 28px);
  }

  .site-header {
    height: 64px;
  }

  .site-header > .container,
  .container {
    width: calc(100% - 32px);
  }

  .brand img,
  .brand svg {
    height: 44px;
    max-width: min(210px, 68vw);
  }

  .brand-mark {
    font-size: 14px;
  }

  .brand-mark-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .main-navigation {
    top: 63px;
    background: rgba(12, 12, 12, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    padding: 14px 14px 18px;
    gap: 6px;
  }

  .main-navigation a {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
  }

  .main-navigation a::after {
    display: none;
  }

  .main-navigation a:hover,
  .main-navigation a:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }

  .main-navigation a[aria-current] {
    color: #fff;
    background: rgba(255, 46, 77, 0.12);
    box-shadow: inset 3px 0 0 #ff2e4d;
  }

  .hero-content {
    padding-block: 42px 34px;
  }

  .hero h1 {
    max-width: none;
    font-size: 34px;
  }

  .downloader-panel {
    margin-top: 24px;
    padding: 14px;
    border-radius: 16px;
  }

  .url-field,
  .download-input-row .button {
    border-radius: 14px;
  }

  .url-field input {
    height: 50px;
    padding-right: 52px;
  }

  .section-space {
    padding-block: 52px;
  }

  .step:hover,
  .feature-row:hover {
    transform: none;
  }

  .footer-main {
    padding-block: 36px 28px;
  }

  .footer-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .feature-row,
  .blog-card {
    transition: none;
  }
}
