/* style.css */
:root {
  --bg: #0b0f19;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.14);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 30% -10%, rgba(120,80,255,0.25), transparent 60%),
  radial-gradient(900px 500px at 90% 0%, rgba(0,220,255,0.18), transparent 60%),
  var(--bg);
  color: var(--text);
}

/* Overlay login */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  padding: 24px;
}

.loginBox {
  width: min(420px, 92vw);
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(10, 12, 18, 0.85);
  box-shadow: 0 10px 50px rgba(0,0,0,0.45);
  text-align: center;
}

.loginBox h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
}

.loginBox p {
  margin: 0 0 16px 0;
  color: var(--muted);
}

.smallNote {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* Main layout */
.mainContent {
  padding: 18px 18px 28px;
}

.topBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  margin-bottom: 16px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.streamInfo {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.videoCol {
  flex: 1 1 auto;
  min-width: 420px;
}

.headline {
  margin: 0 0 6px;
  font-size: 22px;
}

.subtext {
  margin: 0 0 12px;
  color: var(--muted);
}

.playerCard {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 12px;
}

#videoPlayer {
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.6);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
}

.status {
  margin-top: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  min-height: 18px;
}

/* Chat */
.chatCol {
  width: 340px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

.chatHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  font-weight: 800;
}

.chatYou {
  font-weight: 600;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

.chatMessages {
  height: 420px;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chatLine {
  font-size: 14px;
  line-height: 1.25;
  word-break: break-word;
}

.chatTime { opacity: 0.55; margin-right: 6px; font-size: 12px; }
.chatName { font-weight: 800; margin-right: 6px; }
.chatText { opacity: 0.95; }

.chatForm {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}

.chatForm input {
  flex: 1;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: var(--text);
  outline: none;
}

.chatForm input:focus {
  border-color: rgba(160, 120, 255, 0.55);
}

.chatForm button {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.10);
  color: var(--text);
  cursor: pointer;
}

.chatForm button:hover {
  background: rgba(255,255,255,0.14);
}

/* Responsive */
@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .videoCol { min-width: 0; }
  .chatCol { width: 100%; }
  #videoPlayer { max-width: 100%; }
}