:root {
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --accent-50: #ecfeff;
  --accent-100: #cffafe;
  --accent-500: #06b6d4;
  --accent-600: #0891b2;
  --secondary-50: #fff7ed;
  --secondary-100: #ffedd5;
  --secondary-500: #f97316;
  --secondary-700: #c2410c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 12px 30px rgba(20, 184, 166, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell,
.nav-shell,
.footer-shell {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--shadow-soft);
}

.brand-text {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--primary-600), var(--accent-600));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--gray-700);
  font-weight: 600;
}

.nav-links a {
  transition: color 0.2s ease;
}

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

.global-search {
  position: relative;
  width: min(320px, 100%);
}

.global-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--gray-50);
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.global-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  background: var(--white);
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.search-results.is-open {
  display: block;
}

.search-results a,
.search-empty {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
}

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

.search-results strong {
  display: block;
  font-size: 0.95rem;
}

.search-results span,
.search-empty {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--gray-700);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--black);
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  left: 0;
  right: 0;
  padding-bottom: 78px;
}

.hero-copy {
  max-width: 780px;
  color: var(--white);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 16px 0 14px;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-movie-name {
  margin: -4px 0 14px;
  color: var(--primary-100);
  font-size: 1.35rem;
  font-weight: 700;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--gray-200);
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-actions,
.tag-row,
.card-meta,
.detail-meta,
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  font-size: 2.5rem;
  line-height: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-2px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--shadow-soft);
}

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-primary {
  color: var(--white);
  background: var(--primary-500);
}

.tag-secondary {
  color: var(--white);
  background: var(--secondary-500);
}

.tag-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
}

.tag-primary-soft {
  color: var(--primary-700);
  background: var(--primary-50);
}

.tag-accent-soft {
  color: var(--accent-600);
  background: var(--accent-50);
}

.tag-secondary-soft {
  color: var(--secondary-700);
  background: var(--secondary-50);
}

.tag-muted {
  color: var(--gray-700);
  background: var(--gray-100);
}

.section {
  padding: 72px 0;
}

.white-section {
  background: var(--white);
}

.soft-section {
  background: var(--gray-50);
}

.gradient-section {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  line-height: 1.1;
}

.section-heading p {
  max-width: 740px;
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-kicker {
  display: inline-flex;
  color: var(--secondary-500);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-link {
  flex: 0 0 auto;
  color: var(--primary-600);
  font-weight: 800;
}

.movie-grid,
.category-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 24px;
}

.movie-card,
.movie-list-card,
.overview-card,
.category-tile,
.detail-card,
.sidebar-card,
.page-hero-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-900);
}

.movie-card-featured .poster-wrap {
  height: 100%;
  min-height: 380px;
  aspect-ratio: auto;
  border-radius: var(--radius-xl);
}

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

.movie-card:hover .poster-wrap img,
.movie-list-card:hover .list-poster img {
  transform: scale(1.08);
}

.play-glow,
.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%);
}

.play-glow {
  width: 56px;
  height: 56px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-glow,
.movie-list-card:hover .play-glow {
  opacity: 1;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.38), transparent);
}

.featured-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  color: var(--white);
}

.featured-copy h3 {
  margin: 12px 0 8px;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.featured-copy p {
  margin: 0;
  color: var(--gray-200);
}

.card-body {
  padding: 18px;
}

.card-body h3,
.list-copy h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

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

.card-body p,
.list-copy p,
.poster-card p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 0.92rem;
}

.card-meta {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.compact-tags {
  margin-top: 12px;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-500), var(--primary-500));
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.movie-list-card a {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 150px;
}

.movie-list-card {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-list-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.list-poster {
  position: relative;
  overflow: hidden;
  background: var(--gray-900);
}

.list-copy {
  padding: 18px;
}

.ranking-list,
.latest-list {
  display: grid;
  gap: 16px;
}

.category-tile {
  min-height: 190px;
  padding: 24px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-tile span,
.overview-card h2 {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong,
.overview-count {
  display: block;
  margin: 12px 0;
  color: var(--primary-600);
  font-size: 2.2rem;
  line-height: 1;
}

.category-tile p,
.overview-card p {
  margin: 0;
  color: var(--gray-600);
}

.page-hero {
  padding: 48px 0;
  background: linear-gradient(135deg, var(--gray-900), #0f3f3b 52%, var(--primary-700));
}

.page-hero-card {
  padding: clamp(28px, 5vw, 52px);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.page-hero-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.08;
}

.page-hero-card p {
  max-width: 880px;
  margin: 0;
  color: var(--gray-200);
  font-size: 1.08rem;
}

.crumbs {
  margin-top: 18px;
  color: var(--gray-300);
  font-size: 0.92rem;
}

.crumbs a:hover {
  color: var(--primary-100);
}

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

.overview-main {
  display: block;
  padding: 28px 28px 20px;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 28px 28px;
}

.overview-links a {
  color: var(--gray-600);
  background: var(--gray-100);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.page-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
}

.sidebar-card {
  padding: 22px;
}

.sidebar {
  position: relative;
}

.sidebar .sidebar-card {
  position: sticky;
  top: 88px;
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.side-links {
  display: grid;
  gap: 8px;
}

.side-link {
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--gray-700);
  transition: background 0.2s ease, color 0.2s ease;
}

.side-link:hover,
.side-link.is-active {
  color: var(--white);
  background: var(--primary-500);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--radius-xl);
}

.empty-state.is-visible {
  display: block;
}

.watch-shell {
  padding: 28px 0 72px;
  background: var(--gray-50);
}

.watch-crumbs {
  margin: 0 0 18px;
  color: var(--gray-600);
}

.watch-crumbs a:hover {
  color: var(--primary-600);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 28px;
}

.watch-main {
  display: grid;
  gap: 24px;
}

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  background: var(--black);
  box-shadow: var(--shadow-lg);
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  color: var(--white);
  background: transparent;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-poster,
.player-dark {
  position: absolute;
  inset: 0;
}

.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-dark {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
}

.player-start {
  width: 86px;
  height: 86px;
  font-size: 2.2rem;
}

.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: none;
  max-width: min(90%, 420px);
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--white);
  text-align: center;
  background: rgba(0, 0, 0, 0.72);
  transform: translate(-50%, -50%);
}

.player-message.is-visible {
  display: block;
}

.detail-card {
  padding: clamp(22px, 4vw, 34px);
}

.detail-card h1 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
}

.detail-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.detail-meta {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
}

.watch-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.poster-card img {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: var(--gray-900);
}

.poster-card h2 {
  margin-top: 16px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.info-card dt {
  color: var(--gray-500);
}

.info-card dd {
  margin: 0;
  font-weight: 700;
}

.next-card {
  display: grid;
  gap: 10px;
}

.next-card a {
  color: var(--primary-700);
  font-weight: 700;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 1.1rem;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  color: var(--gray-400);
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--primary-400);
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-grid,
  .watch-layout,
  .page-layout,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .sidebar .sidebar-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-panel {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 10px 0 8px;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--gray-50);
  }

  .global-search {
    width: 100%;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-list-card a {
    grid-template-columns: 138px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .shell,
  .nav-shell,
  .footer-shell {
    width: min(100% - 24px, 1280px);
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 14px;
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
    padding-bottom: 72px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    flex: 1 1 100%;
  }

  .movie-grid,
  .category-grid,
  .overview-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .movie-list-card a {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .list-copy {
    padding: 14px;
  }

  .list-copy p,
  .compact-tags {
    display: none;
  }

  .player-start {
    width: 68px;
    height: 68px;
  }
}
