:root {
  --accent1: #00d2c4;
  --accent2: #fe2c55;
  --ink: #16181d;
  --muted: #5c6270;
  --bg: #f6f7f9;
  --card: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
main { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }

.nav {
  background: var(--card);
  border-bottom: 1px solid #e8ebef;
  padding: 12px 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.logo img { display: block; }
.logo b { color: var(--accent2); font-weight: 800; }

.hero { text-align: center; padding: 28px 0 20px; }
h1 { font-size: 28px; line-height: 1.25; letter-spacing: -0.5px; }
.tagline { color: var(--muted); margin-top: 10px; }

.box { margin-top: 20px; }
.input-row {
  display: flex;
  background: var(--card);
  border: 2px solid #e3e6eb;
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.input-row:focus-within { border-color: var(--accent1); }
#url {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 15px 14px;
  font-size: 16px;
  min-width: 0;
}
.btn-paste {
  border: 0;
  background: #eef1f5;
  color: var(--ink);
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-paste:active { background: #e0e4ea; }
.btn-main {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: var(--radius);
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  cursor: pointer;
}
.btn-main:disabled { opacity: 0.6; cursor: wait; }
.error { color: var(--accent2); margin-top: 10px; text-align: center; }

.result {
  margin-top: 22px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 2px 10px rgba(20, 25, 40, 0.06);
}
.result .meta { display: flex; gap: 14px; align-items: center; }
.result .meta img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
  background: #eee;
}
.result .meta .title {
  font-size: 14px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result .meta .author { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dl-buttons { display: grid; gap: 10px; margin-top: 16px; }
.dl-btn {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 10px;
  border: 0;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent1);
  cursor: pointer;
  text-decoration: none;
}
.dl-btn.secondary { background: #3d4350; }
.dl-btn.mp3 { background: var(--accent2); }
.dl-btn:disabled { opacity: 0.6; cursor: wait; }
.imgs-title { margin-top: 16px; font-size: 14px; color: var(--muted); }
.imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.imgs figure img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; background: #eee; }
.imgs .dl-btn { padding: 8px; font-size: 13px; margin-top: 6px; }

.howto, .faq { margin-top: 40px; }
h2 { font-size: 20px; margin-bottom: 14px; }
.cols { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(20, 25, 40, 0.05);
}
.card h3 { font-size: 16px; margin-bottom: 8px; }
.card ol { padding-left: 20px; color: var(--muted); font-size: 14px; }
.card ol li { margin: 6px 0; }

.faq details {
  background: var(--card);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 8px;
}
.faq summary { font-weight: 600; cursor: pointer; font-size: 15px; }
.faq details p { color: var(--muted); font-size: 14px; margin-top: 8px; }

footer {
  margin-top: 44px;
  text-align: center;
  color: #9aa0ab;
  font-size: 12.5px;
  line-height: 1.7;
}

@media (max-width: 560px) {
  h1 { font-size: 23px; }
  .cols { grid-template-columns: 1fr; }
  .imgs { grid-template-columns: repeat(2, 1fr); }
}
