@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --text:           #111111;
  --text-meta:      #aaaaaa;
  --text-body:      #555555;
  --text-data:      #444444;
  --divider:        #e8e8e8;
  --bg:             #ffffff;
  --bg-page:        #f0eee9;

  --c-announced:    #bbbbbb;
  --t-announced:    #777777;
  --c-comingsoon:   #7c6fc4;
  --t-comingsoon:   #4a3d9e;
  --c-inseason:     #e8873a;
  --t-inseason:     #b85c00;
  --c-complete:     #4a9e5c;
  --t-complete:     #2d6e3a;
  --c-between:      #c9a830;
  --t-between:      #7a6100;
  --c-ended:        #888888;
  --t-ended:        #444444;
  --danger:         #c0392b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 84px;
}

/* ── APP HEADER ── */
.app-header {
  background: #111111;
  padding: 18px 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Dark header variant (Landing) */
.app-header--dark {
  background: #111111;
  border-bottom: none;
}

/* ── APP NAME / LOGO ── */
.app-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.04;
  gap: 2px;
  flex-shrink: 0;
}

.app-header--dark .app-name {
  color: #ffffff;
}

.app-tagline {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.2);
  line-height: 1;
}

.app-header--dark .app-tagline {
  color: rgba(255,255,255,0.2);
}

/* ── NAV LINKS (legacy) ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #999;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link--active {
  font-weight: 700;
  color: #111;
}

.app-header--dark .nav-link {
  color: rgba(255,255,255,0.25);
}

.app-header--dark .nav-link--active {
  color: rgba(255,255,255,0.25); /* no active state on landing */
}

/* ── AUTH WIDGET ── */
.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.header-pill-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  padding: 2px;
  min-height: 34px;
}

.header-pill-group[hidden] {
  display: none !important;
}

#auth-settings {
  display: flex;
  align-items: center;
}

#auth-settings:empty,
#auth-settings[hidden] {
  display: none !important;
}

#watchlist-picker {
  margin: 0;
  min-width: 0;
}

#watchlist-picker[hidden] {
  display: none !important;
}

#watchlist-picker:empty {
  display: none !important;
}

.header-pill-group:has(#watchlist-picker:empty):has(#auth-settings:empty) {
  display: none !important;
}

#watchlist-picker[hidden] + #auth-settings .auth-settings-btn {
  border-radius: 100px;
}

#watchlist-picker[hidden] + #auth-settings .auth-settings-btn::before {
  display: none;
}

.watchlist-picker-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 100px;
  background-color: rgba(255,255,255,0.12);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 7px 30px 7px 14px;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.72) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 48%,
    calc(100% - 9px) 48%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.watchlist-picker-select:hover,
.watchlist-picker-select:focus-visible {
  background-color: rgba(255,255,255,0.18);
  outline: none;
}

.auth-settings-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 0 100px 100px 0;
  background: transparent;
  color: rgba(255,255,255,0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  position: relative;
}

.auth-settings-btn::before {
  display: none;
}

.auth-settings-btn:hover,
.auth-settings-btn:focus-visible {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  outline: none;
}

.auth-gear-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

#auth-widget {
  display: flex;
  align-items: center;
}

.auth-avatar-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #333333;
  color: #ffffff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.auth-user-icon {
  width: 14px;
  height: 14px;
  fill: #ffffff;
}

.auth-menu-wrap {
  position: relative;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  background: #ffffff;
  border: 1px solid var(--divider);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 120;
}

.auth-menu[hidden] {
  display: none !important;
}

.auth-menu--dark {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.auth-menu-btn {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  font-family: inherit;
  padding: 8px 9px;
  border-radius: 4px;
  cursor: pointer;
}

.auth-menu-btn:hover {
  background: #f4f4f4;
}

.auth-menu--dark .auth-menu-btn {
  color: rgba(255,255,255,0.9);
}

.auth-menu--dark .auth-menu-btn:hover {
  background: rgba(255,255,255,0.08);
}

.auth-menu-btn--danger {
  color: #b03a2f;
}

.watchlist-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.watchlist-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.watchlist-settings-panel {
  position: absolute;
  top: 72px;
  right: 20px;
  width: min(92vw, 520px);
  max-height: calc(100vh - 92px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--divider);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.22);
  padding: 12px;
}

