* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #111318;
  color: #e6e8ee;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, Consolas, monospace; color: #e6e8ee; word-break: break-all; }

.muted { color: #9aa1ad; }
.small { font-size: 12px; }
.live-text { color: #ff7a7e; }

/* ---------- botões ---------- */
.btn { border: 0; border-radius: 10px; padding: 8px 16px; min-height: 44px; font-size: 14px; font-weight: 600; color: #fff; }
.btn-live { background: #d93a3f; }
.btn-live:hover { background: #c22f34; }
.btn-ghost { background: transparent; color: #c9cdd6; border: 1px solid #2c313b; }
.btn-ghost:hover { background: #1d2129; }

/* ---------- tela de entrada ---------- */
.join { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.join-card { width: 100%; max-width: 380px; background: #1a1d24; border: 1px solid #2c313b; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.join-card h1 { margin: 0; font-size: 22px; }
.join-card p { margin: 0 0 8px; }
.join-card label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.join-card input { background: #111318; border: 1px solid #2c313b; border-radius: 10px; padding: 10px 12px; min-height: 44px; color: #e6e8ee; font-size: 14px; }
.join-card input:focus { outline: 2px solid #4f8cff; outline-offset: 1px; }
.join-card .hint { font-size: 12px; color: #9aa1ad; }
.join-card .btn { margin-top: 12px; }
.tabs { display: flex; gap: 4px; background: #111318; border: 1px solid #2c313b; border-radius: 10px; padding: 3px; margin: 4px 0 4px; }
.tab { flex: 1; border: 0; border-radius: 7px; padding: 8px 12px; min-height: 40px; font-size: 14px; font-weight: 600; color: #9aa1ad; background: transparent; }
.tab.active { background: #2f3542; color: #e6e8ee; }
.form-error { margin: 8px 0 0; font-size: 13px; color: #ffb1b4; }

/* ---------- sala ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #262a33; background: #15181e; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-title { font-size: 16px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }


.layout { display: flex; flex-wrap: wrap; flex: 1; }

.sidebar { flex: 1 1 240px; max-width: 100%; padding: 16px 12px; border-right: 1px solid #262a33; background: #15181e; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #9aa1ad; padding: 0 8px 10px; }
.member-list { display: flex; flex-direction: column; gap: 4px; }
.member { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-radius: 10px; padding: 8px; min-height: 52px; color: #e6e8ee; background: transparent; }
.member:hover { background: #1d2129; }
.member.selected { background: #262b36; }
.member[disabled] { cursor: default; }
.member[disabled]:hover { background: transparent; }
.avatar { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #111318; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; border: 2px solid #15181e; }
.member-text { display: flex; flex-direction: column; min-width: 0; }
.member-name { font-size: 14px; font-weight: 600; }
.member-status { font-size: 12px; color: #9aa1ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-status.live { color: #ff7a7e; }

.main { flex: 999 1 560px; min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.banner { background: #3a1d20; border: 1px solid #6b2a2f; color: #ffc9cb; border-radius: 12px; padding: 12px 14px; font-size: 13px; }

.panel { background: #1a1d24; border: 1px solid #2c313b; border-radius: 14px; padding: 16px 18px; }
.panel h2 { margin: 0 0 8px; font-size: 15px; }
.panel ol { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.8; color: #c9cdd6; }
.panel p { margin: 0; font-size: 13px; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.hint { font-size: 12px; color: #9aa1ad; }
.selectable { user-select: all; background: #111318; padding: 2px 6px; border-radius: 6px; }
.link-btn { border: 0; background: none; color: #8fb4ff; font-size: 13px; padding: 4px 6px; min-height: 32px; }
.link-btn:hover { color: #b9d0ff; text-decoration: underline; }
.btn-small { min-height: 38px; padding: 6px 12px; font-size: 13px; }

.badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #d93a3f; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }

.user-list { display: flex; flex-direction: column; gap: 6px; }
.user-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #111318; border: 1px solid #262a33; border-radius: 10px; }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.status { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.status.admin { background: #23304d; color: #b9d0ff; }
.status.ok { background: #1d3a2b; color: #9be7bd; }
.status.pending { background: #3d3220; color: #f6cf8d; }
.user-actions { display: flex; gap: 6px; }
.btn-approve { background: #2f8f5b; color: #fff; }
.btn-approve:hover { background: #277a4d; }
.btn-danger { background: transparent; color: #ffb1b4; border: 1px solid #6b2a2f; }
.btn-danger:hover { background: #3a1d20; }

/* ---------- players ---------- */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0a0b0e; border: 1px solid #262a33; border-radius: 14px; overflow: hidden; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6f7684; font-size: 14px; text-align: center; padding: 12px; z-index: 1; }
.player.focus { max-height: 72vh; }

/* área clicável que cobre a live inteira (abre / fecha o foco) */
.player-hit { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.player.focus .player-hit { cursor: zoom-out; }
.player-hit:focus-visible { outline: 3px solid #4f8cff; outline-offset: -3px; border-radius: 14px; }

/* "saltada" ao passar o mouse nas lives da grade e nas miniaturas */
.player.tile { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.player.tile:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); border-color: #3d4452; }
@media (prefers-reduced-motion: reduce) {
  .player.tile { transition: none; }
  .player.tile:hover { transform: none; }
}

.overlay-top { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.overlay-bottom { position: absolute; bottom: 10px; left: 12px; right: 10px; z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; pointer-events: none; }
.overlay-bottom .controls { pointer-events: auto; display: flex; align-items: flex-end; gap: 6px; }
.badge-live { background: #d93a3f; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 6px; }
.chip { background: rgba(0, 0, 0, 0.65); color: #e6e8ee; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 10px; color: #e6e8ee; background: rgba(0, 0, 0, 0.65); }
.icon-btn:hover { background: rgba(0, 0, 0, 0.85); }
.icon-btn:focus-visible { outline: 2px solid #4f8cff; outline-offset: 2px; }
.icon-btn svg { width: 22px; height: 22px; }

/* volume: ícone + barrinha vertical que aparece ao passar o mouse */
.volume { position: relative; }
.volume-pop { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 6px; display: none; }
.volume:hover .volume-pop, .volume:focus-within .volume-pop { display: block; }
.volume-track { background: rgba(0, 0, 0, 0.8); border-radius: 10px; padding: 12px 0; width: 44px; display: flex; justify-content: center; }
.volume-slider { writing-mode: vertical-lr; direction: rtl; width: 20px; height: 110px; margin: 0; accent-color: #e5484d; cursor: pointer; }

/* tela cheia */
.player:fullscreen { max-height: none; aspect-ratio: auto; width: 100%; height: 100%; border: 0; border-radius: 0; }
.player:fullscreen .player-hit { cursor: default; }
.player:fullscreen, .player:fullscreen:hover { transform: none; box-shadow: none; }

/* grade e faixa de miniaturas */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.player.small .quality { display: none; }
.player.small .chip { font-size: 11px; }

.empty { text-align: center; color: #9aa1ad; padding: 64px 20px; border: 1px dashed #2c313b; border-radius: 14px; }
.empty strong { display: block; color: #e6e8ee; font-size: 16px; margin-bottom: 6px; }
