/* ============================================================
   Theme 2 — "Nova": structural / component overrides.
   Everything here is scoped under [data-theme="nova"] and layered
   after every Theme-1 stylesheet, so Theme 1 ("Classic") is never
   touched. theme-nova-tokens.css already re-colors/re-shapes most
   of the app for free (every component below already reads
   var(--color-*)/var(--radius-*)/var(--shadow-*)); what's left here
   is either (a) a genuine structural difference from project_A's
   design (sticky vs. absolute nav, a peeking hero deck vs. a single
   full-bleed slide, always-visible bottom-nav labels) or (b) an
   accent tint that was hardcoded as a literal rgba() rather than a
   token in the base stylesheets, so the token file alone can't
   reach it. Search "215, 163, 92" / "236, 194, 127" in this
   project's other css/*.css files for the Classic originals being
   re-tinted here (accent -> #8b5cf6 / accent-strong -> #a78bfa). */

/* ---------- Section headers ----------
   project_A's section titles are plain bold text with no leading accent bar. */
[data-theme='nova'] .section-title {
  padding-inline-start: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}
[data-theme='nova'] .section-title::before {
  content: none;
}
[data-theme='nova'] .section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-accent-strong);
  padding: 7px var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.14);
}
[data-theme='nova'] .section-link:hover,
[data-theme='nova'] .section-link:focus-visible {
  background: rgba(139, 92, 246, 0.24);
  color: var(--color-accent-strong);
}

