:root {
  --bg: #0b1220;
  --card: #121a2b;
  --line: #243049;
  --text: #e8eef8;
  --muted: #93a0b8;
  --blue: #1e88e5;
  --blue-d: #1565c0;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Be Vietnam Pro", system-ui, sans-serif; }
body { min-height: 100vh; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #0e1626;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand strong { display: block; font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; }
.mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--blue);
  clip-path: polygon(38% 28%, 78% 50%, 38% 72%);
  background-image: linear-gradient(135deg, #42a5f5, #1565c0);
}
.pill {
  font-size: 12px; font-weight: 600; color: #bbdefb;
  border: 1px solid #1e3a5f; background: #10233d;
  padding: 5px 10px; border-radius: 999px;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 28px 18px 64px; }
h1 { font-size: 1.55rem; margin: 0 0 8px; letter-spacing: -0.03em; }
.lead { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.quota { margin: 0 0 22px; color: #90caf9; font-size: 13px; line-height: 1.45; }
.quota.is-low { color: #ffab91; }
.token-box {
  margin: 16px 0 0; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #101828; color: var(--muted);
  font-size: 12px; line-height: 1.5;
}
.token-box summary { cursor: pointer; font-weight: 700; color: #bbdefb; }
.token-box a { color: #90caf9; }
.token-box input {
  margin-top: 8px; width: 100%; font: inherit; color: var(--text);
  background: #0b1220; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px;
}
.check {
  display: flex; gap: 8px; align-items: flex-start; font-size: 12px;
  color: #bbdefb; font-weight: 500; cursor: pointer;
}
.check input { margin-top: 2px; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1; border: 1px solid var(--line); background: #101828;
  color: var(--muted); font: inherit; font-weight: 700; font-size: 13px;
  padding: 10px; border-radius: 10px; cursor: pointer;
}
.tab.is-on { background: #17345a; color: #fff; border-color: #2b6cb0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.panel[hidden] { display: none !important; }

label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
textarea, input[type="range"] { width: 100%; }
textarea {
  font: inherit; color: var(--text); background: #0b1220;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical;
}
.row b { color: #90caf9; font-size: 13px; }

.drop {
  min-height: 160px; border: 1px dashed #3d5273; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; background: #0d1524; text-align: center;
}
.drop.is-on { border-color: #42a5f5; }
#preview { max-height: 180px; max-width: 100%; border-radius: 8px; }

.go {
  border: 0; border-radius: 11px; padding: 12px 16px;
  background: var(--blue); color: #fff; font: inherit; font-weight: 800;
  cursor: pointer;
}
.go:hover { background: var(--blue-d); }
.go:disabled { opacity: 0.55; cursor: wait; }

.result { margin-top: 18px; }
.status { color: #bbdefb; font-size: 13px; }
video { width: 100%; border-radius: 12px; background: #000; margin-top: 8px; }
.dl {
  display: inline-block; margin-top: 10px; color: #90caf9; font-weight: 700;
  text-decoration: none; font-size: 13px;
}
.err { color: #ffab91; }
