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

:root {
  --bg:        #010101;
  --surface:   #0d0d0d;
  --surface2:  #1a1a1a;
  --border:    rgba(255 255 255 / 0.07);
  --text:      #f0f0f0;
  --muted:     #6b6b6b;
  --accent:    #fe2c55;
  --purple:    #25f4ee;
  --amber:     #f59e0b;
  --green:     #22d3a0;
  --grad:      linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
  --radius:    14px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── NOISE + ORBS ────────────────────────────────────────────────────────────── */
.noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px;
}

.orb {
  position: fixed; border-radius: 50%; filter: blur(80px); z-index: 0; pointer-events: none;
}
.orb-1 { width: 600px; height: 600px; top: -200px; left: -100px; background: rgba(37,244,238,.06); }
.orb-2 { width: 500px; height: 500px; bottom: -150px; right: -100px; background: rgba(254,44,85,.07); }
.orb-3 { width: 300px; height: 300px; top: 40%; left: 55%; background: rgba(254,44,85,.04); }

/* ── LAYOUT ──────────────────────────────────────────────────────────────────── */
.container { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ── NAV ─────────────────────────────────────────────────────────────────────── */
nav {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(7,7,15,.7);
  backdrop-filter: blur(20px);
}

.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 20px;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -.5px;
}

.nav-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  font-size: 11px; font-weight: 500; letter-spacing: .5px;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 100px; padding: 4px 12px;
}

/* ── HERO ────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; z-index: 2;
  text-align: center; padding: 90px 24px 72px;
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
  background: rgba(255,59,139,.1); border: 1px solid rgba(255,59,139,.22);
  border-radius: 100px; padding: 6px 18px;
  margin-bottom: 28px;
  animation: fadeUp .5s ease both;
}

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }

hero h1, .hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 800; line-height: 1.0; letter-spacing: -2.5px;
  margin-bottom: 20px;
  animation: fadeUp .5s .08s ease both;
}

.gradient-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: block; }

.hero-sub {
  font-size: 17px; font-weight: 300; color: var(--muted); line-height: 1.65;
  max-width: 520px; margin: 0 auto 44px;
  animation: fadeUp .5s .16s ease both;
}

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

/* ── URL FORM ────────────────────────────────────────────────────────────────── */
.url-form { animation: fadeUp .5s .24s ease both; }

.input-wrap {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 8px;
  transition: border-color .25s, box-shadow .25s;
  position: relative;
}

.input-wrap:focus-within {
  border-color: rgba(255,59,139,.45);
  box-shadow: 0 0 0 3px rgba(255,59,139,.08), 0 24px 64px rgba(0,0,0,.4);
}

.input-icon {
  flex-shrink: 0; padding: 0 4px 0 14px; color: var(--muted);
  pointer-events: none; transition: color .25s;
}

.input-wrap:focus-within .input-icon { color: var(--accent); }

#urlInput {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--text);
  padding: 14px 8px;
}

#urlInput::placeholder { color: var(--muted); }

.btn-fetch {
  flex-shrink: 0;
  background: var(--grad);
  border: none; border-radius: 12px;
  padding: 14px 24px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .3px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}

.btn-fetch:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.btn-fetch:active { transform: scale(.97); }
.btn-fetch:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-label, .btn-loader { display: flex; align-items: center; gap: 7px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-hints {
  font-size: 12px; color: var(--muted); margin-top: 14px;
  animation: fadeUp .5s .32s ease both;
}

/* ── RESULT SECTION ──────────────────────────────────────────────────────────── */
.result-section { position: relative; z-index: 2; padding: 0 0 56px; }

.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 12px;
}

.result-label { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; }

.result-badge {
  font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 3px 12px;
}

.btn-reset {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  transition: border-color .2s, color .2s;
}

.btn-reset:hover { border-color: var(--accent); color: var(--text); }

