:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #eefdfa;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --dark: #0f172a;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --amber: #f59e0b;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo {
  font-size: 22px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--teal), #14b8a6);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.35);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 600;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.84);
}

.mobile-nav a:hover {
  background: rgba(20, 184, 166, 0.18);
  color: #ffffff;
}

.home-hero {
  width: min(1200px, calc(100% - 32px));
  height: 600px;
  margin: 28px auto 48px;
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide,
.hero-slide img,
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img,
.page-hero img {
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.56) 46%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 690px;
  padding: 82px 56px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  background: rgba(13, 148, 136, 0.12);
  color: var(--teal-dark);
}

.hero-content h1,
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.12;
  font-weight: 800;
}

.hero-content p,
.page-hero p {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span,
.detail-tags span {
  background: #ecfdf5;
  color: #047857;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 16px 32px rgba(13, 148, 136, 0.28);
}

.primary-button:hover {
  background: var(--teal-dark);
  transform: translateY(-2px) scale(1.02);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.ghost-button {
  color: var(--teal-dark);
  background: #e6fffb;
}

.ghost-button:hover {
  background: #ccfbf1;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: 0.22s ease;
}

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

.search-panel {
  margin-bottom: 60px;
  padding: 28px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1.4fr);
  gap: 28px;
  align-items: center;
}

.search-panel h2,
.section-head h2,
.movie-intro h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-panel p,
.section-head p,
.category-card-large p,
.category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dbe4ea;
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #ffffff;
  transition: 0.2s ease;
}

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

.content-section {
  margin-bottom: 64px;
}

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

.section-more {
  color: var(--teal-dark);
  font-weight: 800;
}

.section-more:hover {
  color: var(--teal);
}

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

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

.category-movie-grid {
  margin-top: 24px;
}

.movie-card {
  min-width: 0;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 16 / 11;
}

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

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

.poster-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.66) 100%);
  opacity: 0;
  transition: 0.25s ease;
}

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

.play-badge,
.player-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 18px 38px rgba(13, 148, 136, 0.36);
}

.year-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.card-meta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  padding: 20px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: end;
  box-shadow: var(--soft-shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.86));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #f0fdfa;
}

.rank-num {
  font-size: 21px;
  font-weight: 900;
  color: var(--teal-dark);
}

.rank-item img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-year {
  color: #64748b;
  font-weight: 800;
}

.page-hero {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.slim-hero {
  min-height: 320px;
}

.page-hero .container,
.page-hero-content {
  position: relative;
  z-index: 2;
}

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

.breadcrumb {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-card-large {
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

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

.category-card-large a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 210px;
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 900;
}

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

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

.category-stack {
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

.category-stack img {
  position: absolute;
  width: 62%;
  height: 72%;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
}

.category-stack img:nth-child(1) {
  left: 20px;
  top: 24px;
  z-index: 3;
}

.category-stack img:nth-child(2) {
  right: 14px;
  bottom: 20px;
  z-index: 2;
  opacity: 0.78;
}

.category-stack img:nth-child(3) {
  right: 46px;
  top: 12px;
  z-index: 1;
  opacity: 0.48;
}

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

.ranking-card {
  position: relative;
}

.ranking-index {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

.detail-top {
  padding: 30px 0 0;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 30%), linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #ffffff;
}

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

.player-panel,
.detail-side {
  min-width: 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

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

.detail-side {
  display: grid;
  align-content: end;
  gap: 14px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-side-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-side-info span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.detail-content {
  margin-top: 38px;
}

.movie-intro {
  max-width: 940px;
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.movie-intro .lead {
  margin: 16px 0 18px;
  color: #334155;
  font-size: 20px;
  line-height: 1.8;
  font-weight: 700;
}

.movie-intro h2 {
  margin: 30px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.movie-intro p {
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.info-grid {
  margin: 26px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.info-grid div {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.info-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.info-grid span {
  color: var(--text);
  font-weight: 900;
}

.no-results {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

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

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1.2fr);
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 700;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: block;
  }

  .home-hero {
    height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 54px 28px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.58));
  }

  .search-panel,
  .detail-layout,
  .footer-inner,
  .category-card-large a {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-side {
    display: none;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-nav,
  .home-hero,
  .footer-inner {
    width: min(100% - 22px, 1200px);
  }

  .home-hero {
    height: 620px;
    margin-top: 14px;
  }

  .hero-content {
    padding: 40px 20px;
  }

  .hero-dots {
    right: 20px;
    bottom: 20px;
  }

  .search-panel,
  .movie-intro {
    padding: 20px;
  }

  .filter-bar,
  .movie-grid,
  .six-grid,
  .category-grid,
  .category-large-grid,
  .ranking-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }

  .rank-year {
    display: none;
  }

  .page-hero {
    min-height: 340px;
  }
}
