:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #151515;
  --panel-strong: #242424;
  --text: #f5f5f1;
  --muted: #b3b3b3;
  --line: #2f2f2f;
  --accent: #e50914;
  --accent-soft: #2a0d10;
  --danger: #ff5c5c;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 20% 8%, rgba(229, 9, 20, 0.16), transparent 28%),
    linear-gradient(135deg, #050505 0%, #111111 52%, #080808 100%);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: rgba(8, 8, 8, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 28px;
}

.brand {
  color: var(--accent);
  font-size: 23px;
  font-weight: 800;
}

.nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.nav form {
  margin: 0;
}

.page {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 36px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
}

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

.section-heading,
.watch-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.auth-screen {
  align-items: center;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 430px);
  min-height: calc(100vh - 132px);
}

.auth-screen.compact-auth {
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 430px);
}

.auth-intro {
  max-width: 640px;
}

.auth-intro h1 {
  color: var(--text);
  font-size: 56px;
  line-height: 1.05;
  margin-bottom: 18px;
}

.brand-mark {
  align-items: baseline;
  color: #e50914;
  direction: ltr;
  display: flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(128px, 22vw, 260px);
  font-weight: 900;
  justify-content: center;
  letter-spacing: -8px;
  line-height: 0.82;
  margin: 0 auto 18px;
  max-width: 100%;
  text-align: center;
  text-shadow:
    0 3px 0 #7a0208,
    0 16px 42px rgba(229, 9, 20, 0.34);
  white-space: nowrap;
}

.brand-mark span {
  background: linear-gradient(180deg, #ff2630 0%, #e50914 58%, #9f050c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark em {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.42em;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0.12em;
  text-shadow:
    0 2px 0 #7a0208,
    0 0 28px rgba(229, 9, 20, 0.55);
  transform: translateY(-0.12em) rotate(-8deg);
}

.platform-name {
  color: var(--muted);
  direction: ltr;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  text-align: center;
}

.auth-intro p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.auth-card,
.movie-card,
.empty-state,
.share-panel {
  background: rgba(21, 21, 21, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.auth-card {
  padding: 30px;
}

.auth-card h2 {
  font-size: 29px;
  margin-bottom: 22px;
}

.auth-card .muted {
  margin: 18px 0 0;
}

.auth-card a {
  color: var(--accent);
  font-weight: 800;
}

.form,
.wide-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 8px;
}

input {
  background: #0f0f0f;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  width: 100%;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(229, 9, 20, 0.18);
}

button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  padding: 12px 18px;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

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

.link-button {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.flash {
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(35, 49, 42, 0.18);
  padding: 14px 16px;
  transition: opacity 420ms ease, transform 420ms ease;
}

.toast-stack {
  display: grid;
  gap: 10px;
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  position: fixed;
  top: 84px;
  transform: translateX(-50%);
  width: max-content;
  z-index: 1000;
}

.flash.error {
  background: #2a0d10;
  color: #ffb7bc;
}

.flash.success {
  background: #112416;
  color: #9ef0af;
}

.flash.love {
  background: #21070a;
  border: 1px solid #7a151c;
  color: #ffd7db;
  font-weight: 800;
}

.flash-hide {
  opacity: 0;
  transform: translateY(-6px);
}

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

.rooms-section {
  margin-bottom: 34px;
}

.section-subhead {
  margin: 0 0 16px;
}

.section-subhead h2 {
  font-size: 24px;
  margin-bottom: 0;
}

.room-list {
  display: grid;
  gap: 12px;
}

.room-card {
  align-items: center;
  background: rgba(21, 21, 21, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.room-card h3 {
  font-size: 20px;
  margin: 0 0 6px;
}

.room-card p {
  color: var(--muted);
  margin: 0;
}

.movie-card,
.empty-state,
.share-panel {
  padding: 20px;
}

.movie-card {
  display: grid;
  gap: 18px;
}

.movie-card p {
  color: var(--muted);
}

.share-panel {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-bottom: 18px;
}

.player-shell video {
  aspect-ratio: 16 / 9;
  background: #111111;
  border-radius: 8px;
  display: block;
  width: 100%;
}

.sync-button {
  margin-top: 12px;
}

.info-panel {
  background: rgba(21, 21, 21, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding: 20px;
}

.info-panel span {
  background: var(--accent-soft);
  border: 1px solid #5c1117;
  border-radius: 8px;
  color: #ffd7db;
  padding: 10px 12px;
}

.import-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.import-row {
  align-items: center;
  background: rgba(21, 21, 21, 0.94);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  padding: 12px 14px;
}

.import-row:last-child {
  border-bottom: 0;
}

.import-row input {
  width: auto;
}

.import-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-row strong {
  color: var(--muted);
  direction: ltr;
  font-size: 14px;
}

@media (max-width: 720px) {
  .topbar,
  .nav,
  .section-heading,
  .watch-heading,
  .share-panel,
  .auth-screen {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .page {
    padding: 22px 16px;
  }

  .auth-screen {
    gap: 24px;
    min-height: auto;
  }

  .auth-intro h1 {
    font-size: 38px;
  }

  .brand-mark {
    font-size: clamp(92px, 28vw, 138px);
    letter-spacing: -5px;
  }

  .platform-name {
    font-size: 15px;
  }
}
