* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #14151a;
  --panel: #1e2028;
  --border: #33363f;
  --text: #eceef3;
  --muted: #9aa0ae;
  --accent: #6c5ce7;
  --accent-hover: #7d6ff0;
  --danger: #e74c3c;
  --ok: #2ecc71;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.center-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

h1 {
  font-size: 1.6rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  width: 100%;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: 600;
  transition: background 0.15s;
}

button:hover {
  background: var(--accent-hover);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.secondary:hover {
  background: var(--panel);
  border-color: var(--muted);
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

a {
  color: var(--accent-hover);
}

/* ---- Room page ---- */

.room-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.room-header .room-name {
  font-weight: 600;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 26px;
  width: auto;
}

.logo-large {
  height: 56px;
  width: auto;
  align-self: center;
}

.videos {
  position: relative;
}

.stream-watermark {
  position: absolute;
  top: 26px;
  right: 30px;
  height: 44px;
  width: auto;
  z-index: 5;
  opacity: 0.92;
  pointer-events: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.status-pill {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}

.dot.live {
  background: var(--ok);
}

.dot.rec {
  background: var(--danger);
  animation: blink 1.2s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.videos {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  min-height: 0;
}

.videos.solo {
  grid-template-columns: 1fr;
}

.video-tile {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-tile .label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.video-tile .placeholder {
  color: var(--muted);
  position: absolute;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

/* ---- Recordings page ---- */

.recordings-list {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recording-row {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recording-row .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.recording-row .name {
  word-break: break-all;
  font-size: 0.95rem;
}
