/* SaveVid — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --red:     #FF3B3B;
  --red-dk:  #CC2222;
  --bg:      #0A0A0A;
  --surface: #141414;
  --card:    #1C1C1C;
  --border:  #2A2A2A;
  --text:    #F0F0F0;
  --muted:   #888;
  --sub:     #555;
  --radius:  14px;
  --glow:    0 0 40px rgba(255,59,59,.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ── ADS ── */
.ad-wrap {
  text-align: center;
  padding: 10px 0;
  background: #111;
  border-bottom: 1px solid var(--border);
}
.ad-wrap.mid { background: none; border: none; padding: 32px 0 0; }
.ad-wrap.bottom { border-top: 1px solid var(--border); border-bottom: none; margin-top: 40px; }
.ad-label {
  display: inline-block;
  font-size: 10px;
  color: var(--sub);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ── HEADER ── */
.header {
  background: rgba(10,10,10,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .container { display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 22px; }
.logo-mark {
  width: 36px; height: 36px;
  background: var(--red);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(255,59,59,.4);
}
.logo-txt span { color: var(--red); }

.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--card); }

/* ── HERO ── */
.hero {
  padding: 72px 0 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(255,59,59,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,59,59,.1);
  border: 1px solid rgba(255,59,59,.25);
  color: #FF8080;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.hero-title .line2 { color: var(--red); }

.hero-sub { color: var(--muted); font-size: 17px; margin-bottom: 40px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ── PLATFORM TABS ── */
.platform-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.ptab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.ptab:hover { border-color: #444; color: var(--text); }
.ptab.active { background: var(--red); border-color: var(--red); color: white; box-shadow: 0 4px 14px rgba(255,59,59,.35); }
.ptab-icon { font-size: 16px; }

/* ── SEARCH BOX ── */
.search-wrap { max-width: 640px; margin: 0 auto; }

.input-row {
  display: flex;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 12px;
}
.input-row:focus-within {
  border-color: var(--red);
  box-shadow: var(--glow);
}

.url-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 16px 16px;
}
.url-input::placeholder { color: var(--sub); }

.btn-paste {
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
  transition: color .2s;
  font-family: inherit;
  letter-spacing: .5px;
  white-space: nowrap;
}
.btn-paste:hover { color: var(--text); }

.btn-go {
  width: 100%;
  background: var(--red);
  border: none;
  color: white;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(255,59,59,.3);
  letter-spacing: .3px;
}
.btn-go:hover { background: var(--red-dk); box-shadow: 0 6px 24px rgba(255,59,59,.4); }
.btn-go:active { transform: scale(.99); }
.btn-go:disabled { background: #333; color: #666; cursor: not-allowed; box-shadow: none; }

.dots { display: inline-block; animation: blink 1.2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero-hint { color: var(--sub); font-size: 12px; margin-top: 10px; }
.hero-hint span { color: var(--muted); }

/* ── RESULT CARD ── */
.result-section { padding: 0 0 48px; }

.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  animation: fadeUp .35s ease;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

.video-banner {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.thumb-box { position: relative; flex-shrink: 0; }
.thumb-box img {
  width: 150px; height: 84px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.dur-badge {
  position: absolute; bottom: 5px; right: 5px;
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}

.video-details { flex: 1; overflow: hidden; }
.video-details h3 {
  font-size: 15px; font-weight: 700;
  line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vid-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.vid-meta span { color: var(--muted); font-size: 12px; }

/* ── FORMAT PICKER ── */
.format-picker { padding: 20px; }
.pick-label {
  font-size: 11px; font-weight: 700;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.type-switch { display: flex; gap: 8px; margin-bottom: 16px; }
.type-btn {
  padding: 7px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.type-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.type-btn:not(.active):hover { border-color: #444; color: var(--text); }

.quality-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 20px; }

.q-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.q-card:hover { border-color: #555; }
.q-card.selected { border-color: var(--red); background: rgba(255,59,59,.08); }
.q-card .q-label { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.q-card .q-size { font-size: 11px; color: var(--sub); }

.btn-download {
  width: 100%;
  background: linear-gradient(135deg, #FF3B3B, #CC1111);
  border: none;
  color: white;
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  padding: 17px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 6px 24px rgba(255,59,59,.35);
  letter-spacing: .3px;
}
.btn-download:hover:not(:disabled) { opacity: .92; }
.btn-download:active:not(:disabled) { transform: scale(.99); }
.btn-download:disabled { background: #2a2a2a; color: #555; box-shadow: none; cursor: not-allowed; }

/* ── FEATURES ── */
.features-section { padding: 60px 0; border-top: 1px solid var(--border); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--muted); margin-top: 8px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.feat-icon { font-size: 28px; margin-bottom: 12px; }
.feat-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feat-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ── HOW TO USE ── */
.how-section { padding: 60px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.steps-row::before {
  content: '';
  position: absolute;
  top: 28px; left: calc(16.66% + 20px); right: calc(16.66% + 20px);
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
  border-top: 1px dashed var(--border);
}
.step { text-align: center; padding: 0 10px; }
.step-num {
  width: 56px; height: 56px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 800;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(255,59,59,.3);
}
.step h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13px; }

/* ── FAQ ── */
.faq-section { padding: 60px 0; }
.faq-list { max-width: 620px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none;
  color: var(--text); font-family: inherit;
  font-size: 15px; font-weight: 600;
  padding: 18px 0;
  text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.faq-q .icon { color: var(--red); font-size: 20px; flex-shrink: 0; transition: transform .2s; }
.faq-q.open .icon { transform: rotate(45deg); }
.faq-a { color: var(--muted); font-size: 14px; padding-bottom: 18px; display: none; line-height: 1.7; }

/* ── RELATED TOOLS ── */
.related-section { padding: 48px 0; border-top: 1px solid var(--border); }
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tool-link {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s, transform .2s;
}
.tool-link:hover { border-color: var(--red); transform: translateY(-2px); }
.tool-icon { font-size: 24px; }
.tool-info { flex: 1; }
.tool-info strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.tool-info span { color: var(--muted); font-size: 12px; }
.tool-arr { color: var(--sub); }

/* ── FOOTER ── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.footer p { color: var(--sub); font-size: 12px; }

/* ── ERROR TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #C0392B; color: white;
  padding: 13px 20px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500;
  z-index: 999; max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: fadeUp .3s ease;
}
.toast button { background: none; border: none; color: white; font-size: 18px; cursor: pointer; padding: 0; line-height: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .hero { padding: 48px 0 36px; }
  .features-grid, .steps-row { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .steps-row::before { display: none; }
  .video-banner { flex-direction: column; }
  .thumb-box img { width: 100%; height: 180px; }
  .quality-grid { grid-template-columns: repeat(3, 1fr); }
  .nav a:not(.active) { display: none; }
}
