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

:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #dc2626;
  --accent-strong: #b91c1c;
  --accent-soft: rgba(220, 38, 38, 0.1);
  --highlight: #facc15;
  --muted: #52525b;
  --secondary-ink: #71717a;
  --page-background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(250, 204, 21, 0.12), transparent 26%),
    #f9fafb;
  --surface-background: rgba(255, 255, 255, 0.92);
  --feature-surface-background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.16), transparent 30%),
    linear-gradient(135deg, #111827 0%, #18181b 58%, #09090b 100%);
  --neo-masthead-hero-image-url: none;
  --neo-masthead-video-overlay:
    linear-gradient(to bottom, rgba(48, 54, 64, 0.34), rgba(48, 54, 64, 0.56));
  --surface-radius: 0;
  --surface-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --brand-logo-radius: 0;
  --menu-radius: 0;
  --pill-radius: 0;
  --page-gutter: 24px;
  --topbar-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page-background);
  font-family: "Inter", "Segoe UI", sans-serif;
}

body[data-theme="spring"] {
  --accent: #dc2626;
  --accent-strong: #b91c1c;
  --accent-soft: rgba(220, 38, 38, 0.1);
}

body[data-theme="simple"] {
  --line: rgba(15, 23, 42, 0.1);
}

body[data-theme="summer"] {
  --accent: #ea580c;
  --accent-strong: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.1);
}

body[data-theme="fall"] {
  --accent: #dc2626;
  --accent-strong: #b91c1c;
  --accent-soft: rgba(220, 38, 38, 0.1);
}

body[data-theme="winter"] {
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
}

main {
  position: relative;
  width: 100%;
  margin: 0;
  padding: calc(var(--topbar-height) + 18px) 0 40px;
  z-index: 1;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
.neo-brand-title {
  letter-spacing: -0.05em;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.9rem);
  font-weight: 900;
  line-height: 0.9;
}

h2 {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

a {
  color: inherit;
}

.neo-topbar-shell {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 60;
}

.neo-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, auto);
  grid-template-areas: "brand menu controls";
  align-items: center;
  gap: 18px;
  min-height: var(--topbar-height);
  padding: 14px var(--page-gutter);
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.neo-brand {
  grid-area: brand;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.neo-brand-logo-wrap {
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--brand-logo-radius);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 14px 24px rgba(220, 38, 38, 0.12);
  flex: 0 0 auto;
}

.neo-brand-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.neo-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.neo-brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(to right, var(--accent), var(--highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.neo-menu {
  grid-area: menu;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.neo-topbar-controls {
  grid-area: controls;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.neo-account {
  position: relative;
}

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

.neo-nav-link,
.neo-action-link,
.neo-action-button,
.neo-account-trigger,
.card-links a,
.hero-actions a,
.share-button,
.share-download,
.watch button,
.search-control button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 0;
  border: 1px solid transparent;
  text-decoration: none;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.neo-nav-link {
  color: #71717a;
}

.neo-nav-link:hover,
.neo-nav-link.active {
  color: var(--accent);
}

.neo-nav-link.active {
  background: rgba(254, 242, 242, 0.9);
}

.neo-action-link,
.card-links a,
.hero-actions a:nth-child(n + 2) {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.neo-action-button,
.neo-action-button-secondary,
.hero-actions a:first-child,
.card-links a:first-child,
.share-button,
.search-control button,
.watch button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.18);
}

.neo-action-button-secondary:hover,
.hero-actions a:first-child:hover,
.card-links a:first-child:hover,
.share-button:hover,
.search-control button:hover,
.watch button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.neo-nav-link:hover,
.neo-action-link:hover,
.neo-action-button:hover,
.card-links a:hover,
.hero-actions a:hover,
.share-button:hover,
.share-download:hover,
.watch button:hover,
.search-control button:hover {
  transform: translateY(-1px);
}

.neo-locale-wrap,
.neo-account-summary {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
}

.neo-account-trigger {
  min-width: 42px;
  padding: 0;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.neo-account-trigger:hover,
.account-open .neo-account-trigger {
  background: rgba(254, 242, 242, 0.9);
  border-color: rgba(248, 113, 113, 0.24);
}

.neo-account-menu {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  width: min(300px, calc(100vw - (var(--page-gutter) * 2)));
  padding: 16px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  z-index: 4;
}

.neo-account-menu[hidden] {
  display: none;
}

.neo-account-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.neo-account-meta {
  color: #71717a;
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: break-word;
}

.neo-account-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.neo-account-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.neo-locale-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
  color: #71717a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.neo-locale-select,
.public-filter select,
.search-control input {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.neo-locale-select {
  min-width: 110px;
  padding: 8px 12px;
}

.neo-user-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5;
  color: #52525b;
  font-size: 0.76rem;
  font-weight: 800;
}

.neo-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
}

.neo-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 0;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-open .neo-menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .neo-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .neo-menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.masthead,
.panel,
.card,
.watch,
.share-card {
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.masthead {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: 24px;
  margin-left: 0;
  margin-right: 0;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(24, 24, 27, 0.78)),
    var(--neo-masthead-hero-image-url),
    var(--feature-surface-background);
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.neo-masthead-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.02) contrast(1.02) brightness(0.9);
}

.masthead.neo-masthead-with-logo {
  --masthead-logo-size: clamp(72px, 9vw, 108px);
  --masthead-logo-left: clamp(14px, 2vw, 24px);
  --masthead-logo-top: clamp(16px, 2vw, 24px);
  padding-left: calc(var(--masthead-logo-left) + var(--masthead-logo-size) + clamp(8px, 1.2vw, 14px));
}

.masthead.neo-masthead-logo-large {
  --masthead-logo-size: clamp(92px, 12vw, 148px);
}

.neo-masthead-logo-wrap {
  position: absolute;
  top: var(--masthead-logo-top);
  left: var(--masthead-logo-left);
  width: var(--masthead-logo-size);
  height: var(--masthead-logo-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--brand-logo-radius);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.22);
  z-index: 3;
}

.neo-masthead-logo-wrap[hidden] {
  display: none !important;
}

.neo-masthead-logo {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.neo-hero {
  min-height: min(76vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.08)),
    linear-gradient(to right, rgba(220, 38, 38, 0.12), transparent, rgba(250, 204, 21, 0.08));
  opacity: 0.12;
  pointer-events: none;
  z-index: 1;
}

.masthead.neo-masthead-with-hero-bg::before {
  opacity: 0.18;
}

.masthead.neo-masthead-with-hero-video::before {
  background: var(--neo-masthead-video-overlay);
  opacity: 1;
}

.masthead.neo-masthead-with-hero-video::after {
  opacity: 0;
}

.masthead::after {
  content: "";
  position: absolute;
  inset: auto auto -10% 55%;
  width: 380px;
  height: 380px;
  border-radius: 0;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.24), transparent 66%);
  pointer-events: none;
  z-index: 1;
}