.watchlist-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.watchlist-settings-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.watchlist-settings-subhead {
  margin: 2px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #777;
  text-transform: uppercase;
}

.watchlist-settings-close {
  border: none;
  background: transparent;
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.watchlist-settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watchlist-settings-row {
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.watchlist-settings-main {
  min-width: 0;
}

.watchlist-settings-name {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  overflow-wrap: anywhere;
}

.watchlist-settings-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #777;
}

.watchlist-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.watchlist-settings-empty {
  border: 1px dashed var(--divider);
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  color: #777;
}

.watchlist-settings-btn {
  border: 1px solid var(--divider);
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 7px;
  cursor: pointer;
  white-space: nowrap;
}

.watchlist-settings-btn--danger {
  color: #b03a2f;
}

.watchlist-settings-btn--primary {
  border-color: #111;
}

.watchlist-settings-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* ── BOTTOM TAB BAR ── */
.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--divider);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  backdrop-filter: saturate(120%) blur(6px);
}

.bottom-tab {
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #8b8b8b;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bottom-tab--active {
  color: #111;
}

/* ── LIST SWITCHER ── */
#list-switcher {
  background: var(--bg);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#list-switcher::-webkit-scrollbar { display: none; }
#list-switcher[hidden] { display: none; }

.list-switcher-empty {
  font-size: 12px;
  font-weight: 600;
  color: #999;
}

.list-tab {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--divider);
  background: none;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
}

.list-tab--active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.list-tab--new {
  color: var(--text-meta);
  border-style: dashed;
}

/* ══════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════ */

.landing {
  background: var(--bg);
}

/* ── HERO ── */
.hero {
  background: #111111;
  padding: 28px 20px 32px;
  position: relative;
}

.hero-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0;
}

.hero-status--inseason {
  color: #b85c00;
}

.hero-status--comingsoon {
  color: var(--t-comingsoon);
}

.hero-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.2;
}

.hero-title--with-days {
  padding-right: 92px;
}

.hero-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.4;
}

.hero-segments {
  display: flex;
  gap: 5px;
  width: 100%;
  margin-top: 16px;
}

.hero-seg {
  position: relative;
  flex: 1;
  height: 7px;
  border-radius: 2px;
  overflow: hidden;
}

.hero-seg--aired {
  background: #e8873a;
}

.hero-seg--next {
  background: rgba(232,135,58,0.3);
}

.hero-seg--next::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(232,135,58,0.7), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

.hero-seg--unaired {
  background: rgba(255,255,255,0.1);
}

.hero-segments--single .hero-seg {
  flex: 1 1 100%;
}

.hero-seg--comingsoon {
  background: rgba(255,255,255,0.07);
  animation: heroPulse 2.8s ease-in-out infinite;
}

.hero-seg--complete {
  background: #4a9e5c;
}

.hero-ep-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  line-height: 1.4;
}

.hero-ep-row--single {
  display: block;
}

.hero-ep-num {
  color: #b85c00;
  font-weight: 700;
}

.hero-date {
  margin-top: 12px;
  font-size: 12px;
  color: #ffffff;
}

.hero-date-accent {
  color: #b85c00;
  font-weight: 700;
}

.hero-date-accent--comingsoon {
  color: var(--t-comingsoon);
}

.hero-days-chip {
  position: absolute;
  top: 28px;
  right: 20px;
  margin-left: 0;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes heroPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* Hero empty state */
.hero-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-empty-title {
  font-size: 19px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.hero-empty-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}

.hero-empty-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  padding: 6px 16px;
  text-decoration: none;
  width: fit-content;
}

