* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f1220;
  --card: #1a1f33;
  --accent: #6c5ce7;
  --accent2: #a29bfe;
  --text: #e8eaf2;
  --sub: #9aa0b8;
  --ok: #00b894;
  --border: #2a3050;
}
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #26305a 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  text-align: center;
  padding: 40px 16px 10px;
}
.logo { font-size: 34px; font-weight: 800; letter-spacing: -0.5px;
        display: inline-flex; align-items: center; gap: 10px; justify-content: center; }

/* Inline SVG icons */
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: -0.18em; flex-shrink: 0; }
.logo-ic { width: 1em; height: 1em; }
.brand-ic { width: 22px; height: 22px; }
.tag { color: var(--sub); margin-top: 6px; font-size: 14px; }
main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.input-row { display: flex; gap: 8px; margin-bottom: 12px; }
#url {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #10152b;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
#url:focus { border-color: var(--accent); }
#pasteBtn {
  width: 52px;
  border: 1px solid var(--border);
  background: #10152b;
  border-radius: 12px;
  color: var(--sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#pasteBtn .ic { width: 20px; height: 20px; }
button.primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, opacity .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button.primary .ic { width: 18px; height: 18px; }
button.primary:hover { transform: translateY(-1px); }
button.primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.msg { margin-top: 10px; font-size: 14px; min-height: 18px; }
.msg.err { color: #ff7675; }
.msg.info { color: var(--accent2); }
.hidden { display: none !important; }
.preview-top { display: flex; gap: 14px; margin-bottom: 16px; }
#thumb {
  width: 130px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: #10152b;
  flex-shrink: 0;
}
.meta h3 { font-size: 16px; line-height: 1.35; }
.sub { color: var(--sub); font-size: 13px; margin-top: 4px; }
.lbl { display: block; font-size: 13px; color: var(--sub); margin: 6px 0; }
#quality {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #10152b;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 15px;
  margin-bottom: 14px;
}
.bar {
  height: 10px;
  background: #10152b;
  border-radius: 20px;
  overflow: hidden;
  margin: 16px 0 8px;
}
#barFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .3s;
}
#barFill.pulse {
  width: 40% !important;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
  background-size: 200% 100%;
  animation: slide 1.2s linear infinite;
}
@keyframes slide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.save-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  margin-top: 14px;
  padding: 14px;
  background: var(--ok);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}
.save-link .ic { width: 18px; height: 18px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.chips span, .chips a.chip-link {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--sub);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chips .ic { width: 15px; height: 15px; }
.chips a.chip-link:hover { color: var(--text); border-color: var(--accent); }

/* Top nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(16,21,43,0.6);
}
.topnav .brand { font-weight: 800; color: var(--text); text-decoration: none; font-size: 18px;
  display: inline-flex; align-items: center; gap: 8px; }
.topnav .navlinks { display: flex; gap: 6px; flex-wrap: wrap; }
.topnav .navlinks a {
  color: var(--sub);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topnav .navlinks .ic { width: 15px; height: 15px; }
.topnav .navlinks a:hover { color: var(--text); background: var(--card); }

/* SEO content */
.seo { margin-top: 8px; padding: 0 4px; }
.seo .intro { color: var(--sub); font-size: 15px; line-height: 1.6; margin-bottom: 24px; text-align: center; }
.seo h2 { font-size: 19px; margin: 26px 0 12px; }
.seo ol.steps { padding-left: 20px; color: var(--text); }
.seo ol.steps li { margin: 8px 0; line-height: 1.5; }
.seo .faqs details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.seo .faqs summary { cursor: pointer; font-weight: 600; }
.seo .faqs details p { color: var(--sub); margin-top: 10px; line-height: 1.55; }
footer {
  text-align: center;
  padding: 20px;
  color: var(--sub);
  font-size: 12px;
}