.masthead > *:not(.neo-masthead-logo-wrap):not(.neo-masthead-hero-video) {
  position: relative;
  z-index: 2;
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: fit-content;
  max-width: min(100%, 44rem);
  margin-bottom: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 0;
  background: var(--highlight);
  color: #09090b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  box-shadow: 0 18px 36px rgba(250, 204, 21, 0.18);
}

.masthead h1 {
  max-width: 14ch;
}

.masthead:not(.neo-hero) h1 {
  max-width: 18ch;
  font-size: clamp(2.3rem, 4.6vw, 4rem);
}

.hero-description,
.masthead #description {
  max-width: 42rem;
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.6rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 52rem;
  margin-top: 1.8rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1rem 1.1rem;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.hero-stat-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-stat-value {
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.panel {
  padding: 1.5rem;
  margin-bottom: 22px;
  margin-left: 0;
  margin-right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.panel h2 {
  position: relative;
  padding-left: 0.95rem;
  margin-bottom: 1rem;
}

.panel h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 0.35rem;
  height: 1.25rem;
  border-radius: 0;
  background: var(--accent);
}

.card-meta,
.note,
.watch-meta {
  color: var(--secondary-ink);
}

.public-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.public-filter select,
.search-control input {
  padding: 10px 12px;
}

.public-filter select {
  min-width: 160px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-align: left;
  vertical-align: top;
}

th {
  color: #71717a;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(254, 242, 242, 0.42);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

main > *:not(#topbar) {
  margin-left: var(--page-gutter);
  margin-right: var(--page-gutter);
}

.card {
  padding: 1.25rem;
  background: #ffffff;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.card:hover,
.watch:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.24);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.card p {
  margin-top: 0.8rem;
  line-height: 1.65;
}

.card-meta {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.watch {
  background: #ffffff;
}

.watch-actions {
  margin-top: 0.85rem;
}

.watch-actions a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.flag,
.share-badge {
  background: rgba(254, 242, 242, 0.92);
  color: var(--accent);
}

.stat,
.share-rank {
  background: rgba(255, 255, 255, 0.9);
}

.note {
  margin-top: 0.85rem;
  line-height: 1.6;
}

@media (max-width: 920px) {
  :root {
    --page-gutter: 16px;
    --topbar-height: 74px;
  }

  main {
    width: 100%;
    padding-top: calc(var(--topbar-height) + 16px);
  }

  .neo-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand controls";
  }

  .neo-topbar-controls {
    min-width: max-content;
  }

  .neo-menu-toggle {
    display: inline-flex;
  }

  .neo-menu {
    grid-area: menu;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px var(--page-gutter) 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  }

  .menu-open .neo-menu {
    display: flex;
  }

  .neo-nav,
  .neo-account-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .neo-locale-wrap {
    flex-direction: column;
    justify-content: flex-start;
  }

  .neo-locale-select {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .masthead.neo-masthead-with-logo {
    --masthead-logo-size: clamp(56px, 10vw, 84px);
    padding-left: 14px;
    padding-top: clamp(20px, 4vw, 30px);
    display: grid;
    grid-template-columns: var(--masthead-logo-size) minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    align-items: start;
  }

  .masthead.neo-masthead-with-logo.neo-masthead-logo-large {
    --masthead-logo-size: clamp(72px, 14vw, 110px);
  }

  .masthead.neo-masthead-with-logo .neo-masthead-logo-wrap {
    position: relative;
    top: auto;
    left: auto;
    grid-column: 1;
    grid-row: 1;
  }

  .masthead.neo-masthead-with-logo > *:not(.neo-masthead-logo-wrap):not(.neo-masthead-hero-video) {
    grid-column: 2;
  }

  .masthead.neo-masthead-with-logo .hero-description,
  .masthead.neo-masthead-with-logo .hero-actions,
  .masthead.neo-masthead-with-logo .hero-stats {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 12px;
    --topbar-height: 70px;
  }

  .masthead,
  .panel,
  .card,
  .watch,
  .share-card {
    border-radius: 0;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 4.1rem);
  }

  .masthead.neo-masthead-with-logo {
    --masthead-logo-size: clamp(54px, 18vw, 72px);
    padding-left: 12px;
    padding-top: clamp(20px, 5vw, 30px);
    column-gap: 8px;
  }

  .masthead.neo-masthead-with-logo.neo-masthead-logo-large {
    --masthead-logo-size: clamp(68px, 24vw, 96px);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .masthead-row {
    align-items: flex-start;
  }

  th,
  td {
    padding: 12px 8px;
  }
}
