:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --surface2: #1f1f1f;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-dim: #888;
  --accent: #fe2c55;
  --accent-hover: #e0203e;
  --accent2: #25f4ee;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.header {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(10px);
  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: 8px; color: var(--text); font-size: 1.25rem; font-weight: 700; }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-text strong { color: var(--accent); }

.nav-bot {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 600;
  transition: background .2s;
}
.nav-bot:hover { background: var(--accent-hover); text-decoration: none; }

/* ── Hero ── */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(254,44,85,.12) 0%, transparent 70%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
.hero-sub { margin-top: 12px; color: var(--text-dim); font-size: 1.1rem; }

.input-wrap {
  display: flex;
  gap: 10px;
  margin-top: 36px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

input[type="url"] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
input[type="url"]::placeholder { color: var(--text-dim); }
input[type="url"]:focus { border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: #555; cursor: not-allowed; }

.hint { margin-top: 12px; font-size: .8rem; color: var(--text-dim); }

/* ── Result ── */
.result { padding: 40px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  gap: 0;
}

.card-media {
  flex-shrink: 0;
  width: 200px;
  background: #000;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { font-size: .85rem; color: var(--text-dim); }

.dl-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.dl-btn:hover { border-color: var(--accent2); background: rgba(37,244,238,.07); text-decoration: none; }
.dl-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.error {
  background: rgba(254,44,85,.1);
  border: 1px solid rgba(254,44,85,.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .9rem;
  color: #ff6b6b;
}

.hidden { display: none !important; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Features ── */
.features { padding: 64px 0; border-top: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.feature-icon { font-size: 2rem; }
.feature h3 { margin-top: 12px; font-size: 1rem; font-weight: 700; }
.feature p { margin-top: 8px; font-size: .85rem; color: var(--text-dim); line-height: 1.5; }

/* ── How-to ── */
.how { padding: 0 0 72px; }
.how h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 28px; text-align: center; }
.steps { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 0 auto; }
.steps li {
  counter-increment: steps;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 18px 60px;
  position: relative;
  font-size: .95rem;
  line-height: 1.5;
}
.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 18px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
}

/* ── Footer ── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  font-size: .85rem;
  color: var(--text-dim);
}
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .input-wrap { flex-direction: column; }
  .card { flex-direction: column; }
  .card-media { width: 100%; height: 200px; }
  .hero { padding: 48px 0 36px; }
}