/* ── LANDING SECTIONS ── */
.landing-section {
  background: var(--bg);
  border-top: 1px solid var(--divider);
}

.section-label {
  padding: 14px 20px 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ccc;
}

/* ── COMING UP ROWS ── */
.cu-list {
  padding-bottom: 4px;
}

.cu-row {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  border-bottom: 1px solid var(--divider);
  gap: 0;
  position: relative;
}

.cu-row:last-child {
  border-bottom: none;
}

.cu-strip {
  width: 3px;
  align-self: stretch;
  border-radius: 1px;
  flex-shrink: 0;
  margin-right: 12px;
}

.cu-body {
  flex: 1;
  min-width: 0;
}

.cu-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cu-sub {
  font-size: 11px;
  color: #bbb;
  margin-top: 1px;
}

.cu-days {
  text-align: right;
  flex-shrink: 0;
  margin-left: 12px;
}

.cu-days-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cu-days-unit {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: #bbb;
  margin-top: 1px;
}

.cu-days--inseason .cu-days-num   { color: var(--t-inseason); }
.cu-days--comingsoon .cu-days-num { color: var(--t-comingsoon); }
.cu-days--freshest .cu-days-num   { color: #4cc38a; }

/* ══════════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════════ */

.search-wrap {
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  padding: 12px 20px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  flex: 1;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--divider);
  border-radius: 3px;
  padding: 10px 14px;
  outline: none;
  background: var(--bg);
}

.search-input::placeholder {
  color: #999;
}

.search-input:focus {
  border-color: #bbb;
}

.search-btn {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--text);
  border-radius: 3px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--text);
  color: var(--bg);
}

/* ── SUGGESTIONS ── */
.suggestions {
  margin-top: 4px;
}

.suggestions:empty {
  margin-top: 0;
}

.suggestion {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--divider);
}

.suggestion:last-child {
  border-bottom: none;
}

.suggestion:hover {
  color: #555;
}

.discover-wrap {
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  padding: 10px 20px;
}

.discover-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discover-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  padding-right: 2px;
  padding-left: 2px;
  align-items: center;
}

.discover-row::-webkit-scrollbar {
  display: none;
}

.discover-row--intent {
  overflow-x: auto;
}

