:root {
  --ink: #16150F;
  --ink-2: #1F1D16;
  --ink-3: #2A2720;
  --line: #34302A;
  --gold: #F5B82E;
  --gold-ink: #15110A;
  --grad: linear-gradient(135deg, #F3CB62 0%, #E2A920 55%, #C98E14 100%);
  --text: #F4F1E8;
  --muted: #A6A193;
  --red: #E5484D;
  --ok: #3DD68C;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--text); font-family: Montserrat, system-ui, -apple-system, sans-serif; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--gold); }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.top img { height: 38px; }
.top nav { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.top nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); }
.estado-conexion { font-size: 12px; color: var(--muted); }

main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 20px; max-width: 1500px; margin: 0 auto; }
@media (max-width: 960px) { main { grid-template-columns: 1fr; } }

.escena { position: relative; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.escena video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cuenta { position: absolute; inset: 0; display: grid; place-items: center; font-size: 160px; font-weight: 700; background: rgba(10, 9, 6, .55); color: var(--gold); }
.barra-grabando { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; }
.punto { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 77, .25); animation: latir 1.2s infinite; }
.pausado .punto { background: var(--gold); animation: none; box-shadow: none; }
@keyframes latir { 50% { opacity: .35; } }
.tiempo { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; min-width: 70px; }
.espacio { flex: 1; }

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; align-self: start; }
.panel h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--grad); color: var(--gold-ink); }
.esquinas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 120px; aspect-ratio: 16 / 10; padding: 6px; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.esquinas button { border: 1px dashed var(--line); background: transparent; border-radius: 6px; cursor: pointer; }
.esquinas button[aria-pressed="true"] { background: var(--grad); border-style: solid; border-color: transparent; }
.fila { display: flex; gap: 14px; align-items: flex-start; }
select { width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
label.chk { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
label.chk input { width: 18px; height: 18px; accent-color: var(--gold); }
.nivel { height: 6px; background: var(--ink); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.nivel i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .08s; }
.foto-fila { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.foto-fila img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }

.btn { border: 1px solid var(--line); background: var(--ink-3); border-radius: 12px; padding: 11px 16px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.oro { background: var(--grad); color: var(--gold-ink); border-color: transparent; }
.btn.rojo { background: var(--red); border-color: transparent; color: #fff; }
.btn.grande { padding: 15px 18px; font-size: 16px; width: 100%; }
.btn.fantasma { background: transparent; }
.aviso { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 0; }
.error { background: #3a1517; border: 1px solid #6b2427; color: #ffb4b6; padding: 10px 12px; border-radius: 10px; font-size: 13px; }

.revision { display: grid; gap: 12px; }
.revision input[type=text] { width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.progreso { height: 8px; background: var(--ink); border-radius: 99px; overflow: hidden; }
.progreso i { display: block; height: 100%; width: 0; background: var(--grad); }
.enlace { display: flex; gap: 8px; }
.enlace input { flex: 1; min-width: 0; background: var(--ink); border: 1px solid var(--gold); border-radius: 10px; padding: 11px 12px; color: var(--gold); }
.botones { display: flex; gap: 8px; flex-wrap: wrap; }

dialog { background: var(--ink-2); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(380px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog input { width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin: 10px 0 14px; }

/* Mis grabaciones */
.lista { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.lista-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lista-cab h1 { margin: 0; font-size: 24px; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tarjeta { background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tarjeta .mini { aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; position: relative; display: block; }
.tarjeta .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .75); font-size: 12px; padding: 3px 7px; border-radius: 6px; color: #fff; }
.tarjeta .info { padding: 12px; display: grid; gap: 4px; flex: 1; }
.tarjeta .t { font-weight: 700; font-size: 15px; }
.tarjeta .s { font-size: 12.5px; color: var(--muted); }
.tarjeta .acciones { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.tarjeta .acciones .btn { padding: 8px 10px; font-size: 13px; }
