/* ============================================================
   styles.css — ThumbnailsDownload  (unified, all pages)
   ============================================================ */


/* ── RESET & ROOT VARIABLES ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colours */
  --bg:           #fff;
  --bg2:          #f7f7f5;
  --bg3:          #f0ede8;
  --surface:      #fff;
  --border:       #ddd8d2;
  --border2:      #d4cfc9;
  --red:          #e63329;
  --red-light:    #fef2f1;
  --red-mid:      #fde0de;
  --text:         #1a1714;
  --text2:        #4a4540;
  --muted:        #9a948e;
  --muted2:       #c4bfba;

  /* Shadows */
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);

  /* Shape */
  --radius:       14px;
  --radius-sm:    8px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

a {
  text-decoration: none;
}


/* ── ACCESSIBILITY ── */
.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;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: 0 0 8px 0;
  transition: top .2s;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}


/* ══════════════════════════════════════════════
   NAVIGATION  (shared – all pages)
   ══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon {
  background: #ff0000;
  border-radius: 6px;
  width: 32px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 16px;
  fill: #fff;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
  white-space: nowrap;
}

.logo-text span {
  color: #ff0000;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text2);
  font-size: .88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  display: inline-block;
}

.nav-links a:hover {
  background: var(--bg2);
  color: var(--text);
}

.nav-links a.active {
  color: var(--red);
  background: var(--red-light);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background .2s;
  border: none;
  background: transparent;
}

.hamburger:hover {
  background: var(--bg2);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px)  rotate(45deg);  }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0);            }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  z-index: 998;
  flex-direction: column;
  gap: 4px;
  animation: slideDown .2s ease;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: var(--text2);
  font-size: .95rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  display: block;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--red-light);
  color: var(--red);
}


/* ══════════════════════════════════════════════
   FOOTER  (shared – all pages)
   ══════════════════════════════════════════════ */
footer {
  background: var(--text);
  text-align: center;
  padding: 28px 24px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

footer a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  margin: 0 8px;
  transition: color .2s;
}

footer a:hover {
  color: #ff0000;
}


/* ══════════════════════════════════════════════
   PAGE WRAPPER  (about / privacy / term)
   ══════════════════════════════════════════════ */
.page-wrap {
  max-width: 720px;
  margin: 96px auto 0;   /* 96px clears the fixed 64px nav */
  padding: 32px 24px 64px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.page-header p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 14px;
}

.card h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.card h2 .icon {
  width: 30px;
  height: 30px;
  background: var(--red-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
}

.card p + p {
  margin-top: 10px;
}

/* Steps (about page) */
.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-text strong {
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.step-text span {
  font-size: 13px;
  color: var(--text2);
}

/* Contact link */
.contact-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}


/* ══════════════════════════════════════════════
   HERO  (index page)
   ══════════════════════════════════════════════ */
.hero {
  min-height: calc(100vh - 64px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  background: linear-gradient(160deg, #fff 0%, #f7f4f0 50%, #fff 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(230,51,41,.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-light);
  border: 1px solid var(--red-mid);
  color: var(--red);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 28px;
  animation: fadeDown .6s ease both;
}

.hero-badge span {
  font-size: .9rem;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  max-width: 780px;
  margin-bottom: 20px;
  animation: fadeDown .6s .1s ease both;
}

.hero h1 em {
  font-style: italic;
  color: var(--red);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 48px;
  font-weight: 300;
  animation: fadeDown .6s .2s ease both;
}


/* ── TOOL CARD ── */
.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 100%;
  max-width: 680px;
  animation: fadeUp .7s .3s ease both;
}

.input-row {
  display: flex;
  gap: 10px;
}

.url-input {
  flex: 1;
  min-width: 0;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 14px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  outline: none;
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
  width: 100%;
}

.url-input:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(230,51,41,.08);
}

.url-input::placeholder {
  color: var(--muted2);
}

.fetch-btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.fetch-btn:hover {
  background: #cc2a21;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230,51,41,.3);
}

.fetch-btn:active  { transform: translateY(0); }

.fetch-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-msg {
  color: var(--red);
  font-size: .78rem;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 12px;
  display: none;
  background: var(--red-light);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--red-mid);
  text-align: left;
}

.loading {
  display: none;
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  font-family: 'JetBrains Mono', monospace;
}

.loading-dots {
  display: inline-flex;
  gap: 5px;
  margin-left: 8px;
}

