:root {
  --brand: #bbcd02;
  --magenta: #e6007e;
  --cyan: #009fe3;
  --bg: #101010;
  --card: #1a1a1a;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --border: #2c2c2c;
  --err: #ff6b81;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Rubik, system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(230,0,126,.18), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(0,159,227,.12), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.wrap { width: min(840px, 92vw); margin: 0 auto; padding: 2rem 0 4rem; }
.top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.eyebrow { margin: 0; color: var(--brand); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: .35rem 0; font-size: 2rem; }
h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.sub { margin: 0; color: var(--muted); max-width: 42ch; }
.quota {
  background: rgba(187,205,2,.12); border: 1px solid rgba(187,205,2,.35);
  padding: .65rem .9rem; border-radius: 999px; white-space: nowrap; font-weight: 700;
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.25rem; margin-bottom: 1rem;
}
label { display: block; font-weight: 500; }
input[type=password], textarea {
  width: 100%; margin-top: .4rem; margin-bottom: 1rem;
  background: #111; color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: .75rem .9rem; font: inherit;
}
textarea { resize: vertical; min-height: 110px; }
.btn {
  appearance: none; border: 0; border-radius: 10px; padding: .75rem 1.1rem;
  background: var(--brand); color: #151515; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.drop {
  display: grid; place-items: center; gap: .35rem; text-align: center;
  border: 1.5px dashed #444; border-radius: 14px; padding: 2rem 1rem; cursor: pointer;
  background: rgba(255,255,255,.02);
}
.drop:hover { border-color: var(--brand); }
.drop strong { font-size: 1.05rem; }
.drop span { color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .9rem; }
.error { color: var(--err); }
.alert {
  background: rgba(230,0,126,.12); border: 1px solid rgba(230,0,126,.4);
  color: #ffd0e6; padding: .9rem 1rem; border-radius: 12px;
}
.progress { height: 10px; background: #2a2a2a; border-radius: 999px; overflow: hidden; margin-bottom: .75rem; }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--brand)); transition: width .25s ease; }
.log { list-style: none; margin: 1rem 0 0; padding: 0; max-height: 220px; overflow: auto; }
.log li { padding: .45rem 0; border-bottom: 1px solid #262626; font-size: .9rem; }
.log .ok { color: #b7e05a; }
.log .err { color: var(--err); }

.live { margin: 1.1rem 0 1rem; }
.live__name {
  margin: 0 0 .65rem; font-weight: 700; font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
}
.live__shot { margin: 0; }
.live__shot figcaption {
  margin: 0 0 .4rem; color: var(--muted); font-size: .78rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.live__frame {
  position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden;
  background: #0d0d0d; border: 1px solid var(--border);
}
.live__frame img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #0d0d0d;
}
.live__busy, .live__empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: .9rem; font-weight: 600;
  text-align: center; padding: 1rem;
}
.live__busy {
  background:
    linear-gradient(120deg, rgba(0,159,227,.35), rgba(230,0,126,.35), rgba(187,205,2,.25));
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}

.review {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(187,205,2,.35);
  background: rgba(187,205,2,.08);
}
.review__text { margin: 0 0 .75rem; font-weight: 600; }
.review__actions { display: flex; flex-wrap: wrap; gap: .55rem; }

.thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: .5rem; margin: .75rem 0 0; max-height: 220px; overflow: auto;
}
.thumbs button {
  appearance: none; border: 1px solid var(--border); border-radius: 10px;
  padding: 0; overflow: hidden; background: #111; cursor: pointer; aspect-ratio: 1;
}
.thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button.is-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

[hidden] { display: none !important; }
@media (max-width: 640px) {
  .top { flex-direction: column; }
  h1 { font-size: 1.55rem; }
  .live__grid { grid-template-columns: 1fr; }
}