.discover-chip {
  flex: 0 0 auto;
  border: 1px solid #d7d7d7;
  background: #fff;
  color: #666;
  border-radius: 999px;
  padding: 7px 11px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.discover-chip:hover {
  border-color: #aaa;
  color: #222;
}

.discover-chip.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.discover-chip[data-network="netflix"] {
  border-color: rgba(229, 9, 20, 0.4);
  background: rgba(229, 9, 20, 0.08);
  color: #b3050f;
}
.discover-chip[data-network="netflix"].is-active {
  border-color: #e50914;
  background: #e50914;
  color: #fff;
}

.discover-chip[data-network="appletv"] {
  border-color: rgba(95, 95, 95, 0.4);
  background: rgba(17, 17, 17, 0.06);
  color: #2f2f2f;
}
.discover-chip[data-network="appletv"].is-active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.discover-chip[data-network="hbomax"] {
  border-color: rgba(88, 61, 255, 0.4);
  background: rgba(88, 61, 255, 0.09);
  color: #4932cf;
}
.discover-chip[data-network="hbomax"].is-active {
  border-color: #583dff;
  background: #583dff;
  color: #fff;
}

.discover-chip[data-network="hulu"] {
  border-color: rgba(28, 231, 131, 0.5);
  background: rgba(28, 231, 131, 0.12);
  color: #078649;
}
.discover-chip[data-network="hulu"].is-active {
  border-color: #1ce783;
  background: #1ce783;
  color: #063820;
}

.discover-chip[data-network="prime"] {
  border-color: rgba(0, 168, 225, 0.45);
  background: rgba(0, 168, 225, 0.1);
  color: #0077a0;
}
.discover-chip[data-network="prime"].is-active {
  border-color: #00a8e1;
  background: #00a8e1;
  color: #062733;
}

/* ── SEARCH COUNT ── */
.search-count {
  background: var(--bg);
  padding: 7px 20px;
  font-size: 12px;
  color: #bbb;
  border-bottom: 1px solid var(--divider);
}

.search-count:empty {
  display: none;
}

/* ── SHOW LIST ── */
.show-list {
  background: var(--bg);
}

/* ── EMPTY STATE ── */
.empty-state {
  padding: 48px 20px;
  text-align: center;
}

.empty-state p {
  font-size: 14px;
  color: #bbb;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════
   SHOW CARDS (shared across Search + Watchlist)
══════════════════════════════════════════════ */

/* ── SHOW ITEM ── */
.show-item {
  display: flex;
  border-bottom: 1px solid var(--divider);
  background: var(--bg);
  animation: fadeUp 0.3s ease both;
}

.show-item--inseason       { background: rgba(232, 135, 58, 0.07); }
.show-item--comingsoon     { background: rgba(124, 111, 196, 0.07); }
.show-item--seasoncomplete { background: rgba(74, 158, 92, 0.07); }
.show-item--betweenseasons { background: rgba(201, 168, 48, 0.07); }
.show-item--ended          { background: rgba(136, 136, 136, 0.07); }
.show-item--announced      { background: rgba(187, 187, 187, 0.07); }

.show-item:last-child {
  border-bottom: none;
}

/* ── STATUS STRIP ── */
.status-strip {
  width: 3px;
  flex-shrink: 0;
}

.strip-announced  { background: var(--c-announced); }
.strip-comingsoon { background: var(--c-comingsoon); }
.strip-inseason   { background: var(--c-inseason); }
.strip-complete   { background: var(--c-complete); }
.strip-between    { background: var(--c-between); }
.strip-ended      { background: var(--c-ended); }

/* ── SHOW BODY ── */
.show-body {
  flex: 1;
  padding: 13px 16px 13px 14px;
}

/* ── TOP AREA ── */
.top-area {
  position: relative;
}

/* ── DAYS BLOCK ── */
.days-block {
  position: absolute;
  top: 0;
  right: 0;
  text-align: right;
}

.days-number {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.days-unit {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bbb;
  margin-top: 1px;
}

.dn-comingsoon { color: var(--t-comingsoon); }
.dn-inseason   { color: var(--t-inseason); }
.dn-complete   { color: var(--t-complete); }
.dn-ended      { color: var(--t-ended); }

.days-block--ended {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.days-block--new {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.days-new-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--t-complete);
  line-height: 1;
}

.ended-dot {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--text);
  margin-top: 4px;
}

.hourglass-icon {
  width: 14px;
  height: 18px;
  margin-top: 1px;
  position: relative;
}
.hourglass-icon::before,
.hourglass-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.hourglass-icon::before {
  top: 0;
  border-top: 9px solid #c9a830;
}
.hourglass-icon::after {
  bottom: 0;
  border-bottom: 9px solid #c9a830;
  opacity: 0.35;
}

/* ── STATUS LABEL ── */
.status-label {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 3px 7px;
}

.status-label--with-days {
  right: 64px;
}

.sl-announced  { color: var(--t-announced);  background: rgba(187,187,187,0.12); }
.sl-comingsoon { color: var(--t-comingsoon); background: rgba(124,111,196,0.12); }
.sl-inseason   { color: var(--t-inseason);   background: rgba(232,135,58,0.12); }
.sl-complete   { color: var(--t-complete);   background: rgba(74,158,92,0.12); }
.sl-between    { color: var(--t-between);    background: rgba(201,168,48,0.12); }
.sl-ended      { color: var(--t-ended);      background: rgba(136,136,136,0.12); }

/* ── SHOW TITLE ── */
.show-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  padding-right: 130px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.show-title--with-days {
  padding-right: 176px;
}

.show-title--no-days {
  padding-right: 130px;
}

.show-title:hover {
  color: #444;
}

/* ── SHOW META ── */
.show-meta {
  font-size: 11px;
  color: var(--text-meta);
  margin-top: 3px;
}

/* ── SYNOPSIS ── */
.synopsis {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.6;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.synopsis--open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* ── SEASONS ROW ── */
.seasons-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* ── SEASON DOT ── */
.season-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--dot-color, var(--divider));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--dot-color, #ccc);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.season-dot--watched {
  background: var(--dot-color, var(--text));
  border-color: var(--dot-color, var(--text));
  color: #fff;
}

.season-dot--upcoming {
  border: 1.5px dashed #bbb;
  color: #bbb;
  cursor: default;
}

.season-dot--disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── SEASON RING (SVG progress) ── */
.season-ring {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
}

/* ── SEASONS COUNT ── */
.seasons-count {
  font-size: 11px;
  color: #bbb;
  font-weight: 500;
  margin-left: 2px;
}

/* ── EP LINE ── */
.ep-line {
  font-size: 12px;
  color: var(--text-data);
  line-height: 1.6;
  margin-bottom: 10px;
}

.ep-line--hero-date {
  color: rgba(0,0,0,0.45);
  font-weight: 400;
}

.ep-line--muted {
  color: #bbb;
}

.ep-line strong.accent-orange  { font-weight: 700; color: var(--t-inseason); }
.ep-line strong.accent-purple  { font-weight: 700; color: var(--t-comingsoon); }
.ep-line strong.accent-neutral { font-weight: 700; color: var(--text); }
.ep-line strong.accent-green   { font-weight: 700; color: var(--t-complete); }

.ep-line-dot {
  color: #999;
  margin: 0 3px;
}

.ep-line-calendar {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* ── READY TEXT ── */
.ready-text {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.ready-text--green { color: var(--t-complete); }
.ready-text--slate { color: var(--t-ended); }

/* ── SHOW ACTIONS ── */
.show-actions {
  display: flex;
  gap: 16px;
  padding-top: 8px;
  align-items: center;
}

.action-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
}

.action-link:hover {
  opacity: 0.7;
}

.show-actions .action-link:not(.action-link--danger):not(.action-link--muted) {
  color: var(--text);
  text-decoration: none;
}

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

.action-link--danger:hover {
  opacity: 0.8;
  color: var(--danger);
}

.action-link--muted {
  color: #ccc;
  cursor: default;
  font-weight: 600;
}

.action-link--muted:hover {
  opacity: 1;
  color: #ccc;
}

.action-link--move {
  color: var(--text);
  font-weight: 600;
}

.action-link--move:hover {
  color: var(--text);
}

.action-link--queue {
  color: var(--text);
}

.action-link--queue:hover {
  color: var(--text);
}

.action-link--watching {
  color: var(--text);
}

.action-link--watching:hover {
  color: var(--text);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.status-dot--blink {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.2s ease-in-out infinite;
  margin-right: 3px;
  vertical-align: middle;
}

/* ── SLIDE OUT ANIMATION ── */
@keyframes slideOut {
  from { opacity: 1; max-height: 200px; }
  to   { opacity: 0; max-height: 0; overflow: hidden; }
}

.show-item--removing {
  animation: slideOut 0.2s ease forwards;
}

/* ── CARD FLASH ── */
@keyframes card-flash {
  0%   { background: rgba(0,0,0,0.07); }
  60%  { background: rgba(0,0,0,0.07); }
  100% { background: transparent; }
}
.card--flash {
  animation: card-flash 0.9s ease-out forwards;
}

/* ══════════════════════════════════════════════
   WATCHLIST PAGE
══════════════════════════════════════════════ */

/* ── WATCHING ZONE ── */
.watching-zone {
  background: var(--bg);
  border-top: 3px solid var(--divider);
  border-bottom: 3px solid var(--divider);
}

.watching-header {
  padding: 14px 20px 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  user-select: none;
  background: #f7f7f7;
  position: relative;
}

.watching-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #cfcfcf;
}

.watching-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
}

.watching-count {
  font-size: 12px;
  font-weight: 400;
  color: #bbb;
  flex: 1;
}

.watching-chevron {
  background: none;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  line-height: 1;
  margin-left: auto;
  align-self: center;
}

.watching-collapsed-strip {
  padding: 10px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--divider);
}
.watching-collapsed-strip[hidden] { display: none; }