.loading-dots span {
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  animation: dot-bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }

.results {
  display: none;
  margin-top: 28px;
  animation: fadeUp .4s ease;
}

.quality-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  text-align: left;
}

.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: 12px;
}

.thumb-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}

.thumb-card:hover {
  border-color: var(--red);
  box-shadow: 0 8px 24px rgba(230,51,41,.12);
  transform: translateY(-4px);
}

.thumb-img-wrap {
  position: relative;
  overflow: hidden;
}

.thumb-img-wrap img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg3);
  transition: transform .3s;
}

.thumb-card:hover .thumb-img-wrap img {
  transform: scale(1.04);
}

.thumb-img-wrap::after {
  content: 'PREVIEW';
  position: absolute;
  inset: 0;
  background: rgba(26,23,20,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  opacity: 0;
  transition: opacity .2s;
}

.thumb-card:hover .thumb-img-wrap::after {
  opacity: 1;
}

.thumb-card-info {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.thumb-quality {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
}

.thumb-res {
  font-size: .65rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
}

.dl-btn {
  background: var(--text);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 600;
  font-family: 'Outfit', system-ui, sans-serif;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: .3px;
  flex-shrink: 0;
}

.dl-btn:hover {
  background: var(--red);
  transform: scale(1.04);
}

.dl-btn svg {
  width: 11px;
  height: 11px;
}

.video-strip { display: none; }


/* ── HERO STATS ── */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  animation: fadeUp .6s .5s ease both;
}

.stat { text-align: center; }

.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .5px;
  margin-top: 4px;
}


/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 auto;
  max-width: 1100px;
}


/* ── FEATURES SECTION ── */
.section { padding: 56px 24px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon { font-size: 1.4rem; flex-shrink: 0; }

.feature-title {
  display: block;
  margin-bottom: 4px;
  font-size: .9rem;
  font-weight: 600;
}

.feature-desc {
  font-size: .82rem;
  color: var(--text2);
  font-weight: 300;
}


/* ══════════════════════════════════════════════
   404 PAGE
   ══════════════════════════════════════════════ */
.error-page {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  margin-top: 64px;
}

.error-page h1 {
  font-size: clamp(4rem, 20vw, 8rem);
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.error-page p {
  font-size: 1.1rem;
  color: var(--text2);
  margin: 16px 0 32px;
}

.error-page a {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s;
}

.error-page a:hover { background: #cc2a21; }


/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dot-bounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: .3; }
  40%            { transform: translateY(-6px); opacity: 1;  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav           { padding: 0 24px; }
  .features-grid { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .hero-stats    { gap: 28px; }
}

@media (max-width: 640px) {
  /* Nav */
  .nav           { padding: 0 16px; height: 58px; }
  .nav-links     { display: none; }
  .hamburger     { display: flex; }
  .mobile-menu   { top: 58px; }

  /* Hero */
  .hero          { padding: 72px 16px 48px; min-height: calc(100vh - 58px); }
  .hero::before  { display: none; }
  .hero h1       { font-size: clamp(1.9rem,8vw,2.8rem); letter-spacing: -.8px; margin-bottom: 16px; }
  .hero-sub      { font-size: .95rem; margin-bottom: 32px; }
  .hero-badge    { font-size: .68rem; padding: 5px 12px; margin-bottom: 20px; }

  /* Tool card */
  .tool-card     { padding: 20px 16px; border-radius: 16px; }
  .input-row     { flex-direction: column; gap: 8px; }
  .fetch-btn     { width: 100%; padding: 14px 20px; font-size: .95rem; }
  .url-input     { font-size: .78rem; padding: 13px 14px; }

  /* Thumbs */
  .thumbnails-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .thumb-card-info { flex-wrap: wrap; gap: 6px; }
  .thumb-quality   { font-size: .72rem; }
  .thumb-res       { font-size: .6rem; }

  /* Stats */
  .hero-stats    { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .stat-num      { font-size: 1.35rem; }
  .stat-label    { font-size: .68rem; }

  /* Features / footer */
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .section       { padding: 40px 16px; }
  footer         { padding: 24px 16px; }

  /* Inner pages */
  .page-wrap     { margin-top: 80px; padding: 24px 16px 48px; }
}

@media (max-width: 360px) {
  .hero h1         { font-size: 1.7rem; }
  .thumbnails-grid { grid-template-columns: 1fr; }
  .hero-stats      { gap: 16px; }
}
