:root {
  --bg: #0b1020;
  --card: #141b34;
  --card-2: #1a2342;
  --text: #e8ecf8;
  --muted: #9aa6c7;
  --line: #27315a;
  --accent: #5b7cff;
  --accent-2: #19d3a2;
  --warn: #ffd400;
  --danger: #ff6b6b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1b2a6b55, transparent), var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
}
.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 0 0 12px; }
.mt { margin-top: 24px; }
.hl { color: var(--accent-2); }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.warn { color: var(--warn); }
[hidden] { display: none !important; }

.top { border-bottom: 1px solid var(--line); background: #0b1020cc; backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: .3px; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.email { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.badge { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding: 48px 0 24px; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li::before { content: "✓"; color: var(--accent-2); font-weight: 800; margin-right: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.auth { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input[type=email], input[type=password], select {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #0e1530; color: var(--text); font-size: 16px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: none; color: var(--text);
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #7a5bff); color: #fff; }
.btn.ghost { border-color: var(--line); background: transparent; }
.btn.big { width: 100%; padding: 16px; font-size: 18px; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.msg { margin: 0; min-height: 20px; font-size: 14px; color: var(--muted); }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--accent-2); }

.status-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar { height: 10px; background: #0e1530; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s; }

.drop {
  display: grid; gap: 6px; place-items: center; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 32px 16px; background: #0e153066; color: var(--text);
}
.drop:hover { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-title { font-weight: 700; font-size: 18px; word-break: break-word; }

.grid-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid-opts { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; color: var(--text); font-size: 15px; }
.check input { margin-top: 4px; width: 18px; height: 18px; }

.banner { border-radius: 10px; padding: 12px 14px; margin-top: 12px; font-size: 15px; border: 1px solid; }
.banner.info { background: #5b7cff1a; border-color: #5b7cff66; }
.banner.error { background: #ff6b6b1a; border-color: #ff6b6b88; }

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.clip { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; }
.clip video { width: 100%; aspect-ratio: 9 / 16; background: #000; display: block; }
.clip .meta { padding: 12px; display: grid; gap: 8px; }
.clip .snippet { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.plans-section { padding: 40px 0 24px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-content: start; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan .price { font-size: 34px; font-weight: 800; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 15px; }
.plan li::before { content: "✓"; color: var(--accent-2); margin-right: 8px; font-weight: 800; }
.plan .current { text-align: center; color: var(--accent-2); font-weight: 700; }

.foot { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card-2);
  border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; z-index: 20; max-width: 90vw;
}
