:root {
  --primary-900: #333d4f;
  --primary-800: #39475d;
  --primary-700: #42536f;
  --primary-600: #506688;
  --primary-100: #ebeef3;
  --accent-500: #eab308;
  --accent-400: #facc15;
  --neutral-950: #0a0a0a;
  --neutral-900: #171717;
  --neutral-800: #262626;
  --neutral-700: #404040;
  --neutral-600: #525252;
  --neutral-500: #737373;
  --neutral-300: #d4d4d4;
  --neutral-200: #e5e5e5;
  --neutral-100: #f5f5f5;
  --neutral-50: #fafafa;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 45px rgba(15, 23, 42, 0.16);
  --radius: 0.5rem;
  --container: 80rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.5;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-900);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.logo:hover {
  color: var(--primary-700);
}

.logo-mark {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(80, 102, 136, 0.3);
}

.logo-mark::after {
  content: "";
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--accent-500);
  transition: transform 0.2s ease;
}

.logo:hover .logo-mark::after {
  transform: scale(1.15);
}

.logo-mark svg {
  width: 1.15rem;
  height: 1.15rem;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  color: var(--neutral-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--primary-600);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

.search-form {
  position: relative;
}

.search-form input {
  width: 16rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem 0.55rem 2.35rem;
  color: var(--neutral-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--primary-600);
}

.search-form svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  color: var(--neutral-500);
  transform: translateY(-50%);
}

.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: var(--radius);
  color: var(--neutral-700);
  background: transparent;
  transition: background 0.2s ease;
}

.mobile-menu-button:hover {
  background: var(--neutral-100);
}

.mobile-menu-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel-inner {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.mobile-nav {
  display: grid;
  gap: 0.2rem;
}

.mobile-nav a {
  padding: 0.65rem 0;
  color: var(--neutral-700);
  font-weight: 600;
}

.hero {
  position: relative;
  height: 500px;
  background: var(--neutral-900);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.04));
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 42rem;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--primary-900);
  background: var(--accent-500);
  font-size: 0.875rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 1.5rem;
  color: var(--neutral-200);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: var(--neutral-300);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius);
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--white);
  background: var(--primary-600);
}

.button-primary:hover {
  background: var(--primary-700);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.28);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-control svg {
  width: 1.5rem;
  height: 1.5rem;
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: var(--white);
}

.main-content {
  flex: 1;
}

.section {
  margin-bottom: 4rem;
}

.section-wrap {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--neutral-900);
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-lead {
  margin: 0.75rem 0 0;
  color: var(--neutral-600);
  max-width: 54rem;
}

.heading-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary-600);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--neutral-200);
}

.card-poster.wide {
  aspect-ratio: 16 / 9;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.card:hover .card-poster img {
  transform: scale(1.1);
}

.card-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), transparent);
  transition: opacity 0.25s ease;
}

.card:hover .card-gradient {
  opacity: 1;
}

.card-region {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
}

.card-year {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  color: var(--white);
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.75rem;
  font-weight: 700;
}

.card-body {
  padding: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--neutral-900);
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 800;
  transition: color 0.2s ease;
}

.card:hover h3 {
  color: var(--primary-600);
}

.card p {
  margin: 0 0 0.75rem;
  color: var(--neutral-600);
  font-size: 0.925rem;
}

.line-2,
.line-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.line-2 {
  -webkit-line-clamp: 2;
}

.line-3 {
  -webkit-line-clamp: 3;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--neutral-500);
  font-size: 0.78rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 700;
}

.pill-accent {
  color: var(--white);
  background: var(--accent-500);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-button {
  border: 0;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  color: var(--neutral-700);
  background: var(--neutral-100);
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-button:hover {
  background: var(--neutral-200);
}

.tab-button.is-active {
  color: var(--white);
  background: var(--primary-600);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.category-tile {
  display: block;
  min-height: 12rem;
  border-radius: 1rem;
  padding: 1.25rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.category-tile h3 {
  margin: 0 0 0.7rem;
  font-size: 1.35rem;
}

.category-tile p {
  margin: 0 0 1.2rem;
  color: var(--neutral-200);
}

.category-mini-list {
  display: grid;
  gap: 0.45rem;
  color: var(--neutral-100);
  font-size: 0.9rem;
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.rank-item {
  display: grid;
  gap: 1rem;
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-0.2rem);
  box-shadow: var(--shadow-xl);
}

.rank-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.35rem;
  background: var(--neutral-200);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.rank-item:hover .rank-cover img {
  transform: scale(1.08);
}

.rank-number {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  border-radius: 0.25rem;
  padding: 0.25rem 0.45rem;
  color: var(--white);
  background: var(--primary-600);
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.rank-body p {
  margin: 0 0 0.75rem;
  color: var(--neutral-600);
}

.page-hero {
  padding: 3.5rem 0 2.2rem;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.28), transparent 28rem), linear-gradient(135deg, var(--primary-600), var(--primary-900));
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 1rem 0 0;
  max-width: 56rem;
  color: var(--neutral-200);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: var(--white);
}

.filter-bar {
  margin-bottom: 1.5rem;
}

.filter-input {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--primary-600);
}

.detail-layout {
  display: grid;
  gap: 2rem;
}

.player-shell {
  overflow: hidden;
  border-radius: 0.85rem;
  background: var(--neutral-950);
  box-shadow: var(--shadow-xl);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--neutral-950);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--neutral-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--white);
  background: var(--neutral-950);
  overflow: hidden;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.18));
}

.player-cover.is-hidden {
  display: none;
}

.play-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease;
}

.player-cover:hover .play-core {
  transform: scale(1.08);
  background: var(--primary-700);
}

.play-core svg {
  width: 2.2rem;
  height: 2.2rem;
  margin-left: 0.25rem;
}

.player-titlebar {
  padding: 1rem 1.2rem;
  color: var(--white);
  background: var(--neutral-900);
}

.player-titlebar h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.detail-card {
  border-radius: 0.85rem;
  padding: 1.25rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-card h2 {
  margin: 0 0 0.9rem;
  color: var(--neutral-900);
  font-size: 1.4rem;
}

.detail-card p {
  margin: 0 0 0.9rem;
  color: var(--neutral-700);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.sidebar-card {
  border-radius: 0.85rem;
  padding: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.sidebar-card img {
  width: 100%;
  border-radius: 0.55rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--neutral-200);
}

.sidebar-card h2 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
}

.sidebar-card p {
  margin: 0;
  color: var(--neutral-600);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer {
  margin-top: auto;
  color: var(--white);
  background: var(--primary-900);
}

.footer-inner {
  padding: 3rem 0;
  display: grid;
  gap: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-brand p {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: var(--neutral-300);
  font-size: 0.95rem;
}

.footer-links h3 {
  margin: 0 0 1rem;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--neutral-300);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  border-top: 1px solid var(--primary-800);
  padding-top: 1.5rem;
  color: var(--neutral-300);
  font-size: 0.9rem;
}

.search-results {
  min-height: 18rem;
}

.empty-state {
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--neutral-600);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

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

  .rank-item {
    grid-template-columns: 12rem 1fr;
  }
}

@media (min-width: 768px) {
  .main-nav,
  .header-actions {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }

  .hero {
    height: 600px;
  }

  .hero-control {
    display: inline-flex;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 767px) {
  .logo {
    font-size: 1.05rem;
  }

  .hero-content {
    max-width: 100%;
    padding-right: 1rem;
  }

  .hero-meta {
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-wrap {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}
