:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #111111;
  --panel2: #171717;
  --border: #292929;
  --text: #ffffff;
  --muted: #929292;
  --red: #e50914;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 18px 10px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1px;
}
.brand span { color: var(--red); }

.tagline {
  color: #777;
  font-size: 13px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px 60px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid #242424;
  border-radius: 18px;
}

.hero {
  padding: 28px;
  margin: 14px 0 20px;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

p {
  color: #a2a2a2;
  line-height: 1.5;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.user-card {
  color: #fff;
  text-decoration: none;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  gap: 15px;
  align-items: center;
  transition: .16s ease;
}

.user-card:hover {
  transform: translateY(-2px);
  border-color: #5a1a1f;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #252525;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.user-info { min-width: 0; }
.user-name { font-size: 19px; font-weight: 800; }
.meta { color: #8d8d8d; font-size: 12px; margin-top: 4px; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pill {
  display: inline-block;
  background: #222;
  color: #aaa;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.pill.on { background: #301316; color: #ffb8bc; }

.page-head {
  margin: 12px 0 18px;
}
.page-head h1 { margin-top: 10px; }

.back {
  color: #aaa;
  text-decoration: none;
  font-size: 13px;
}

.panel {
  padding: 20px;
  margin-top: 16px;
}

.panel-title {
  font-size: 21px;
  font-weight: 900;
}

.settings {
  display: grid;
  gap: 16px;
}

.field span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 7px;
}

.field input,
.search {
  width: 100%;
  background: #171717;
  color: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
}

.field input:focus,
.search:focus {
  border-color: #6d2026;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.toggle-row input {
  position: absolute;
  opacity: 0;
}
.toggle-ui {
  width: 42px;
  height: 24px;
  background: #303030;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
}
.toggle-ui::after {
  content: "";
  width: 18px;
  height: 18px;
  background: #aaa;
  border-radius: 50%;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: .15s ease;
}
.toggle-row input:checked + .toggle-ui {
  background: var(--red);
}
.toggle-row input:checked + .toggle-ui::after {
  transform: translateX(18px);
  background: #fff;
}
.toggle-row strong { display: block; font-size: 14px; }
.toggle-row small { display: block; color: #858585; margin-top: 3px; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 11px 16px;
  font-weight: 900;
  cursor: pointer;
}
.btn.secondary { background: #292929; }

.section-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
}

.hint {
  margin: 5px 0 0;
  font-size: 13px;
}

.counter {
  background: #1e1e1e;
  border-radius: 999px;
  padding: 7px 10px;
  color: #aaa;
  font-size: 12px;
}

.search {
  margin-top: 16px;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.series-card {
  display: block;
  background: #151515;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: .15s ease;
}

.series-card:hover {
  border-color: #533034;
  transform: translateY(-1px);
}

.series-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #222;
}

.series-body {
  padding: 12px;
}

.series-title {
  font-size: 14px;
  line-height: 18px;
  min-height: 36px;
  font-weight: 900;
}

.series-meta {
  min-height: 18px;
  display: flex;
  gap: 8px;
  color: #969696;
  font-size: 11px;
  margin-top: 7px;
}

.subscribe-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 12px;
  margin-top: 12px;
}

.subscribe-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.sticky-save {
  position: sticky;
  bottom: 12px;
  margin-top: 18px;
  background: rgba(12, 12, 12, .95);
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.save-note {
  color: #848484;
  font-size: 12px;
}

.flash {
  border-radius: 10px;
  padding: 11px 13px;
  margin: 8px 0 14px;
  font-size: 13px;
}
.flash.success {
  background: #142216;
  border: 1px solid #285a31;
  color: #bfe9c4;
}
.flash.error {
  background: #271416;
  border: 1px solid #64252a;
  color: #ffc3c7;
}

.error-panel {
  padding: 28px;
  margin-top: 20px;
}

.empty {
  color: #888;
  padding: 20px;
}

@media (max-width: 620px) {
  .series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-save {
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-save .btn {
    width: 100%;
  }
}


.select {
  width: 100%;
  background: #171717;
  color: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
}

.select:focus {
  border-color: #6d2026;
}

.episode-test {
  border-top: 1px solid #242424;
  padding-top: 16px;
  margin-top: 4px;
}

.test-note {
  color: #777;
  font-size: 11px;
  line-height: 17px;
  margin-top: 9px;
}


.hero-actions {
  margin-top: 18px;
}

.eyebrow {
  color: #e50914;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  margin-bottom: 8px;
}

.newsletter-hero {
  background:
    linear-gradient(120deg, rgba(229,9,20,.13), transparent 50%),
    #111;
}

.newsletter-back {
  margin-top: 20px;
}

.newsletter-panel {
  max-width: 650px;
}

.newsletter-mark {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.newsletter-mark span {
  color: #fff;
}

.newsletter-mark b {
  color: #e50914;
}

.newsletter-toggle {
  margin-top: 6px;
  padding: 14px;
  border: 1px solid #292929;
  border-radius: 12px;
  background: #151515;
}

/* --- Auth v5 --- */
.top-account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-account form { margin: 0; }
.account-name { color: #aaa; font-size: 13px; font-weight: 700; }
.logout-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ddd;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.service-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 18px 10px;
  display: flex;
  gap: 8px;
}

.service-nav a {
  color: #d2d2d2;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
  border: 1px solid #292929;
  border-radius: 999px;
  background: #111;
}

.service-nav a:hover { border-color: #5a1a1f; color: #fff; }

.login-shell {
  min-height: 68vh;
  display: grid;
  place-items: center;
  padding: 30px 0;
}

.login-card {
  width: min(100%, 470px);
  margin-top: 0;
  padding: 30px;
  background:
    radial-gradient(circle at 100% 0, rgba(229,9,20,.14), transparent 34%),
    #111;
}

.login-badge {
  display: inline-block;
  color: #ff9da2;
  background: #301316;
  border: 1px solid #5a1a1f;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  margin-bottom: 18px;
}

.login-mark { margin-bottom: 10px; }
.login-intro { margin: 10px 0 22px; }
.login-form { display: grid; gap: 16px; }
.login-button { width: 100%; margin-top: 2px; }
.security-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #252525;
  color: #777;
  font-size: 11px;
  line-height: 17px;
}

@media (max-width: 620px) {
  .top-account { width: 100%; margin-left: 0; justify-content: space-between; }
  .login-card { padding: 22px; }
}