/* ---------- Buttons ---------- */
[data-theme='nova'] .btn {
  border-radius: var(--radius-full);
  font-weight: 700;
}
[data-theme='nova'] .btn-primary {
  background: var(--gradient-accent);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-inset-hairline), var(--shadow-glow);
}
[data-theme='nova'] .btn-primary:hover,
[data-theme='nova'] .btn-primary:focus-visible {
  background: var(--gradient-accent);
  filter: brightness(1.08);
}
[data-theme='nova'] .icon-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
[data-theme='nova'] .icon-btn:hover,
[data-theme='nova'] .icon-btn:focus-visible {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

/* ---------- Top nav ----------
   project_A pins this bar (sticky, frosted glass) instead of letting it scroll
   away absolutely-positioned over the hero — the single largest structural
   difference in the shell chrome. */
[data-theme='nova'] .site-nav {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(14, 11, 24, 0.92) 0%, rgba(8, 7, 15, 0.86) 100%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
}
[data-theme='nova'] .site-nav::before {
  content: none;
}
[data-theme='nova'] .site-nav .nav-logo,
[data-theme='nova'] .site-nav .icon-btn {
  filter: none;
}
@media (max-width: 479px) {
  [data-theme='nova'] .nav-logo span {
    display: none;
  }
}

/* ---------- Hero ----------
   project_A's hero is a swipeable *deck* of partial-width cards with visible
   neighbors peeking at the edges and a depth effect (receded siblings scaled
   down/faded), not a single full-bleed slide. Rebuilding that structurally:
   the outer carousel stops clipping/framing (that moves to each slide), the
   track gets inter-slide gap + side padding so neighbors peek, and each slide
   becomes its own rounded, shadowed, elevated card. `.hero-slide.is-current`
   is toggled by hero.js's existing scroll-position tracking (harmless, unused
   class under Theme 1). */
[data-theme='nova'] .hero-carousel {
  margin: 0;
  padding-top: var(--space-4);
  border-radius: 0;
  overflow: visible;
  background: none;
  box-shadow: none;
  height: auto;
}
[data-theme='nova'] .hero-track {
  height: auto;
  gap: var(--space-3);
  padding-inline: var(--container-padding);
  scroll-padding-inline: var(--container-padding);
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}
[data-theme='nova'] .hero-slide {
  flex: 0 0 84%;
  max-width: 26rem;
  width: auto;
  height: clamp(20rem, 60vw, 26rem);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
  transition: transform var(--duration-base) var(--ease-flat), opacity var(--duration-base) var(--ease-flat);
  transform: scale(0.94);
  opacity: 0.55;
}
[data-theme='nova'] .hero-slide.is-current {
  transform: scale(1);
  opacity: 1;
}
[data-theme='nova'] .hero-slide-media::before {
  content: none;
}
[data-theme='nova'] .hero-slide-media::after {
  background:
    linear-gradient(180deg, rgba(8, 7, 15, 0.22) 0%, rgba(8, 7, 15, 0.08) 34%, rgba(8, 7, 15, 0.32) 62%, rgba(6, 5, 12, 0.97) 94%),
    linear-gradient(115deg, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
}
[data-theme='nova'] .hero-slide-content {
  max-width: none;
  padding: var(--space-4) var(--space-4) var(--space-5);
}
[data-theme='nova'] .hero-badge-type {
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  border: none;
  color: var(--color-accent-contrast);
  font-size: 11px;
}
[data-theme='nova'] .hero-dots {
  position: static;
  padding: var(--space-3) 0 var(--space-1);
  gap: 6px;
}
[data-theme='nova'] .hero-dot {
  width: 6px;
  height: 6px;
  background: var(--color-border-strong);
}
[data-theme='nova'] .hero-dot.is-active {
  width: 20px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
}
[data-theme='nova'] .hero-carousel.is-loading .hero-track,
[data-theme='nova'] .hero-skeleton,
[data-theme='nova'] .hero-state {
  flex: 0 0 84%;
  width: 84%;
  max-width: 26rem;
  height: clamp(20rem, 60vw, 26rem);
  border-radius: var(--radius-lg);
}
@media (min-width: 900px) {
  [data-theme='nova'] .hero-slide,
  [data-theme='nova'] .hero-carousel.is-loading .hero-track,
  [data-theme='nova'] .hero-skeleton,
  [data-theme='nova'] .hero-state {
    flex-basis: 46%;
    width: 46%;
    max-width: 32rem;
    height: clamp(22rem, 44vw, 28rem);
  }
}
@media (min-width: 1200px) {
  [data-theme='nova'] .hero-slide,
  [data-theme='nova'] .hero-carousel.is-loading .hero-track,
  [data-theme='nova'] .hero-skeleton,
  [data-theme='nova'] .hero-state {
    flex-basis: 32%;
    width: 32%;
  }
}
@media (orientation: landscape) and (max-height: 34rem) {
  [data-theme='nova'] .hero-slide { height: 13rem; }
}

/* ---------- Cards ---------- */
[data-theme='nova'] .card:hover,
[data-theme='nova'] .card:focus-visible {
  transform: translateY(-3px);
}
[data-theme='nova'] .card:active {
  transform: scale(0.95);
}
[data-theme='nova'] .card-poster::after,
[data-theme='nova'] .ex-card-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--gradient-surface-sheen);
}
[data-theme='nova'] .card:hover .card-poster,
[data-theme='nova'] .card:focus-visible .card-poster,
[data-theme='nova'] .ex-card:hover .ex-card-poster,
[data-theme='nova'] .ex-card:focus-visible .ex-card-poster {
  border-color: rgba(167, 139, 250, 0.4);
}
[data-theme='nova'] .card:hover .card-poster img,
[data-theme='nova'] .card:focus-visible .card-poster img {
  transform: scale(1.05);
}
[data-theme='nova'] .card-type-badge,
[data-theme='nova'] .ex-badge {
  border-radius: var(--radius-full);
}
[data-theme='nova'] .progress-fill {
  background: var(--gradient-accent);
}
[data-theme='nova'] .row-state {
  border: 1px solid var(--color-border);
  background: var(--gradient-surface-sheen), var(--color-surface);
}

/* ---------- Bottom nav ----------
   project_A's dock keeps labels visible under every icon (a literal Material 3
   nav-bar), a squircle rounded rect rather than a full pill, and a gradient
   "active pill" morph behind the icon instead of a solid-tint one. The label
   markup itself is always in the DOM (see bottomNav.js) and hidden under
   Theme 1 by a base rule in components.css — this just reveals it. */
[data-theme='nova'] .bottom-nav-inner {
  max-width: 28rem;
  gap: 2px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(34, 28, 68, 0.88) 0%, rgba(14, 12, 26, 0.86) 100%);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}
[data-theme='nova'] .bottom-nav-item {
  flex-direction: column;
  gap: 3px;
  height: 3.5rem;
  border-radius: var(--radius-md);
}
[data-theme='nova'] .bn-label {
  display: block;
  position: relative;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
[data-theme='nova'] .bottom-nav-item::before {
  inset: 2px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.55);
}
[data-theme='nova'] .bottom-nav-item.is-active::before {
  opacity: 0.24;
}
[data-theme='nova'] .bottom-nav-item.is-active {
  color: #c4b5fd;
}
[data-theme='nova'] .bottom-nav-item.is-active .bn-icon {
  transform: none;
  filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.55));
}
[data-theme='nova'] .bottom-nav-item:active {
  transform: scale(0.92);
}

