:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-900);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 3px 20px rgba(15, 23, 42, 0.04);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.site-logo span:last-child {
  font-size: 24px;
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-500));
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.3);
  font-weight: 900;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.main-nav a {
  font-size: 15px;
  color: var(--slate-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.search-panel input,
.local-filter {
  width: 230px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.local-filter:focus {
  background: var(--white);
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
  font-weight: 700;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: var(--slate-100);
  border-radius: 12px;
  font-size: 24px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--slate-200);
  padding: 18px 24px 24px;
  background: var(--white);
}

.mobile-menu.open {
  display: grid;
  gap: 12px;
}

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 700;
}

.mobile-menu a:hover {
  background: var(--slate-100);
  color: var(--teal-600);
}

.hero-carousel {
  background: linear-gradient(135deg, #0f766e, #0891b2);
  color: var(--white);
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 76px 96px;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 32%), linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.48));
}

.hero-text,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--teal-50);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--teal-700);
  background: var(--teal-50);
}

.hero-text h2 {
  margin: 0 0 20px;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-text p {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: 20px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
  color: var(--white);
  box-shadow: 0 16px 35px rgba(8, 145, 178, 0.26);
}

.btn-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.intro-bar,
.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.intro-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.intro-bar h1,
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.intro-bar p,
.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--slate-500);
  font-size: 18px;
  line-height: 1.8;
}

.section-title,
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title h2,
.panel-title h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.section-title a,
.panel-title a,
.toolbar-link {
  color: var(--teal-600);
  font-weight: 800;
}

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

.movie-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

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

.movie-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.72);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--teal-100), var(--slate-100));
  overflow: hidden;
}

.movie-card-compact .movie-poster {
  aspect-ratio: 4 / 5;
}

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

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

.movie-hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  padding: 18px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.82));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--teal-600);
  font-size: 20px;
  box-shadow: 0 16px 34px rgba(13, 148, 136, 0.36);
}

.movie-hover p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.movie-badge,
.movie-year {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  left: 12px;
  color: var(--white);
  background: var(--teal-600);
}

.movie-year {
  right: 12px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info h3 {
  color: var(--teal-600);
}

.movie-info p {
  margin: 10px 0 0;
  color: var(--slate-500);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--slate-100);
}

.split-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.side-card,
.detail-article,
.player-card,
.search-panel,
.toolbar {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(226, 232, 240, 0.76);
  box-shadow: var(--shadow-sm);
}

.ranking-panel,
.side-card,
.detail-article {
  padding: 24px;
}

.rank-list,
.wide-rank-list,
.side-list {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: var(--slate-100);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-weight: 900;
}

.rank-item img {
  width: 84px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
}

.rank-content {
  min-width: 0;
}

.rank-content strong {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content small {
  color: var(--slate-500);
  line-height: 1.5;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 12px;
  min-height: 142px;
  padding: 22px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.16);
  transition: transform 0.25s ease;
}

.category-overview-card:nth-child(even),
.category-card:nth-child(even) {
  background: linear-gradient(135deg, #0f766e, #155e75);
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
}

.category-card strong,
.category-overview-card h2 {
  margin: 0;
  font-size: 22px;
}

.category-card span,
.category-overview-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-overview-card > span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.page-hero {
  padding: 76px 24px;
  text-align: center;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(135deg, var(--teal-700), var(--cyan-600));
}

.page-hero.slim {
  padding: 58px 24px;
}

.page-hero .eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.page-hero p {
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.88);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
}

.toolbar label {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-weight: 800;
}

.local-filter {
  width: min(380px, 80vw);
}

.filtered-out {
  display: none !important;
}

.search-panel {
  justify-content: center;
  margin-bottom: 20px;
  padding: 22px;
}

.search-panel input {
  width: min(560px, 70vw);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.search-tags a {
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-intro p {
  max-width: 830px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
  padding: 0;
}

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-cover img {
  object-fit: cover;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
  box-shadow: 0 22px 46px rgba(8, 145, 178, 0.36);
  font-size: 34px;
  cursor: pointer;
}

.detail-article h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--slate-700);
  line-height: 1.9;
  font-size: 17px;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 24px;
}

.detail-facts span {
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 700;
}

.detail-pager {
  display: grid;
  gap: 12px;
}

.detail-pager a {
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-weight: 800;
}

.site-footer {
  margin-top: 42px;
  color: var(--slate-200);
  background: linear-gradient(135deg, #0f172a, #1f2937);
}

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

.footer-brand p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links h2 {
  color: var(--white);
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--teal-100);
}

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

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

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

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

  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero-stage {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 24px 94px;
  }

  .hero-poster {
    justify-self: start;
    width: min(280px, 70vw);
  }

  .hero-control {
    display: none;
  }

  .intro-bar,
  .section-title,
  .toolbar {
    align-items: start;
    flex-direction: column;
  }

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

  .wide-rank-list {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 70vw);
  }

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

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-logo span:last-child {
    font-size: 20px;
  }

  .content-section,
  .intro-bar {
    padding: 40px 16px;
  }

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

  .rank-item {
    grid-template-columns: 34px 74px minmax(0, 1fr);
  }

  .rank-item img {
    width: 74px;
  }

  .play-button {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
