:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef4f4;
  --text: #172121;
  --muted: #627171;
  --line: #dce5e5;
  --teal: #0f9f98;
  --teal-dark: #08736f;
  --coral: #f06f5f;
  --amber: #b7791f;
  --green: #1d8a54;
  --shadow: 0 18px 48px rgba(23, 33, 33, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.public-home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}

.public-copy {
  min-width: 0;
}

.public-copy h1 {
  margin: 34px 0 16px;
  max-width: 720px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
}

.public-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.public-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.public-features article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.public-features h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.public-features p {
  font-size: 14px;
  line-height: 1.45;
}

.public-points {
  display: grid;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.public-points li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 999px;
  background: var(--teal);
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: white;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
  overflow: visible;
}

.brand-logo-frame {
  fill: currentColor;
}

.brand-logo-e {
  fill: #05060d;
}

.brand-name {
  line-height: 1;
  letter-spacing: 0;
}

.login-panel h1 {
  margin: 26px 0 24px;
  font-size: 28px;
  line-height: 1.1;
}

.avatar {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.register-box {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 18px;
}

.register-box summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.public-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.public-links a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.public-links a:hover {
  color: var(--text);
}

.legal-page {
  min-height: 100vh;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

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

.legal-brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}

.legal-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-header a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.legal-header a:hover {
  color: var(--text);
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 42px);
}

.legal-card h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
}

.legal-date {
  margin: 10px 0 34px;
  color: var(--muted);
}

.legal-card h2 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.legal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.legal-card a {
  color: var(--teal-dark);
  font-weight: 800;
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.field label,
.checkbox-row {
  color: var(--muted);
  font-size: 14px;
}

.field input,
.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: white;
  color: var(--text);
  outline: none;
}

