:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --green: #34d399;
  --green-strong: #10b981;
  --cyan: #22d3ee;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-width: 320px;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}

.brand-name {
  font-size: 21px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--green);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  outline: none;
  color: #e5e7eb;
  background: rgba(51, 65, 85, 0.9);
  border-radius: 999px;
  padding: 11px 118px 11px 18px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.header-search button,
.mobile-search button,
.big-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  color: #06211a;
  font-weight: 700;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-button span {
  width: 25px;
  height: 2px;
  background: #fff;
  border-radius: 3px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 14px 16px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-search {
  position: relative;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  display: none;
  min-height: 660px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.28), transparent 36%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 46%, rgba(15, 23, 42, 0.48) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 660px;
  display: grid;
  grid-template-columns: 1.1fr 360px;
  align-items: center;
  gap: 48px;
  color: #fff;
  padding: 58px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  border: 1px solid rgba(52, 211, 153, 0.38);
  border-radius: 999px;
  padding: 6px 12px;
  color: #a7f3d0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.05;
  font-size: clamp(34px, 6vw, 72px);
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 18px;
  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: #042f2e;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 18px 30px rgba(16, 185, 129, 0.24);
}

.btn.ghost {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.42);
}

.btn.ghost.dark {
  color: var(--dark);
  border-color: var(--line);
  background: #fff;
}

.btn.text {
  color: var(--green);
  padding-inline: 8px;
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #06211a;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 800;
}

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

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

.hero-dot.active {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.home-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -34px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.big-search {
  position: relative;
  flex: 1;
}

.big-search input {
  min-height: 54px;
  color: var(--text);
  background: #f8fafc;
  border-color: var(--line);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--dark-soft);
  background: #e2e8f0;
  font-weight: 700;
}

.section-block {
  padding: 58px 0 10px;
}

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

.section-heading h2,
.rank-panel h2,
.footer-col h2,
.detail-article h2,
.category-overview-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p,
.category-overview-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-heading > a,
.rank-panel-head a {
  color: var(--green-strong);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e2b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.28);
}

.movie-info {
  padding: 16px;
}

.movie-tags span {
  color: #047857;
  background: #d1fae5;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.movie-info h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h2 a:hover {
  color: var(--green-strong);
}

.movie-info p {
  color: var(--muted);
  margin: 0 0 12px;
  min-height: 46px;
  line-height: 1.6;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

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

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

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

.category-tile em {
  margin-top: 8px;
  color: rgba(226, 232, 240, 0.88);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 88px;
  border-radius: 24px;
  padding: 22px;
  color: #e2e8f0;
  background: linear-gradient(180deg, #0f172a, #111827);
  box-shadow: var(--shadow);
}

.rank-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(52, 211, 153, 0.12);
  transform: translateX(4px);
}

.rank-row strong {
  grid-row: span 2;
  color: var(--green);
  font-size: 20px;
}

.rank-row em {
  color: #94a3b8;
  font-style: normal;
  font-size: 13px;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.28), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #020617 100%);
}

.page-hero.slim {
  padding: 72px max(16px, calc((100% - 1180px) / 2)) 76px;
}

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

.category-overview-list {
  display: grid;
  gap: 24px;
  padding: 54px 0;
}

.category-overview-card {
  border-radius: 24px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.small-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.small-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.small-card img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
  grid-row: span 2;
}

.small-card span {
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.small-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  color: var(--text);
  background: #f8fafc;
  border-color: var(--line);
  padding: 12px 14px;
  border-radius: 14px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

.ranking-cover strong {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.ranking-card h2 {
  margin: 4px 0 10px;
}

.ranking-card p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  color: #fff;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  padding: 34px 0 58px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--green);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
}

.player-section {
  margin-top: -38px;
  position: relative;
  z-index: 3;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.76));
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
}

.player-overlay.hidden {
  display: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e2b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.32);
  font-size: 26px;
}

.player-overlay strong {
  font-size: clamp(20px, 3vw, 32px);
  max-width: min(760px, 90%);
}

.detail-content {
  padding: 48px 0 0;
}

.detail-article {
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.detail-article p {
  color: #334155;
  line-height: 1.95;
  font-size: 17px;
}

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

.info-list div {
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-brand p,
.footer-col p {
  color: #94a3b8;
  line-height: 1.75;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h2 {
  color: #fff;
  font-size: 18px;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px 16px 24px;
  text-align: center;
  color: #94a3b8;
}

[hidden],
.is-hidden {
  display: none !important;
}

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: 740px;
  }

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

  .hero-poster,
  .detail-poster {
    width: min(280px, 80vw);
    margin: 0 auto;
  }

  .home-search-panel,
  .section-heading,
  .category-overview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .small-card-row,
  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .info-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-card {
    grid-template-columns: 110px 1fr;
  }
}

@media (max-width: 560px) {
  .site-header-inner {
    height: 62px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-copy .lead {
    font-size: 16px;
  }

  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .small-card-row,
  .info-list {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 92px 1fr;
    gap: 14px;
  }

  .detail-article {
    padding: 20px;
  }
}