/* ---------- Search overlay ---------- */
[data-theme='nova'] .search-input-row:focus-within {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-glow-soft);
}
[data-theme='nova'] .search-segmented-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.14));
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.3);
}
[data-theme='nova'] .search-segmented-btn.is-active {
  color: var(--color-accent-strong);
}
[data-theme='nova'] .search-filters-toggle.is-open {
  color: var(--color-accent-strong);
  border-color: rgba(167, 139, 250, 0.4);
}
[data-theme='nova'] .search-chip.is-active {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.14);
}

/* ---------- Home: tabbed rails ---------- */
[data-theme='nova'] .home-tab.is-active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-glow);
}

/* The shared base rule (components.css) always tints the pill's icon with
   `--color-accent-strong`, independent of active state — correct for Ember's
   reference (gold glyph + white label, deliberately two different colors),
   but requested to match the label color once active, here in Nova only. */
[data-theme='nova'] .home-tab.is-active .home-tab-icon {
  color: var(--color-accent-contrast);
}

/* ---------- Explore ----------
   project_A's tab bar is filled rounded chips with a gradient-filled active
   state, not an underlined text tab — the sliding underline indicator is
   replaced entirely by the chip's own background, same as the secondary
   in-panel sub-tab row already does in Theme 1. */
[data-theme='nova'] .ex-tabbar-track {
  gap: var(--space-2);
  padding-block: 2px var(--space-2);
}
[data-theme='nova'] .ex-tab {
  padding: var(--space-2) var(--space-4);
  min-height: 2.25rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}
[data-theme='nova'] .ex-tab:hover,
[data-theme='nova'] .ex-tab:focus-visible {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}
[data-theme='nova'] .ex-tab.is-active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-glow);
}
[data-theme='nova'] .ex-tab-indicator {
  display: none;
}
[data-theme='nova'] .ex-subtabbar .ex-tab.is-active {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.14);
  /* Without this the active color falls through to `.ex-tab.is-active`'s
     `--color-accent-contrast` (near-black) — correct for that rule's own
     vivid gradient fill, but unreadable on this row's soft/translucent
     background. Match the same soft-background pattern already used by
     `.search-chip.is-active`/`.ac-filter.is-active` elsewhere in Nova. */
  color: var(--color-accent-strong);
}
[data-theme='nova'] .ex-mode {
  background: var(--color-surface);
}
[data-theme='nova'] .ex-mode-btn {
  width: 2.5rem;
  height: 1.05rem;
}
[data-theme='nova'] .ex-mode-btn svg {
  width: 16px;
  height: 16px;
}
[data-theme='nova'] .ex-mode-btn.is-active {
  color: var(--color-accent-contrast);
}
[data-theme='nova'] .ex-mode-thumb {
  background: var(--gradient-accent);
  box-shadow: var(--shadow-glow-soft);
}
[data-theme='nova'] .ex-state-ring {
  background: radial-gradient(circle at 50% 35%, rgba(139, 92, 246, 0.16), transparent 68%);
}
[data-theme='nova'] .ex-state-art {
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08));
}
[data-theme='nova'] .ex-pull {
  background: var(--gradient-accent);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-glow);
}