.watching-empty {
  padding: 20px;
  color: #bbb;
  font-size: 13px;
  text-align: center;
}

/* ── QUEUE ZONE ── */
.queue-zone {
  background: var(--bg);
  border-bottom: 3px solid var(--divider);
}

.queue-header {
  padding: 14px 20px 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  user-select: none;
  background: #f7f7f7;
  position: relative;
}

.queue-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #cfcfcf;
}

.queue-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
}

.queue-count {
  font-size: 12px;
  font-weight: 400;
  color: #bbb;
  flex: 1;
}

.queue-chevron {
  background: none;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  line-height: 1;
  margin-left: auto;
  align-self: center;
}

/* ── QUEUE COLLAPSED STRIP ── */
.queue-collapsed-strip,
.saved-collapsed-strip {
  padding: 10px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--divider);
}
.queue-collapsed-strip[hidden],
.saved-collapsed-strip[hidden] { display: none; }

.queue-collapsed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.queue-collapsed-item--tappable {
  cursor: pointer;
  border-radius: 4px;
  margin: 0 -6px;
  padding: 3px 6px;
  transition: background 0.12s;
}
.queue-collapsed-item--tappable:active {
  background: rgba(0,0,0,0.07);
}

.queue-collapsed-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.collapsed-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ── QUEUE ITEM ── */
.queue-item {
  display: flex;
  border-bottom: 1px solid var(--divider);
  transition: opacity 0.15s ease;
  position: relative;
}

