/* Watch Party — theater lobby + schedule (extends watch theme) */
:root {
  --bg: #0b0d12;
  --panel: #161a24;
  --panel-2: #1c2230;
  --text: #e7e9ee;
  --muted: #97a0b3;
  --accent: #e11d48;
  --accent-2: #f59e0b;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(225, 29, 72, 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(245, 158, 11, 0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.party-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.party-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.party-topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-right: auto;
  text-decoration: none;
  color: inherit;
}

.party-topbar .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #9f1239);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
}

.party-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px;
}

.party-nav a:hover { color: var(--text); }

.party-hero {
  margin-bottom: 32px;
}

.party-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.party-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.rating-picker {
  margin-bottom: 32px;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.rating-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.rating-card:hover {
  border-color: rgba(225, 29, 72, 0.45);
  transform: translateY(-2px);
}

.rating-card-label {
  display: inline-flex;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(225, 29, 72, 0.15);
  color: #fda4af;
}

.rating-card strong {
  font-size: 1.1rem;
}

.rating-card-desc {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.rating-card-cta {
  font-size: 14px;
  color: var(--accent-2);
  font-weight: 600;
}

.rating-badge {
  margin-bottom: 8px;
}

.schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.schedule-title {
  margin: 8px 0 6px;
  font-size: 1.5rem;
}

.lobby-head {
  margin-bottom: 16px;
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.party-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.party-card-poster {
  aspect-ratio: 2/3;
  background: var(--panel-2);
  object-fit: cover;
  width: 100%;
}

.party-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.party-card-body h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.party-card-meta {
  color: var(--muted);
  font-size: 14px;
}

.party-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(225, 29, 72, 0.15);
  color: #fda4af;
}

.party-badge.live {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
}

.party-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.party-config-warn {
  padding: 14px 16px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 14px;
}

/* Lobby layout */
.lobby-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .lobby-layout { grid-template-columns: 1fr; }
}

.lobby-main {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.lobby-single {
  max-width: 720px;
}

.discord-cta {
  margin-top: 24px;
  display: inline-flex;
}

.lobby-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lobby-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.lobby-panel h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.lobby-poster-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.lobby-poster {
  width: 100px;
  border-radius: 10px;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--panel-2);
}

.lobby-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.lobby-start {
  color: var(--muted);
  font-size: 14px;
}

.countdown {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 16px 0 8px;
  color: var(--accent-2);
}

.countdown.done { color: #86efac; }

.lobby-status {
  color: var(--muted);
  font-size: 14px;
}

.name-gate {
  max-width: 420px;
  margin: 24px 0;
}

.name-gate label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.name-gate input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  margin-bottom: 12px;
}

.participant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.participant-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.participant-list li:last-child { border-bottom: none; }

.chat-log {
  height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}

.chat-msg {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-msg .author {
  font-weight: 700;
  color: var(--accent-2);
  margin-right: 6px;
}

.chat-msg .time {
  color: var(--muted);
  font-size: 11px;
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

/* Admin */
.admin-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.admin-form input,
.admin-form select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.search-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.search-hit.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.search-hit img {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel);
}

.admin-list {
  margin-top: 40px;
}

.admin-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-list th,
.admin-list td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.admin-list th { color: var(--muted); font-weight: 600; }

.share-box {
  padding: 12px;
  background: var(--panel-2);
  border-radius: 10px;
  word-break: break-all;
  font-size: 13px;
  margin-top: 8px;
}

.status-msg {
  font-size: 14px;
  margin-top: 8px;
}

.status-msg.error { color: #fca5a5; }
.status-msg.ok { color: #86efac; }
