* {
  box-sizing: border-box;
}

:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --blue-600: #2563eb;
  --cyan-500: #06b6d4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

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

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

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

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid var(--gray-200);
}

.mobile-link {
  display: block;
  padding: 12px 0;
  font-weight: 700;
  color: var(--gray-700);
}

.mobile-link.is-active {
  color: var(--sky-600);
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #0284c7, #2563eb 46%, #06b6d4);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: radial-gradient(circle at 20% 20%, #ffffff 0 2px, transparent 3px), radial-gradient(circle at 80% 0, #ffffff 0 1px, transparent 2px);
  background-size: 48px 48px, 72px 72px;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  padding: 64px 0 74px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 52px;
  animation: fadeIn 0.55s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--sky-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #dff7ff;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e0f2fe;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.72;
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

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

.primary-btn {
  background: #ffffff;
  color: var(--sky-700);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.ghost-btn {
  border: 2px solid rgba(255, 255, 255, 0.88);
  color: #ffffff;
  background: rgba(3, 105, 161, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.global-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  min-height: 480px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(2, 8, 23, 0.32);
  transform: rotate(1.2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(12px);
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 32px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 28px;
  background: #ffffff;
}

.stats-panel {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 26px 18px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card strong {
  display: block;
  color: var(--gray-900);
  font-size: 26px;
  line-height: 1.2;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
  font-size: 14px;
}

.section-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-heading h2,
.page-hero h1 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--gray-600);
  font-size: 16px;
  line-height: 1.7;
}

.section-heading a {
  color: var(--sky-600);
  font-weight: 900;
}

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

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

.category-card {
  min-height: 248px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-icon {
  font-size: 30px;
}

.category-arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--sky-600);
  font-size: 26px;
}

.category-card h3 {
  margin: 20px 0 10px;
  font-size: 22px;
}

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

.category-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.category-thumbs img {
  width: 52px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gray-100);
}

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--gray-100);
}

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

.movie-card-link:hover img {
  transform: scale(1.08);
}

.movie-poster-wrap figcaption,
.movie-year {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.movie-poster-wrap figcaption {
  right: 12px;
  background: var(--sky-600);
}

.movie-year {
  left: 12px;
  background: rgba(17, 24, 39, 0.72);
}

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

.movie-card-body h3 {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: var(--sky-600);
}

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 700;
}

.rank-section {
  background: linear-gradient(135deg, #0f172a, #1e3a8a 48%, #0369a1);
}

.light-heading h2,
.light-heading p,
.light-heading span,
.light-heading a {
  color: #ffffff;
}

.light-heading p {
  opacity: 0.78;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.ranking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.ranking-no {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
  color: #ffffff;
  font-weight: 900;
  flex: 0 0 auto;
}

.ranking-item img {
  width: 62px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gray-100);
  flex: 0 0 auto;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.45;
}

.ranking-info em {
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: linear-gradient(120deg, var(--sky-600), var(--blue-600), var(--cyan-500));
  color: #ffffff;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 12% 0, rgba(255, 255, 255, 0.28), transparent 28%), radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.18), transparent 24%);
}

.page-hero > div {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero span,
.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  opacity: 0.86;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--sky-600);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  margin-bottom: 26px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.filter-panel label {
  display: block;
  color: var(--gray-700);
  font-weight: 800;
}

.filter-panel span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.filter-panel input,
.filter-panel select,
.global-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.global-search input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.info-card,
.related-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
}

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

.play-mark {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--sky-600);
  font-size: 28px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.24);
}

.player-cover strong {
  font-size: 18px;
}

.detail-card {
  padding: 28px;
}

.detail-category {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-size: 13px;
  font-weight: 900;
}

.detail-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.detail-card section + section {
  margin-top: 28px;
}

.detail-card h2,
.info-card h2,
.related-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-card p {
  color: var(--gray-700);
  line-height: 1.82;
}

.review-box {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

.detail-tags span {
  background: var(--sky-100);
  color: var(--sky-700);
}

.detail-aside {
  display: grid;
  gap: 22px;
}

.info-card,
.related-card {
  padding: 22px;
}

.info-card dl {
  margin: 0;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.info-card div:last-child {
  border-bottom: 0;
}

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

.info-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 76px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gray-100);
  flex: 0 0 auto;
}

.related-item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.42;
  transition: color 0.2s ease;
}

.related-item:hover strong {
  color: var(--sky-600);
}

.related-item em {
  display: block;
  margin-top: 5px;
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
}

.global-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.global-search button {
  border: 0;
  background: linear-gradient(135deg, var(--sky-600), var(--blue-600));
  color: #ffffff;
  cursor: pointer;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.search-result-card {
  display: block;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.search-result-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: var(--gray-100);
}

.search-result-card div {
  padding: 14px;
}

.search-result-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
}

.search-result-card p,
.empty-state {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.6;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.72;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.site-footer a {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

.is-hidden-by-filter {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero-slide,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 420px;
    min-height: 520px;
  }

  .hero-poster img {
    min-height: 520px;
  }

  .category-grid,
  .movie-grid,
  .ranking-grid,
  .ranking-grid-page,
  .search-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: auto;
    padding: 44px 0 68px;
  }

  .hero-slide.is-active {
    display: grid;
    gap: 30px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 420px;
  }

  .hero-dots {
    left: 0;
    bottom: 24px;
  }

  .stats-panel,
  .category-grid,
  .movie-grid,
  .ranking-grid,
  .ranking-grid-page,
  .search-results,
  .footer-inner,
  .filter-panel,
  .global-search {
    grid-template-columns: 1fr;
  }

  .stats-panel {
    margin-top: -28px;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-flex;
    margin-top: 16px;
  }

  .section-wrap {
    padding: 52px 0;
  }

  .movie-poster-wrap img {
    height: 330px;
  }

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