/* ---------- Login ---------- */
[data-theme='nova'] .login-screen {
  background: radial-gradient(ellipse 130% 70% at 50% -10%, #1c1738 0%, var(--color-bg) 62%);
}
[data-theme='nova'] .glow-a {
  background: var(--color-accent);
}
[data-theme='nova'] .glow-b {
  background: var(--color-accent-2);
  opacity: 0.22;
}
[data-theme='nova'] .login-card {
  background: rgba(24, 22, 51, 0.55);
  border-color: var(--color-border-strong);
}
[data-theme='nova'] .qr-frame {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.28), var(--shadow-glow), 0 20px 40px rgba(0, 0, 0, 0.4);
}
[data-theme='nova'] .status-dot {
  background: var(--color-accent-strong);
  box-shadow: 0 0 8px var(--color-accent-strong);
}
[data-theme='nova'] .login-card.is-success .status-dot {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* ---------- Profile ---------- */
[data-theme='nova'] .profile-card {
  border-radius: var(--radius-lg);
  background: var(--gradient-surface-sheen), linear-gradient(140deg, rgba(139, 92, 246, 0.18) 0%, rgba(34, 211, 238, 0.05) 100%), var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-card);
}
[data-theme='nova'] .profile-avatar {
  background: var(--gradient-accent);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-glow);
}
[data-theme='nova'] .profile-plan {
  color: var(--color-accent-strong);
}
[data-theme='nova'] .profile-menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: none;
  background: none;
  border-radius: 0;
  overflow: visible;
}
[data-theme='nova'] .profile-row {
  border-radius: var(--radius-md);
  background: var(--gradient-surface-sheen), var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-inset-hairline);
}
[data-theme='nova'] .profile-row + .profile-row {
  border-top: 1px solid var(--color-border);
}
[data-theme='nova'] .profile-row:hover,
[data-theme='nova'] .profile-row:focus-visible {
  background: var(--gradient-surface-sheen), var(--color-surface-hover);
  border-color: var(--color-border-strong);
}
[data-theme='nova'] .btn-danger {
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.32);
}
[data-theme='nova'] .btn-danger:hover,
[data-theme='nova'] .btn-danger:focus-visible {
  background: rgba(251, 113, 133, 0.19);
}

/* ---------- Calendar ----------
   project_A's day chip is a fixed-size pill (`width: 3.25rem; min-height:
   3.5rem; border-radius: var(--radius-full)`), not the rectangular,
   viewport-clamped chip Theme 1 uses — Nova inherited the Theme 1 shape
   unchanged. */
[data-theme='nova'] .cal-day {
  width: 3.25rem;
  min-width: 3.25rem;
  min-height: 3.5rem;
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--color-surface);
}
[data-theme='nova'] .cal-day.is-today {
  border-color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--color-accent-strong);
}
[data-theme='nova'] .cal-day.is-active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-glow);
}
[data-theme='nova'] .cal-day.is-active .cal-day-num {
  color: var(--color-accent-contrast);
}
[data-theme='nova'] .cal-day.is-active .cal-day-dot {
  color: var(--color-accent-contrast);
  background: var(--color-accent-contrast);
}
[data-theme='nova'] .cal-day.has-airings .cal-day-dot {
  background: var(--color-accent-2);
}
[data-theme='nova'] .card-flag {
  background: var(--gradient-accent);
  color: var(--color-accent-contrast);
}

/* ---------- Title detail / actor ---------- */
[data-theme='nova'] .dt-follow.is-following,
[data-theme='nova'] .dt-watchlist.is-saved {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(139, 92, 246, 0.14);
}
[data-theme='nova'] .dt-cast-item:hover .dt-cast-photo,
[data-theme='nova'] .dt-cast-item:focus-visible .dt-cast-photo {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}
[data-theme='nova'] .ac-filter.is-active {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.26), rgba(139, 92, 246, 0.12));
  border-color: rgba(167, 139, 250, 0.5);
}
[data-theme='nova'] .ac-list .ac-row::after {
  background: linear-gradient(105deg, transparent 32%, rgba(167, 139, 250, 0.2) 47%, rgba(255, 255, 255, 0.12) 53%, transparent 68%);
}
[data-theme='nova'] .dt-hero,
[data-theme='nova'] .dt-poster {
  border-radius: var(--radius-lg);
}
[data-theme='nova'] .dt-back,
[data-theme='nova'] .dt-top-actions .icon-btn {
  border-radius: var(--radius-full);
}

/* ---------- Downloads panel ----------
   No override needed here (as of the 2026-08-30 redesign) — downloads.css's
   own rules for this panel now read `var(--gradient-accent, …fallback)` /
   `color-mix(in srgb, var(--color-accent) …)` directly instead of the
   hardcoded gold rgba() this section used to re-tint, so Nova's violet
   already comes through for free. Keep it that way for anything new added
   to that panel — don't reintroduce a hardcoded accent rgba() there that
   would need a re-tint entry here again. */

/* ---------- Toast ---------- */
[data-theme='nova'] .mm-toast {
  border-color: var(--color-border-strong);
}
