:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #ccfbf1;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
}

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

img {
  display: block;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.top-nav {
  max-width: 1280px;
  margin: 0 auto;
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.28);
}

.brand-name {
  font-size: 20px;
}

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

.nav-links a,
.nav-group > button {
  border: 0;
  background: transparent;
  padding: 22px 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active,
.nav-group:hover > button {
  color: var(--teal-dark);
}

.nav-group {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 64px;
  left: -18px;
  width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-group:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-dropdown a:hover {
  background: #f0fdfa;
}

.nav-search,
.mobile-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search {
  margin-left: auto;
}

.nav-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: white;
  color: var(--gray-900);
  outline: none;
  transition: 0.2s ease;
}

.nav-search input {
  width: 260px;
  padding: 11px 14px;
}

.nav-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.nav-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-search button,
.mobile-search button,
.wide-search button,
.primary-btn {
  color: white;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.24);
}

.nav-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.3);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-btn.light {
  border-color: rgba(20, 184, 166, 0.25);
  color: var(--teal-dark);
  background: white;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--gray-900);
}

.mobile-menu {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--gray-200);
}

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

.mobile-search input {
  flex: 1;
  padding: 12px 14px;
}

.mobile-links {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-links a {
  padding: 12px;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(120deg, #0f172a, #111827);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.1) contrast(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 30%, rgba(20, 184, 166, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 600px;
  padding: 92px 24px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  padding: 8px 12px;
  background: rgba(20, 184, 166, 0.18);
  color: #99f6e4;
  border: 1px solid rgba(153, 246, 228, 0.25);
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--teal);
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(16px);
}

.hero-prev,
.hero-next,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
  width: 28px;
  background: #5eead4;
}

.search-panel,
.content-section,
.page-hero,
.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
  padding-top: 26px;
  padding-bottom: 26px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel h2 {
  font-size: 26px;
}

.search-panel p {
  margin-top: 8px;
  color: var(--gray-500);
  line-height: 1.7;
}

.wide-search input {
  flex: 1;
  padding: 15px 16px;
  font-size: 16px;
}

.wide-search button {
  padding: 15px 22px;
}

.content-section {
  padding-top: 58px;
  padding-bottom: 18px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading > a {
  color: var(--teal-dark);
  font-weight: 900;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--shadow);
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.poster-link img,
.rank-thumb img,
.detail-cover img,
.category-images img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img {
  transform: scale(1.06);
}

.year-badge,
.play-dot {
  position: absolute;
  z-index: 2;
}

.year-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.62);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: rgba(20, 184, 166, 0.92);
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.3);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--teal-dark);
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.65;
}

.movie-meta {
  font-size: 13px;
  font-weight: 700;
}

.movie-line {
  margin-top: 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--teal-dark);
  background: #f0fdfa;
}

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.movie-card.compact h3 {
  font-size: 16px;
}

.movie-card.compact .movie-line {
  font-size: 13px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

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

.category-card {
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--gray-200);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.32);
}

.category-card.large {
  min-height: 340px;
}

.category-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.category-card.large .category-images {
  height: 210px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card div:last-child {
  padding: 18px;
}

.category-card h3,
.category-card h2 {
  margin: 0 0 8px;
}

.category-card p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--teal-dark);
  font-weight: 900;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 82px minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.rank-index {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  font-weight: 900;
}

.rank-thumb {
  height: 112px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.rank-content h3,
.rank-content p {
  margin: 0;
}

.rank-content h3 {
  font-size: 19px;
}

.rank-content p {
  margin-top: 8px;
  color: var(--gray-500);
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #f0fdfa;
  font-size: 12px;
  font-weight: 800;
}

.rank-score {
  justify-self: end;
  color: #f59e0b;
  font-size: 28px;
  font-weight: 900;
}

.page-hero {
  margin-top: 24px;
  border-radius: 30px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: white;
  background:
    radial-gradient(circle at 82% 20%, rgba(45, 212, 191, 0.38), transparent 30%),
    linear-gradient(135deg, #0f172a, #111827 55%, #0f766e);
  box-shadow: var(--shadow);
}

.page-hero > div {
  max-width: 820px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: -0.06em;
}

.page-hero p {
  margin: 16px 0 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
}

.compact-hero {
  min-height: 250px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--gray-200);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 13px 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  color: var(--gray-500);
  background: white;
  border: 1px solid var(--gray-200);
}

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

.detail-layout {
  padding-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 14px;
  margin: 0 0 16px;
}

.breadcrumb a {
  color: var(--teal-dark);
  font-weight: 800;
}

.detail-main {
  overflow: hidden;
  border-radius: 30px;
  background: white;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  padding: 0;
  background: #020617;
  cursor: pointer;
  overflow: hidden;
}

.player-overlay img {
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.08);
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28), rgba(15, 23, 42, 0.58));
}

.big-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  font-size: 38px;
  box-shadow: 0 22px 60px rgba(20, 184, 166, 0.34);
}

.player-box.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-info {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.detail-text h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.detail-meta {
  margin: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
}

.lead-text {
  margin: 0;
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1.8;
}

.tag-row.wide span {
  padding: 8px 12px;
}

.story-section {
  padding: 0 28px 28px;
}

.story-section h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.story-section p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.9;
  font-size: 16px;
}

.related-section {
  padding-top: 42px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: white;
  font-size: 20px;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  line-height: 1.8;
  color: #94a3b8;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

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

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

@media (max-width: 760px) {
  .top-nav {
    height: 62px;
    padding: 0 16px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 540px;
  }

  .hero-content {
    padding: 70px 18px 108px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-left: 16px;
    margin-right: 16px;
    padding: 20px;
  }

  .wide-search {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content-section,
  .page-hero,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-line,
  .tag-row {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .rank-thumb {
    height: 88px;
  }

  .rank-content p,
  .rank-meta {
    display: none;
  }

  .page-hero {
    min-height: 240px;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 32px;
    padding-bottom: 32px;
  }

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

  .detail-info {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .detail-cover {
    max-width: 220px;
  }

  .story-section {
    padding: 0 18px 24px;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-grid.overview {
    grid-template-columns: 1fr;
  }

  .hero-controls {
    bottom: 18px;
  }

  .category-images {
    height: 190px;
  }
}