.queue-item:last-child {
  border-bottom: none;
}

.queue-item.is-dragging {
  opacity: 0.4;
}

.queue-item.drag-over-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  z-index: 10;
}

.queue-item.drag-over-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  z-index: 10;
}

.queue-drag-handle {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: #ddd;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  z-index: 1;
}

.queue-drag-handle:hover {
  color: #bbb;
  background: #f5f5f5;
}

.queue-drag-handle:active {
  cursor: grabbing;
}

.queue-grip {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(3, 4px);
  gap: 2px;
}

.queue-grip-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.show-body--queue {
  padding-right: 48px;
  position: relative;
}

.queue-item .show-title {
  font-size: 16px;
}

/* ── QUEUE EMPTY ── */
.queue-empty {
  padding: 24px 20px;
  text-align: center;
}

.queue-empty p {
  font-size: 12px;
  color: #bbb;
  line-height: 1.7;
}

/* ── SAVED ZONE ── */
.saved-zone {
  background: var(--bg);
}

.saved-header {
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  background: #f7f7f7;
  position: relative;
}

.saved-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #cfcfcf;
}

.saved-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
}

.saved-count {
  font-size: 12px;
  font-weight: 400;
  color: #bbb;
  flex: 1;
}

/* Sort button (replaces chevron + filter chips) */
.saved-sort-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  white-space: nowrap;
}

.saved-sort-btn:hover {
  color: var(--text);
}


/* ── SAVED DOT LIST ── */
.saved-list {
  background: var(--bg);
}

.saved-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
  position: relative;
}

.saved-row:last-child {
  border-bottom: none;
}

.saved-row:active {
  background: rgba(0,0,0,0.03);
}

.saved-row-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.saved-row-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 3px 7px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}

.saved-row-sep {
  color: inherit;
  margin: 0 3px;
  font-size: 13px;
  line-height: 1;
  animation: statusDotPulse 1.4s ease-in-out infinite;
}

