@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #12141c;
  --surface: #1b1e29;
  --text: #edeae3;
  --text-muted: #8b8fa3;
  --accent: #e8a33d;
  --border: #2a2e3d;
  --danger: #d9737e;
  --radius: 6px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a {
  color: inherit;
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Login / booth ---------- */

.booth {
  margin: auto;
  width: 100%;
  max-width: 380px;
  padding: 48px 24px;
  text-align: center;
}

.booth__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.5rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.booth__subtitle {
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.seats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 24px;
}

.seat {
  position: relative;
  flex: 1;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 22px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.seat::before,
.seat::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--bg);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.seat::before {
  left: -9px;
}
.seat::after {
  right: -9px;
}

.seat:hover {
  border-color: var(--accent);
}

.seat--active {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.password-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.password-form input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  width: 100%;
}

.password-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.password-form button {
  margin-top: 4px;
  background: var(--accent);
  color: #201405;
  border: none;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.password-form button:hover {
  filter: brightness(1.05);
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

/* ---------- Now showing / video list ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.topbar__logout {
  color: var(--text-muted);
  text-decoration: none;
}
.topbar__logout:hover {
  color: var(--text);
}

.marquee {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.marquee__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 32px;
}

.listing-group {
  display: flex;
  flex-direction: column;
}

.listing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.listing:first-child {
  border-top: 1px solid var(--border);
}

.listing__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

.listing__cue {
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.listing:hover .listing__cue {
  opacity: 1;
}
.listing:hover {
  color: var(--accent);
}

.empty {
  color: var(--text-muted);
}

/* ---------- Watch page ---------- */

.stage--dark {
  background: #05060a;
  height: 100vh;
  overflow: hidden;
}

.watch-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.watch-bar__back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.watch-bar__back:hover {
  color: var(--text);
}

.watch-bar__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
  flex: 1;
}

.presence {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

.presence--together {
  color: var(--accent);
  border-color: var(--accent);
}

.room {
  flex: 1;
  display: flex;
  min-height: 0;
}

.screen {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-width: 0;
}

#player {
  width: 100%;
  max-width: 1100px;
  max-height: 80vh;
  background: #000;
  border-radius: 4px;
}

.resume-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: #201405;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

/* ---------- Chat ---------- */

.chat {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--border);
  padding: 16px;
}

.chat__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 12px;
}

.chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-bottom: 12px;
}

.chat__empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.chat-message {
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-message__from {
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
}

.chat-message--own .chat-message__from {
  color: var(--text-muted);
}

.chat-message__text {
  color: var(--text);
  overflow-wrap: anywhere;
}

.chat__form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.chat__form input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.chat__form input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat__form button {
  background: var(--accent);
  color: #201405;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.chat__form button:hover {
  filter: brightness(1.05);
}

@media (max-width: 860px) {
  .room {
    flex-direction: column;
  }
  .chat {
    width: 100%;
    max-height: 38vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  #player {
    max-height: 45vh;
  }
}

@media (max-width: 480px) {
  .seats {
    flex-direction: column;
  }
  .seat::before,
  .seat::after {
    display: none;
  }
}