.field input:focus,
.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 152, 0.13);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 20px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.danger-btn {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-btn {
  background: var(--teal);
  color: white;
}

.primary-btn:hover {
  background: var(--teal-dark);
}

.ghost-btn,
.icon-btn {
  background: white;
  border-color: var(--line);
  color: var(--text);
}

.danger-btn {
  background: #fff2f0;
  border-color: #ffd2cb;
  color: #a4382c;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 0;
  font-weight: 800;
}

.error,
.notice {
  border-radius: 7px;
  padding: 12px;
  margin: 14px 0;
  font-size: 14px;
}

.notice a {
  color: var(--teal-dark);
  font-weight: 800;
}

.external-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.error {
  background: #fff1f0;
  color: #9d2f24;
  border: 1px solid #ffd3cc;
}

.notice {
  background: #fff9e8;
  color: #73510f;
  border: 1px solid #f2d68a;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 30px;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}

.install-btn:hover,
.install-btn:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 22px rgba(35, 247, 255, 0.22);
}

.install-hint {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.install-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav button {
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 0 12px;
  text-align: left;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  min-width: 0;
}

.nav button.active,
.nav button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-footer {
  position: absolute;
  bottom: 18px;
  left: 16px;
  right: 16px;
  display: grid;
  gap: 10px;
}

.mini-profile {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.mini-profile strong {
  display: block;
}

.mini-profile:hover,
.mini-profile.active {
  background: var(--surface-2);
  border-color: var(--line);
}

.mini-profile:focus-visible {
  outline: 3px solid rgba(15, 159, 152, 0.18);
  outline-offset: 2px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #041017;
  background: var(--avatar-color, var(--teal));
}

.avatar.large {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  font-size: 30px;
}

.main {
  padding: 24px clamp(18px, 3vw, 42px) 48px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 620px) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.search-box {
  position: relative;
}

.search-results {
  position: absolute;
  z-index: 20;
  top: 52px;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-result {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.search-result:last-child {
  border-bottom: 0;
}

.poster {
  width: 42px;
  height: 62px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--surface-2);
}

.poster.large {
  width: 74px;
  height: 110px;
}

.poster.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.page-title h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}

.stat strong {
  display: block;
  font-size: 24px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.column {
  min-width: 0;
}

.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.column-head h2 {
  margin: 0;
  font-size: 17px;
}

.count-pill,
.tag {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--muted);
}

.tag.new {
  background: #fff0ed;
  color: #bd4637;
}

.tag.ok {
  background: #e6f7ef;
  color: var(--green);
}

.media-list {
  display: grid;
  gap: 10px;
}

.media-row,
.movie-row,
.episode-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.media-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  text-align: left;
  width: 100%;
}

.media-row:hover,
.movie-row:hover,
.episode-row:hover {
  border-color: rgba(15, 159, 152, 0.45);
}

.media-row h3,
.movie-row h3,
.episode-row h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

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

.small {
  font-size: 13px;
}

.progress {
  height: 7px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 10px 0 7px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail {
  position: fixed;
  inset: 18px 18px 18px auto;
  width: min(760px, calc(100vw - 36px));
  z-index: 50;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 33, 33, 0.2);
  z-index: 40;
}

.detail-head {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.detail-body {
  overflow: auto;
  padding: 16px;
}

.season {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.season:first-child {
  border-top: 0;
  padding-top: 0;
}

.season h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.episode-line {
  display: grid;
  grid-template-columns: 78px auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 0;
  border-top: 1px solid #eef2f2;
}

.episode-open {
  grid-column: 1 / 4;
  display: grid;
  grid-template-columns: 78px auto 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.episode-line:first-of-type {
  border-top: 0;
}

.episode-code {
  min-width: 58px;
  font-weight: 800;
  color: var(--muted);
}

.season-head {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.season-poster {
  width: 48px;
  height: 72px;
}

.episode-still {
  width: 78px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(35, 247, 255, 0.12), rgba(255, 61, 166, 0.12));
  border: 1px solid rgba(35, 247, 255, 0.22);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(35, 247, 255, 0.55);
}

.episode-name {
  min-width: 0;
}

.episode-name strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-date {
  color: var(--muted);
  font-size: 13px;
}

.episode-detail-head .episode-still {
  width: 148px;
  height: 84px;
}

.episode-detail-head {
  grid-template-columns: 148px 1fr auto;
}

.episode-overview {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.episode-section {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.section-title h3,
.credit-block h4 {
  margin: 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tech-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.tech-item span,
.credit-pill small,
.comment-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.tech-item strong {
  display: block;
  margin-top: 4px;
}

.credit-block {
  margin-top: 14px;
}

.credit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.credit-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-2);
}

.spoiler-lock {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}

.spoiler-lock p {
  color: var(--muted);
  line-height: 1.5;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--text);
  outline: none;
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.comment-main {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.comment-card p {
  margin: 6px 0 8px;
  line-height: 1.5;
}

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

.danger-link {
  color: var(--danger);
}

.comment-replies {
  display: grid;
  gap: 8px;
  margin: 12px 0 0 28px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.upcoming-list,
.movie-list {
  display: grid;
  gap: 10px;
  max-width: 960px;
}

.episode-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
}

.movie-row {
  display: grid;
  grid-template-columns: 54px 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.loader {
  padding: 18px;
  color: var(--muted);
}

.profile-panel {
  max-width: 640px;
  padding: 18px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-hero h2 {
  margin: 0;
  font-size: 26px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (max-width: 980px) {
  .public-home {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 32px));
    padding: 32px 0 48px;
  }

  .public-copy h1 {
    font-size: clamp(38px, 11vw, 62px);
  }

  .public-features {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 18px;
  }

  .sidebar-footer {
    position: static;
    margin-top: 16px;
  }

  .topbar,
  .columns,
  .stats-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 18px 14px 36px;
  }

  .search-result,
  .episode-row,
  .movie-row,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .poster,
  .poster.large {
    display: none;
  }

  .detail {
    inset: 0;
    width: 100vw;
    border-radius: 0;
  }

  .episode-line {
    grid-template-columns: 1fr;
  }
}

/* Cyberpunk interface theme */
:root {
  --bg: #070912;
  --surface: rgba(13, 18, 31, 0.86);
  --surface-2: rgba(18, 27, 47, 0.92);
  --text: #ecfbff;
  --muted: #88a5b7;
  --line: rgba(63, 238, 255, 0.22);
  --teal: #23f7ff;
  --teal-dark: #08b8ca;
  --coral: #ff3da6;
  --amber: #ffd166;
  --green: #8cff6a;
  --violet: #b26cff;
  --danger: #ff5470;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.38), 0 0 26px rgba(35, 247, 255, 0.08);
  color-scheme: dark;
}

body {
  background:
    linear-gradient(rgba(35, 247, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 61, 166, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(35, 247, 255, 0.14), transparent 30%),
    radial-gradient(circle at 90% 18%, rgba(255, 61, 166, 0.12), transparent 28%),
    linear-gradient(135deg, #05060d 0%, #08101f 48%, #100817 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: soft-light;
  opacity: 0.35;
}

.shell {
  background: linear-gradient(90deg, rgba(4, 7, 15, 0.88), rgba(4, 7, 15, 0.46));
}

.sidebar,
.login-panel,
.stat,
.media-row,
.movie-row,
.episode-row,
.panel,
.search-results {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar {
  border-right-color: rgba(35, 247, 255, 0.32);
  box-shadow: 12px 0 38px rgba(0, 0, 0, 0.32), inset -1px 0 rgba(255, 61, 166, 0.13);
}

.brand {
  color: var(--text);
  text-shadow: 0 0 18px rgba(35, 247, 255, 0.34);
}

.brand-mark {
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    #05060d;
  color: var(--teal);
  box-shadow: 0 0 22px rgba(35, 247, 255, 0.34), inset 0 0 0 1px rgba(35, 247, 255, 0.34);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.brand-logo-frame {
  fill: url("#episod-logo-gradient");
}

.brand-logo {
  filter: drop-shadow(0 0 10px rgba(35, 247, 255, 0.42));
}

.register-box summary {
  color: var(--muted);
}

.register-box {
  border-top-color: rgba(35, 247, 255, 0.18);
}

.avatar {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.48), transparent 24%),
    linear-gradient(135deg, var(--avatar-color), rgba(255, 61, 166, 0.78));
  color: #041017;
  box-shadow: 0 0 22px color-mix(in srgb, var(--avatar-color) 48%, transparent);
}

.mini-profile:hover,
.mini-profile.active {
  background: linear-gradient(90deg, rgba(35, 247, 255, 0.14), rgba(255, 61, 166, 0.08));
  border-color: rgba(35, 247, 255, 0.32);
  box-shadow: 0 0 20px rgba(35, 247, 255, 0.1);
}

.mini-profile.active {
  box-shadow: inset 3px 0 0 var(--teal), 0 0 20px rgba(35, 247, 255, 0.14);
}

.nav button {
  border: 1px solid transparent;
  color: #a9c5d2;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.nav-icon {
  color: currentColor;
  filter: drop-shadow(0 0 8px rgba(35, 247, 255, 0.16));
}

.nav button.active,
.nav button:hover {
  background: linear-gradient(90deg, rgba(35, 247, 255, 0.16), rgba(255, 61, 166, 0.08));
  border-color: rgba(35, 247, 255, 0.32);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--teal), 0 0 20px rgba(35, 247, 255, 0.12);
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  color: var(--teal);
}

.main {
  position: relative;
}

.page-title h1,
.login-panel h1 {
  color: var(--text);
  text-shadow: 0 0 18px rgba(35, 247, 255, 0.18);
}

.muted,
.small,
.field label,
.checkbox-row,
.switch,
.episode-date,
.episode-code {
  color: var(--muted);
}

.field input,
.search-box input {
  background: rgba(5, 8, 17, 0.82);
  border-color: rgba(35, 247, 255, 0.32);
  border-radius: 6px;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 61, 166, 0.08), 0 0 22px rgba(35, 247, 255, 0.05);
}

.field input::placeholder,
.search-box input::placeholder {
  color: #6f8997;
}

.field input:focus,
.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(35, 247, 255, 0.14), 0 0 28px rgba(35, 247, 255, 0.16);
}

.primary-btn,
.ghost-btn,
.icon-btn,
.danger-btn {
  border-radius: 6px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.primary-btn {
  background: linear-gradient(135deg, var(--teal), #64ffda);
  color: #041017;
  box-shadow: 0 0 22px rgba(35, 247, 255, 0.26);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #7ffcff, var(--teal));
}

.ghost-btn,
.icon-btn {
  background: rgba(7, 11, 23, 0.78);
  border-color: rgba(35, 247, 255, 0.28);
  color: var(--text);
}

.ghost-btn:hover,
.icon-btn:hover {
  border-color: var(--teal);
  box-shadow: 0 0 18px rgba(35, 247, 255, 0.16);
}

.danger-btn {
  background: rgba(255, 84, 112, 0.12);
  border-color: rgba(255, 84, 112, 0.42);
  color: #ff9aaa;
}

.notice,
.error {
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.38);
  color: #ffe6a3;
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.08);
}

.error {
  background: rgba(255, 84, 112, 0.12);
  border-color: rgba(255, 84, 112, 0.45);
  color: #ffb0bf;
}

.notice a {
  color: var(--teal);
}

.public-copy h1,
.legal-card h1,
.login-panel h2 {
  color: var(--text);
  text-shadow: 0 0 18px rgba(35, 247, 255, 0.18);
}

.public-copy p,
.public-points,
.legal-date,
.legal-card p,
.legal-header a {
  color: var(--muted);
}

.public-features article,
.legal-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.public-features article {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.public-features article::before,
.legal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 12px currentColor;
}

.legal-card {
  position: relative;
  overflow: hidden;
}

.public-features h2,
.legal-card h2 {
  color: var(--teal);
  text-transform: uppercase;
  font-size: 13px;
}

.public-points li::before {
  box-shadow: 0 0 12px rgba(35, 247, 255, 0.72);
}

.legal-brand,
.legal-header a:hover,
.public-links a:hover {
  color: var(--text);
}

.legal-card a {
  color: var(--teal);
}

.external-link {
  background: rgba(7, 11, 23, 0.78);
  border-color: rgba(35, 247, 255, 0.32);
  color: var(--teal);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
  box-shadow: 0 0 18px rgba(35, 247, 255, 0.1);
}

.external-link:hover {
  border-color: var(--teal);
  box-shadow: 0 0 22px rgba(35, 247, 255, 0.22);
}

.link-btn {
  color: var(--teal);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.episode-open:hover .episode-name strong {
  color: var(--teal);
}

.episode-section {
  border-top-color: rgba(35, 247, 255, 0.18);
}

.section-title h3,
.credit-block h4 {
  color: var(--teal);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0;
}

.tech-item,
.credit-pill,
.spoiler-lock,
.comment-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(7, 11, 23, 0.72);
  border-color: rgba(35, 247, 255, 0.22);
}

.spoiler-lock {
  box-shadow: 0 0 26px rgba(255, 61, 166, 0.08);
}

.comment-form textarea {
  background: rgba(5, 8, 17, 0.82);
  border-color: rgba(35, 247, 255, 0.32);
  color: var(--text);
}

.comment-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(35, 247, 255, 0.14), 0 0 28px rgba(35, 247, 255, 0.16);
}

.comment-replies {
  border-left-color: rgba(35, 247, 255, 0.32);
}

.profile-panel {
  position: relative;
  overflow: hidden;
}

.profile-hero h2 {
  color: var(--text);
}

.stats-strip {
  gap: 14px;
}

.stat {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  padding: 16px;
}

.stat::before,
.media-row::before,
.movie-row::before,
.episode-row::before,
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 12px currentColor;
}

.stat:nth-child(2)::before { background: var(--green); }
.stat:nth-child(3)::before { background: var(--amber); }
.stat:nth-child(4)::before { background: var(--violet); }
.stat:nth-child(5)::before { background: var(--coral); }

.stat strong {
  color: var(--text);
  font-size: 26px;
  text-shadow: 0 0 18px rgba(35, 247, 255, 0.28);
}

.stat span,
.column-head h2 {
  color: #cfefff;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.columns {
  gap: 14px;
}

.column {
  min-width: 0;
}

.column-head {
  border-bottom: 1px solid rgba(35, 247, 255, 0.17);
  padding-bottom: 9px;
}

.count-pill,
.tag {
  background: rgba(35, 247, 255, 0.12);
  border: 1px solid rgba(35, 247, 255, 0.28);
  color: #bdfaff;
  border-radius: 999px;
}

.tag.new {
  background: rgba(255, 61, 166, 0.14);
  border-color: rgba(255, 61, 166, 0.42);
  color: #ff9fd3;
}

.tag.ok {
  background: rgba(140, 255, 106, 0.13);
  border-color: rgba(140, 255, 106, 0.38);
  color: #c2ffb0;
}

.media-row,
.movie-row,
.episode-row {
  position: relative;
  border-radius: 6px;
  color: var(--text);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.media-row:hover,
.movie-row:hover,
.episode-row:hover {
  transform: translateY(-1px);
  border-color: rgba(35, 247, 255, 0.62);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), 0 0 22px rgba(35, 247, 255, 0.16);
}

.column:nth-child(1) .media-row::before { background: var(--teal); }
.column:nth-child(2) .media-row::before { background: var(--green); }
.column:nth-child(3) .media-row::before { background: var(--amber); }
.column:nth-child(4) .media-row::before { background: var(--violet); }

.media-row h3,
.movie-row h3,
.episode-row h3 {
  color: var(--text);
  font-size: 14px;
}

.poster {
  border-radius: 4px;
  border: 1px solid rgba(35, 247, 255, 0.25);
  background: linear-gradient(135deg, rgba(35, 247, 255, 0.12), rgba(255, 61, 166, 0.12));
}

.poster.placeholder {
  color: var(--teal);
  text-shadow: 0 0 14px rgba(35, 247, 255, 0.55);
}

.progress {
  height: 6px;
  background: rgba(136, 165, 183, 0.18);
  border: 1px solid rgba(35, 247, 255, 0.12);
}

.progress span {
  background: linear-gradient(90deg, var(--teal), var(--green));
  box-shadow: 0 0 12px rgba(35, 247, 255, 0.72);
}

.empty {
  background: rgba(13, 18, 31, 0.5);
  border-color: rgba(136, 165, 183, 0.25);
  color: var(--muted);
}

.detail-backdrop {
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(5px);
}

.detail {
  border-color: rgba(35, 247, 255, 0.42);
}

.detail-head {
  background: linear-gradient(90deg, rgba(35, 247, 255, 0.08), rgba(255, 61, 166, 0.05));
  border-bottom-color: rgba(35, 247, 255, 0.24);
}

.detail-head h2 {
  color: var(--text);
}

.season {
  border-top-color: rgba(35, 247, 255, 0.18);
}

.season h3 {
  color: var(--teal);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0;
}

.episode-line {
  border-top-color: rgba(136, 165, 183, 0.14);
}

.episode-name strong {
  color: var(--text);
}

.switch input {
  accent-color: var(--teal);
}

.search-result {
  border-bottom-color: rgba(35, 247, 255, 0.14);
}

.search-result:hover {
  background: rgba(35, 247, 255, 0.06);
}

.loader {
  color: var(--teal);
}

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

@media (max-width: 980px) {
  .sidebar {
    border-bottom-color: rgba(35, 247, 255, 0.32);
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .columns,
  .stats-strip {
    grid-template-columns: 1fr;
  }
}

.mobile-category-tabs {
  display: none;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  body::before {
    opacity: 0.22;
  }

  .public-home {
    gap: 20px;
    padding: 18px 0 32px;
  }

  .public-copy h1 {
    margin-top: 28px;
  }

  .public-copy p {
    font-size: 16px;
    line-height: 1.55;
  }

  .login-panel {
    padding: 22px;
  }

  .legal-page {
    width: min(100% - 28px, 920px);
    padding-top: 18px;
  }

  .legal-header {
    display: grid;
    gap: 12px;
    align-items: start;
  }

  .legal-header nav {
    gap: 10px;
  }

  .shell {
    display: block;
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(4, 7, 15, 0.94), rgba(4, 7, 15, 0.62));
  }

  .sidebar {
    position: static;
    z-index: 35;
    height: auto;
    padding: 14px 14px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(35, 247, 255, 0.28);
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    column-gap: 12px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
      rgba(7, 10, 21, 0.94);
    backdrop-filter: none;
  }

  .brand {
    gap: 9px;
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-logo {
    width: 29px;
    height: 29px;
  }

  .sidebar-footer {
    position: static;
    display: block;
    margin: 0;
    justify-self: end;
    grid-column: 3;
  }

  .install-btn {
    display: inline-flex;
    grid-column: 2;
    min-height: 38px;
    padding: 0 11px;
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(35, 247, 255, 0.16), rgba(255, 61, 166, 0.08)),
      rgba(7, 11, 23, 0.82);
    border-color: rgba(35, 247, 255, 0.34);
    color: var(--teal);
    box-shadow: 0 0 18px rgba(35, 247, 255, 0.12);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0;
  }

  .install-btn:hover,
  .install-btn:focus-visible {
    border-color: var(--teal);
    box-shadow: 0 0 22px rgba(35, 247, 255, 0.22);
  }

  .install-hint {
    display: block;
    grid-column: 1 / -1;
    justify-self: end;
    max-width: min(260px, 100%);
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(35, 247, 255, 0.26);
    border-radius: 8px;
    background: rgba(5, 8, 17, 0.86);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
  }

  .mini-profile {
    width: 42px;
    height: 42px;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 3px;
    border-radius: 10px;
  }

  .mini-profile-copy {
    display: none;
  }

  .mini-profile .avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .nav {
    position: fixed;
    z-index: 60;
    left: 12px;
    right: 12px;
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(35, 247, 255, 0.28);
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(35, 247, 255, 0.12), rgba(255, 61, 166, 0.08)),
      rgba(5, 8, 17, 0.94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 26px rgba(35, 247, 255, 0.16);
    backdrop-filter: blur(16px);
  }

  .detail-open .nav {
    display: none;
  }

  .nav button {
    min-width: 0;
    height: 52px;
    padding: 5px 4px 6px;
    text-align: center;
    font-size: 9px;
    line-height: 1.15;
    display: grid;
    grid-template-rows: 22px auto;
    place-items: center;
    gap: 2px;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.85;
  }

  .nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav button.active,
  .nav button:hover {
    box-shadow: inset 0 3px 0 var(--teal), 0 0 16px rgba(35, 247, 255, 0.15);
  }

  .main {
    padding: 14px 14px calc(92px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
  }

  .page-title h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .search-box {
    z-index: 25;
  }

  .search-box input {
    height: 44px;
    font-size: 15px;
  }

  .search-results {
    top: 50px;
    max-height: min(440px, 62vh);
    overflow: auto;
  }

  .search-result {
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .search-result .primary-btn {
    grid-column: 2;
    justify-self: start;
    min-height: 32px;
  }

  .stats-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -14px 18px;
    padding: 0 14px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .stats-strip::-webkit-scrollbar,
  .mobile-category-tabs::-webkit-scrollbar {
    display: none;
  }

  .stat {
    min-width: 134px;
    min-height: 82px;
    scroll-snap-align: start;
    padding: 14px 12px;
  }

  .stat strong {
    font-size: 25px;
  }

  .stat span {
    font-size: 11px;
  }

  .mobile-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -14px 14px;
    padding: 0 14px 2px;
    scrollbar-width: none;
  }

  .mobile-category-tabs button {
    flex: 0 0 auto;
    min-width: 132px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(35, 247, 255, 0.22);
    background: rgba(13, 18, 31, 0.74);
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-category-tabs button strong {
    color: var(--text);
    font-size: 13px;
  }

  .mobile-category-tabs button.active {
    color: var(--text);
    border-color: rgba(35, 247, 255, 0.58);
    background: linear-gradient(90deg, rgba(35, 247, 255, 0.18), rgba(255, 61, 166, 0.08));
    box-shadow: 0 0 20px rgba(35, 247, 255, 0.13);
  }

  .columns {
    display: block;
  }

  .column {
    display: none;
  }

  .column.mobile-active {
    display: block;
  }

  .column-head {
    margin: 0 0 10px;
    padding-bottom: 8px;
  }

  .column-head h2 {
    font-size: 13px;
  }

  .media-list,
  .movie-list,
  .upcoming-list {
    gap: 9px;
    max-width: none;
  }

  .media-row,
  .movie-row,
  .episode-row {
    width: 100%;
    min-height: 86px;
    padding: 10px;
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  }

  .media-row {
    grid-template-columns: 56px 1fr;
    gap: 10px;
  }

  .poster,
  .poster.large {
    display: grid;
  }

  img.poster,
  .poster {
    width: 52px;
    height: 76px;
  }

  .poster.large {
    width: 74px;
    height: 110px;
  }

  .media-row h3,
  .movie-row h3,
  .episode-row h3 {
    font-size: 15px;
    line-height: 1.2;
  }

  .progress {
    margin: 9px 0 7px;
  }

  .row-meta {
    gap: 5px;
  }

  .tag,
  .count-pill {
    font-size: 11px;
    padding: 3px 7px;
  }

  .movie-row {
    grid-template-columns: 56px 1fr;
    gap: 10px;
  }

  .movie-row .switch,
  .movie-row .danger-btn {
    grid-column: 2;
    justify-self: start;
  }

  .episode-row {
    grid-template-columns: 56px 1fr;
    gap: 10px;
  }

  .episode-row .tag {
    grid-column: 2;
    justify-self: start;
  }

  .detail {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .detail-head {
    grid-template-columns: 74px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .detail-head h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .detail-head .icon-btn {
    min-width: 42px;
    padding: 0 9px;
    font-size: 0;
  }

  .detail-head .icon-btn::before {
    content: "X";
    font-size: 12px;
  }

  .detail-body {
    padding: 14px 12px calc(24px + env(safe-area-inset-bottom));
  }

  .season {
    padding: 13px 0;
  }

  .season-head {
    grid-template-columns: 44px 1fr;
    gap: 10px;
  }

  .season-poster {
    width: 42px;
    height: 62px;
  }

  .episode-line {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 72px;
    padding: 9px 0;
  }

  .episode-open {
    grid-column: 1;
    grid-template-columns: 72px 54px 1fr;
  }

  .episode-still {
    width: 72px;
    height: 42px;
    grid-row: 1 / span 2;
  }

  .episode-detail-head .episode-still {
    width: 74px;
    height: 44px;
    grid-row: auto;
  }

  .episode-detail-head {
    grid-template-columns: 74px 1fr auto;
  }

  .episode-code {
    min-width: 0;
    font-size: 12px;
  }

  .episode-name {
    grid-column: 3;
  }

  .episode-name strong {
    white-space: normal;
    font-size: 14px;
    line-height: 1.2;
  }

  .episode-line .switch {
    grid-column: 1;
    margin-left: 134px;
    justify-self: start;
  }

  .tech-grid {
    grid-template-columns: 1fr 1fr;
  }

  .comment-replies {
    margin-left: 10px;
    padding-left: 10px;
  }

  .comment-form-actions,
  .profile-actions {
    justify-content: flex-start;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--coral);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.public-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
}

.public-hero-visual {
  position: relative;
  width: min(100%, 620px);
  height: clamp(220px, 22vw, 280px);
  margin: 30px 0 4px;
  overflow: hidden;
  border: 1px solid rgba(35, 247, 255, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(5, 6, 13, 0.36), transparent 32%),
    url("/og-image.png") right center / 215% auto no-repeat,
    #05060d;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.42),
    0 0 30px rgba(35, 247, 255, 0.09),
    0 0 44px rgba(255, 61, 166, 0.06);
}

.public-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge:first-child {
  border-color: var(--teal);
  color: var(--teal-dark);
  box-shadow: 0 0 14px rgba(35, 247, 255, 0.18);
}

.public-faq {
  margin-top: 34px;
}

.public-faq h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.public-faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.public-faq details[open] {
  border-color: var(--teal);
}

.public-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.public-faq summary:hover {
  color: var(--teal-dark);
}

.public-faq details p {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .public-hero-visual {
    display: none;
  }
}

/* --- Page Statistiques --- */
:root {
  --chart-1: #0f9f98;
  --chart-2: #f06f5f;
  --chart-3: #5b6bd6;
  --chart-4: #b7791f;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}

.stat-tile strong {
  font-size: 24px;
  line-height: 1.1;
}

.stat-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.record-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--chart-1);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.record-card strong {
  color: var(--text);
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chart-head h2 {
  margin: 0;
  font-size: 15px;
}

.vbar-chart {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 160px;
}

.vbar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.vbar {
  width: 100%;
  max-width: 34px;
  background: var(--chart-1);
  border-radius: 4px 4px 0 0;
}

.vbar-value {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
}

.vbar-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.hbar-chart {
  display: grid;
  gap: 8px;
}

.hbar-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr auto;
  align-items: center;
  gap: 10px;
}

.hbar-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbar-track {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--surface-2);
  overflow: hidden;
}

.hbar {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--chart-1);
}

.hbar-value {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  min-width: 30px;
  text-align: right;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.donut {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--surface);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}

.donut-center strong {
  font-size: 22px;
}

.donut-center small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.chart-legend strong {
  color: var(--text);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 7px;
}

.top-shows {
  display: grid;
  gap: 8px;
}

.top-show {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 12px;
  text-align: left;
  color: var(--text);
}

.top-show:hover {
  border-color: var(--teal);
}

.top-rank {
  font-weight: 900;
  font-size: 15px;
  color: var(--muted);
  min-width: 20px;
  text-align: center;
}

.top-show .poster {
  width: 34px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
}

.top-show-info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.top-show-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-show-count {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .vbar-chart {
    height: 120px;
    gap: 4px;
  }

  .donut-wrap {
    justify-content: center;
  }
}
