:root {
  --bg: #0b1020;
  --bg2: #111832;
  --card: #161f3d;
  --card2: #1c2650;
  --line: rgba(255,255,255,.09);
  --text: #eef2ff;
  --muted: #a5b0d0;
  --accent: #6366f1;
  --accent2: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, #2b3a8f 0%, transparent 60%),
              radial-gradient(1000px 500px at 90% 0%, #0e7490 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11,16,32,.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-size: 22px; box-shadow: 0 8px 30px rgba(99,102,241,.45);
}
.brand small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 10px; align-items: center; }
.pill {
  font-size: 13px; color: var(--muted); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.04);
}

/* ---------- HERO ---------- */
.hero { padding: 56px 0 30px; text-align: center; }
.hero.slim { padding: 34px 0 8px; }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px); line-height: 1.02; margin: 18px 0 14px;
  letter-spacing: -.04em;
}
.hero h1 span { background: linear-gradient(90deg, #a5b4fc, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: clamp(16px, 2.4vw, 19px); max-width: 760px; margin: 0 auto; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; color: #cbd5e1;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

/* ---------- CARDS ---------- */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 30px 0 22px; }
@media (max-width: 860px) { .panels { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-align: left;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.card h2 { margin: 0 0 6px; font-size: 22px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input[type=text] {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #0d1430; color: var(--text);
  font-size: 16px; outline: none;
}
input[type=text]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
input.code { text-transform: uppercase; letter-spacing: .25em; font-weight: 800; text-align: center; }
.row { display: flex; gap: 10px; margin-top: 14px; }
.btn {
  appearance: none; border: 0; cursor: pointer; font-weight: 700; font-size: 15px;
  padding: 13px 18px; border-radius: 12px; color: white;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: 0 10px 30px rgba(99,102,241,.4);
  transition: transform .08s ease, filter .15s ease;
  width: 100%;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn.secondary { background: linear-gradient(135deg, #0891b2, #22d3ee); box-shadow: 0 10px 30px rgba(34,211,238,.3); }
.btn.ghost { background: rgba(255,255,255,.07); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: linear-gradient(135deg, #dc2626, #f97316); box-shadow: 0 10px 30px rgba(239,68,68,.3); }
.btn.small { width: auto; padding: 9px 14px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- FEATURES ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 40px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feat { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.feat .icon { font-size: 24px; }
.feat h3 { margin: 10px 0 6px; font-size: 16px; }
.feat p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 50px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px dashed rgba(255,255,255,.18); border-radius: 16px; padding: 18px; background: rgba(255,255,255,.02); }
.step b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-bottom: 8px; }
.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 26px 0 40px; border-top: 1px solid var(--line); }

/* ---------- SALA ---------- */
.room-top {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 14px 0; flex-wrap: wrap;
}
.room-code {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 14px;
}
.room-code .code { font-size: 24px; font-weight: 900; letter-spacing: .2em; }
.status { font-size: 13px; color: var(--muted); }
.status.online { color: #86efac; }
.room-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; padding-bottom: 18px; }
@media (max-width: 980px) { .room-layout { grid-template-columns: 1fr; } }
.stage {
  background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; min-height: 420px;
}
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.video-card {
  position: relative; background: #050816; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; min-height: 200px;
}
.video-card video { width: 100%; height: 260px; object-fit: contain; background: #000; display: block; }
.video-wrap { position: relative; background: #000; }
.sound-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); cursor: pointer; border: 0; width: 100%; padding: 0;
}
.sound-overlay span {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff; font-weight: 800; font-size: 15px;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(99,102,241,.5);
}
/* ---------- FULLSCREEN (ocupa a tela toda) ---------- */
.video-card:fullscreen, .video-card:-webkit-full-screen {
  width: 100%; height: 100%;
  border: 0; border-radius: 0; margin: 0;
  background: #000;
  display: flex; flex-direction: column; justify-content: center;
}
.video-card:fullscreen .video-wrap, .video-card:-webkit-full-screen .video-wrap {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
}
.video-card:fullscreen video, .video-card:-webkit-full-screen video {
  width: 100vw; height: calc(100vh - 52px); max-height: none;
  object-fit: contain; background: #000;
}
.video-card:fullscreen .meta, .video-card:-webkit-full-screen .meta {
  background: #000; border-top: 1px solid var(--line);
}
/* ---------- responsivo sem sobreposição ---------- */
.room-top { gap: 10px; }
.room-code { flex-wrap: wrap; row-gap: 8px; }
.controls .btn { min-width: 220px; }
.chat-input input[type=text] { min-width: 0; }
#messages { min-height: 120px; }
@media (max-width: 560px) {
  .videos { grid-template-columns: 1fr; }
  .video-card video { height: 220px; }
  .room-code .code { font-size: 20px; }
  .controls .btn { width: 100%; }
}
.video-card .meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; font-size: 13px; gap: 8px;
}
.tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.tag.live { background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.4); color: #86efac; }
.tag.you { background: rgba(99,102,241,.2); border-color: rgba(99,102,241,.5); color: #c7d2fe; }
.video-actions { display: flex; gap: 6px; }
.mini-btn { border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; }
.empty {
  border: 1px dashed rgba(255,255,255,.2); border-radius: 14px; padding: 40px 20px; text-align: center; color: var(--muted);
  grid-column: 1 / -1;
}
.controls { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.side { display: flex; flex-direction: column; gap: 14px; }
.panel { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 15px; }
#participants { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
#participants li { display: flex; justify-content: space-between; align-items: center; font-size: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 8px 10px; border-radius: 10px; }
#chat { display: flex; flex-direction: column; height: 380px; }
#messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.msg { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.msg b { display: block; font-size: 12px; color: #c7d2fe; margin-bottom: 2px; }
.msg time { font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.msg.mine { background: rgba(99,102,241,.18); border-color: rgba(99,102,241,.4); }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.alert { border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.12); color: #fde68a; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #0f172a; border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); display: none; z-index: 50; font-size: 14px;
}
