:root {
  --bg: #0b1220;
  --panel: #111a2a;
  --ink: #e9eef8;
  --muted: #9fb0cf;
  --accent: #32c48d;
  --warn: #ffc857;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: radial-gradient(circle at 10% 10%, #1d2a45, var(--bg));
  color: var(--ink);
}
.wrap {
  width: min(100vw, 1920px);
  max-width: none;
  margin: 0 auto;
  padding: 8px clamp(8px, 1.1vw, 18px) 14px;
}
h1 { margin: 6px 0 4px; font-size: clamp(1.4rem, 2.8vw, 2.2rem); }
.sub { color: var(--muted); }
.panel {
  background: color-mix(in srgb, var(--panel) 92%, #000);
  border: 1px solid #2a3958;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
label { color: var(--muted); font-size: 13px; }
input, select, button {
  border-radius: 8px;
  border: 1px solid #34496e;
  background: #0f1727;
  color: var(--ink);
  padding: 10px;
  min-height: 42px;
}
button#btnStart {
  background: linear-gradient(120deg, #21a176, #2cc8a1);
  color: #04110d;
  border-color: #2cc8a1;
  font-weight: 700;
}
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.hint-wrap { position: relative; display: inline-flex; }
.hint-wrap > :is(button, select, input, label) { width: 100%; }
.hint-wrap[data-hint]::after {
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  width: max-content;
  max-width: min(320px, 75vw);
  background: #071022;
  color: #e9eef8;
  border: 1px solid #37507d;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 30;
  text-align: center;
}
.hint-wrap[data-hint]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: #071022;
  border-right: 1px solid #37507d;
  border-bottom: 1px solid #37507d;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
  z-index: 29;
}
.hint-wrap:hover::after,
.hint-wrap:hover::before,
.hint-wrap:focus-within::after,
.hint-wrap:focus-within::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
details {
  border: 1px solid #25324d;
  border-radius: 8px;
  padding: 10px;
  background: #0a101b;
}
details summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 8px;
}
.advanced-field {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
#log {
  margin: 0;
  background: #0a101b;
  border: 1px solid #25324d;
  border-radius: 8px;
  min-height: 120px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  color: var(--warn);
  font-size: 12px;
}
.videos { margin-top: 6px; display: grid; gap: 10px; }
video {
  width: 100%;
  min-height: 36vh;
  border-radius: 10px;
  border: 1px solid #2a3958;
  background: #060a12;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
@media (min-width: 900px) {
  .videos { grid-template-columns: 1fr 1fr; }
  video { min-height: 48vh; }
}
@media (max-width: 700px) {
  .wrap { padding-left: 8px; padding-right: 8px; }
  .hint-wrap[data-hint]::after { max-width: 88vw; }
}
