:root {
  --bg: #f6f7fb; --card: #ffffff; --text: #1b1f2a; --muted: #5d6475; --line: #e3e6ee;
  --brand: #1f5fbf; --brand-text: #ffffff; --accent: #f2b705; --error: #c62828; --tg: #2aabee;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c; --card: #1b202b; --text: #e9ecf3; --muted: #9aa3b5; --line: #2b3242;
    --brand: #4d8bf0; --brand-text: #0b1220; --accent: #f5c542; --error: #ff6b6b; --tg: #3bb5f2;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
.top { max-width: 720px; margin: 0 auto; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; }
.top-bot { color: var(--brand); text-decoration: none; font-weight: 600; }
.hero { text-align: center; padding: 32px 0 8px; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.field { display: flex; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: 16px; padding: 12px; outline: none; }
.field button, .options button, .tg-button, .file {
  border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-text);
  font-weight: 600; font-size: 16px; padding: 12px 18px; cursor: pointer; text-decoration: none; }
.field button:disabled { opacity: .6; cursor: default; }
.platforms { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 24px; }
.media { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.media img { width: 160px; max-width: 40%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--line); }
.title { font-weight: 600; margin: 0 0 4px; overflow-wrap: anywhere; }
.muted { color: var(--muted); margin: 0; }
.status { margin: 8px 0; }
.status.error { color: var(--error); }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options button.audio { background: transparent; color: var(--text); border: 1px solid var(--line); }
.bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 12px 0; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.file { display: inline-block; margin-top: 8px; background: var(--accent); color: #1b1f2a; }
.again { margin-top: 12px; background: transparent; border: 0; color: var(--brand); font-size: 15px; cursor: pointer; padding: 0; display: block; }
.tg { text-align: center; margin-top: 40px; padding: 24px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.tg h2 { margin: 0 0 8px; font-size: 22px; }
.tg p { color: var(--muted); margin: 0 0 16px; }
.tg-button { display: inline-block; background: var(--tg); color: #fff; }
footer { max-width: 720px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 14px; text-align: center; }
@media (max-width: 480px) {
  .field { flex-direction: column; }
  .media { flex-direction: column; align-items: stretch; }
  .media img { width: 100%; max-width: none; }
  .options button { flex: 1 1 100%; }
}
.logo { color: var(--text); text-decoration: none; }
.text { margin-top: 32px; }
.text h2 { font-size: 22px; margin: 28px 0 10px; }
.text h3 { font-size: 17px; margin: 18px 0 6px; }
.text p, .text li { color: var(--text); }
.text a, .more a { color: var(--brand); }
.text table { width: 100%; border-collapse: collapse; font-size: 15px; }
.text th, .text td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.text code { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; font-size: 14px; }
.more { margin-top: 32px; }
.more h2 { font-size: 18px; margin: 20px 0 8px; }
.more ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