/* ── MEDIA GRID ──────────────────────────────────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.media-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  animation: fadeUp .4s ease both;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.media-card:hover {
  border-color: rgba(168,85,247,.3);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}

.card-thumb {
  position: relative; aspect-ratio: 1/1;
  background: var(--surface2); overflow: hidden;
}

.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s, opacity .3s;
}

.media-card:hover .card-thumb img { transform: scale(1.05); }

.card-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
  opacity: 0; transition: opacity .3s;
}

.media-card:hover .card-thumb-overlay { opacity: 1; }

.card-type {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px; color: #fff;
}

.card-type.video { background: rgba(255,59,139,.9); }
.card-type.image { background: rgba(168,85,247,.85); }

.card-body {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}

.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.card-quality { font-weight: 500; font-size: 14px; margin-bottom: 2px; display: block; }

.card-ext, .item-size {
  font-size: 11px; color: var(--muted);
  background: var(--surface2); border-radius: 4px; padding: 1px 6px;
  display: inline-block; margin-right: 4px;
}

.btn-dl {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  background: var(--grad);
  border: none; border-radius: 10px;
  padding: 11px 16px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .3px;
  color: #fff; cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}

.btn-dl:hover { opacity: .85; transform: translateY(-1px); }
.btn-dl:active { transform: scale(.97); }

/* ── ERROR ───────────────────────────────────────────────────────────────────── */
.error-wrap { padding: 0 0 40px; }

.error-box {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255,59,59,.07); border: 1px solid rgba(255,59,59,.2);
  border-radius: var(--radius); padding: 16px 20px;
  font-size: 14px; color: #ff7070; line-height: 1.55;
}

.error-box::before {
  content: '⚠';
  flex-shrink: 0; font-size: 16px; margin-top: 1px;
}

/* ── SECTIONS ────────────────────────────────────────────────────────────────── */
.section { position: relative; z-index: 2; padding: 80px 0; }
.section-dark { background: var(--surface); }

.section-head { text-align: center; margin-bottom: 52px; }

.section-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}

.section-head h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800; letter-spacing: -1.5px;
}

/* ── STEPS ───────────────────────────────────────────────────────────────────── */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

@media (max-width: 680px) { .steps-grid { grid-template-columns: 1fr; } }

.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 26px;
  position: relative; overflow: hidden;
  transition: border-color .25s, transform .25s;
}

.step-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: 0; transition: opacity .25s;
}

.step-card:hover { border-color: rgba(255,59,139,.25); transform: translateY(-4px); }
.step-card:hover::after { opacity: 1; }

.step-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple); margin-bottom: 20px;
}

.step-num {
  font-family: 'Syne', sans-serif; font-size: 42px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: .25; line-height: 1; margin-bottom: 10px;
}

.step-card h3 { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.step-card strong { color: var(--text); }

/* ── FEATURES ────────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}

@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px;
  transition: border-color .25s, transform .25s;
}

.feature-card:hover { border-color: rgba(168,85,247,.25); transform: translateY(-3px); }

.feature-icon { font-size: 26px; margin-bottom: 14px; }

.feature-card h3 { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ── FAQ ─────────────────────────────────────────────────────────────────────── */
.faq-list { max-width: 680px; margin: 0 auto; }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-q {
  width: 100%; background: none; border: none; text-align: left;
  padding: 20px 0; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: color .2s;
}

.faq-q:hover { color: var(--accent); }
.faq-q:hover .faq-chevron { color: var(--accent); }

.faq-chevron { flex-shrink: 0; color: var(--muted); transition: transform .3s, color .2s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }

.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
}

.faq-a p {
  padding: 0 0 20px; font-size: 14px; color: var(--muted); line-height: 1.7;
}

.faq-a strong { color: var(--text); }

/* ── FOOTER ──────────────────────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 30px 40px;
}

.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

.footer-logo { font-size: 17px; }

.footer-note { font-size: 13px; color: var(--muted); }

/* ── SHIMMER PLACEHOLDER ─────────────────────────────────────────────────────── */
.thumb-shimmer {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--surface2) 25%, rgba(255,255,255,.04) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }

/* ── SCROLLBAR ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 16px 20px; }
  .nav-pills { display: none; }
  .hero { padding: 60px 16px 52px; }
  .input-wrap { flex-direction: column; border-radius: 16px; }
  .input-icon { display: none; }
  #urlInput { padding: 14px 16px; width: 100%; }
  .btn-fetch { width: 100%; justify-content: center; }
  .section { padding: 56px 0; }
  footer { padding: 24px 20px; }
}

/* ── FIX #1: Card title & description ──────────────────────────────────────── */
.card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e8e8e8;
  margin: 0;
  line-height: 1.5;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.75rem;
  color: #aaa;
  margin: 0;
  line-height: 1.5;
  word-break: break-word;
}

.desc-toggle {
  background: none;
  border: none;
  color: #fe2c55;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
  text-decoration: underline;
}
.desc-toggle:hover { color: #25f4ee; }