.saved-row-days {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.saved-row-days-unit {
  font-size: 9px;
  font-weight: 700;
  margin-left: 1px;
  vertical-align: baseline;
  text-transform: none;
}

@keyframes statusDotPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.saved-row-status--inseason       { color: var(--t-inseason);   background: rgba(232,135,58,0.12); }
.saved-row-status--comingsoon     { color: var(--t-comingsoon); background: rgba(124,111,196,0.12); }
.saved-row-status--seasoncomplete { color: var(--t-complete);   background: rgba(74,158,92,0.12); }
.saved-row-status--ended          { color: var(--t-ended);      background: rgba(136,136,136,0.12); }
.saved-row-status--betweenseasons { color: var(--t-between);    background: rgba(201,168,48,0.12); }
.saved-row-status--announced      { color: #777777;             background: rgba(187,187,187,0.12); }

.saved-row--open.saved-row--inseason       { background: rgba(232, 135, 58, 0.07); }
.saved-row--open.saved-row--comingsoon     { background: rgba(124, 111, 196, 0.07); }
.saved-row--open.saved-row--seasoncomplete { background: rgba(74, 158, 92, 0.07); }
.saved-row--open.saved-row--betweenseasons { background: rgba(201, 168, 48, 0.07); }
.saved-row--open.saved-row--ended          { background: rgba(136, 136, 136, 0.07); }
.saved-row--open.saved-row--announced      { background: rgba(187, 187, 187, 0.07); }

.saved-badge--available-green  { color: var(--t-complete); }
.saved-badge--available-slate  { color: var(--t-ended); }
.saved-badge--airing           { color: var(--t-inseason); }
.saved-badge--days-soon        { color: var(--t-comingsoon); }
.saved-badge--days-between     { color: var(--t-between); }
.saved-badge--nodate           { color: #ddd; }

.saved-row--open .saved-row-title {
  color: #000;
}

.saved-row--open {
  border-bottom: none;
}

.saved-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.saved-row--announced::before      { background: var(--c-announced); }
.saved-row--comingsoon::before     { background: var(--c-comingsoon); }
.saved-row--inseason::before       { background: var(--c-inseason); }
.saved-row--seasoncomplete::before { background: var(--c-complete); }
.saved-row--betweenseasons::before { background: var(--c-between); }
.saved-row--ended::before          { background: var(--c-ended); }

.watching-peek-card--under-header .status-label,
.watching-peek-card--under-header .show-title,
.watching-peek-card--under-header .show-meta,
.watching-peek-card--under-header .days-block {
  display: none;
}

.watching-peek-card--under-header .show-body {
  padding-top: 2px;
}

.watching-peek-card--under-header .synopsis {
  margin-top: 2px;
}

/* ── SAVED EMPTY ── */
.saved-empty {
  padding: 48px 20px;
  text-align: center;
}

.saved-empty p {
  font-size: 14px;
  color: #bbb;
  line-height: 1.7;
}

/* ── EXPANDED PEEK CARD (watching / queue / saved) ── */
.saved-peek-card,
.watching-peek-card {
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

/* When a compact row is open, merge header + body into one unified card. */
.saved-row--open + .watching-peek-card--under-header {
  border-top: none;
  border-bottom: 1px solid var(--divider);
  margin-top: 0;
}

.saved-row--open + .watching-peek-card--under-header .show-item {
  border-bottom: none;
}

/* ── SECTION HEADER (legacy, keep for compat) ── */
.section-header {
  background: var(--bg);
  padding: 14px 20px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--divider);
}

.section-header-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #bbb;
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 200;
}
#back-to-top:not([hidden]) {
  opacity: 1;
}
#back-to-top[hidden] {
  display: block !important;
  opacity: 0;
  pointer-events: none;
}

/* ── LOADING / PULSE ── */
@keyframes loadingPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ── SPIN ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
