:root {
  --bg: #070913;
  --bg-elev: #0e1324;
  --bg-card: #131a30;
  --border: rgba(255, 255, 255, 0.10);
  --border-hi: rgba(244, 63, 94, 0.55);
  --accent: #f43f5e;
  --accent-2: #6366f1;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --text: #f8fafc;
  --muted: #94a3b8;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: radial-gradient(circle at 18% 0%, rgba(244, 63, 94, 0.14), transparent 42%),
              radial-gradient(circle at 82% 8%, rgba(99, 102, 241, 0.16), transparent 45%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  padding: 24px 18px 56px;
}

.container { max-width: 1260px; margin: 0 auto; }

.hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: #cbd5e1;
}
.pill.hot { background: rgba(244,63,94,0.16); border-color: rgba(244,63,94,0.45); color: #fda4af; }
.pill.cyan { background: rgba(56,189,248,0.14); border-color: rgba(56,189,248,0.40); color: #7dd3fc; }

h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.subtitle { color: var(--muted); font-size: 14px; max-width: 780px; margin-top: 6px; }
.subtitle a { color: var(--cyan); text-decoration: none; }
.subtitle a:hover { text-decoration: underline; }

.token-box {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; min-width: 290px;
}
.token-box label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.token-box input {
  width: 100%; background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 10px; color: var(--text); font-size: 12.5px; font-family: var(--mono);
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab-btn {
  background: var(--bg-elev); color: var(--muted); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: all 0.16s ease;
}
.tab-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.tab-btn.active {
  background: linear-gradient(135deg, rgba(244,63,94,0.22), rgba(99,102,241,0.22));
  color: #fff; border-color: var(--border-hi);
  box-shadow: 0 8px 24px rgba(244,63,94,0.16);
}

.grid-2 { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 20px; align-items: start; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }

.field { margin-bottom: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: #cbd5e1; margin-bottom: 6px; }
.field label span.hint { color: var(--muted); font-weight: 400; font-family: var(--mono); font-size: 11px; }

textarea, select, input[type="text"], input[type="number"] {
  width: 100%; background: rgba(6, 9, 18, 0.72); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 13px;
  font-family: inherit; transition: border-color 0.15s;
}
textarea:focus, select:focus, input:focus { outline: none; border-color: var(--cyan); }
textarea { min-height: 118px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.45; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .row-2, .row-3 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  font-size: 11.5px; font-family: var(--mono); padding: 4px 9px; border-radius: 7px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #e2e8f0;
  cursor: pointer; transition: all 0.14s;
}
.chip:hover { background: rgba(56,189,248,0.18); border-color: var(--cyan); color: #fff; }

.dlg-bar {
  display: flex; gap: 8px; background: rgba(244,63,94,0.08); border: 1px solid rgba(244,63,94,0.28);
  padding: 9px; border-radius: 10px; margin-bottom: 14px; align-items: center;
}
.dlg-bar select { width: 92px; flex-shrink: 0; }
.dlg-bar input { flex: 1; }

.btn-primary {
  width: 100%; padding: 13px 18px; border-radius: 11px; border: none;
  background: linear-gradient(135deg, #f43f5e, #6366f1); color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 10px 28px rgba(244,63,94,0.30); transition: transform 0.12s, opacity 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); opacity: 0.96; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-sec {
  padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.07); color: var(--text); font-size: 12px;
  font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-sec:hover { border-color: var(--cyan); background: rgba(56,189,248,0.15); }

.video-stage {
  background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; position: relative;
}
.video-stage video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }

.status-log {
  margin-top: 12px; padding: 10px 12px; border-radius: 9px;
  background: rgba(0,0,0,0.45); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; color: #93c5fd; min-height: 42px; white-space: pre-wrap;
}

.preset-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.code-block {
  background: #05070e; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-family: var(--mono); font-size: 12px; color: #a5f3fc;
  overflow-x: auto; white-space: pre; line-height: 1.55;
}

.hidden { display: none !important; }
