:root {
  --bg: #f8fafc;
  --bg-soft: #ecfdf5;
  --panel: #ffffff;
  --panel-strong: #f9fafb;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #059669;
  --accent-deep: #047857;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f0fdf4 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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.90);
  border-bottom: 1px solid rgba(226, 232, 240, 0.90);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #34d399);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

.brand-name {
  font-size: 20px;
  color: #0f172a;
}

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

.nav-link {
  position: relative;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 12px 14px;
  color: #475569;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 700;
}

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

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(52, 211, 153, 0.18), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(16, 185, 129, 0.20), transparent 24%),
    linear-gradient(135deg, #ecfdf5 0%, #f8fafc 45%, #ffffff 100%);
}

.hero-slide {
  display: none;
  max-width: 1240px;
  min-height: 620px;
  margin: 0 auto;
  padding: 82px 24px 130px;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 56px;
}

.hero-slide.active {
  display: grid;
  animation: fadeSlide 0.55s ease both;
}

.hero-visual {
  position: relative;
  min-height: 460px;
  border-radius: 34px;
  overflow: hidden;
  background: #d1fae5;
  box-shadow: var(--shadow);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.52));
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-slide.active .hero-visual img {
  transform: scale(1.025);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 20px 0 12px;
  color: var(--accent-deep);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 680px;
  margin: 0;
  color: #475569;
  font-size: 18px;
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.86);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-search button {
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, var(--accent), #10b981);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.24);
}

.ghost-btn,
.section-more {
  color: var(--accent-deep);
  border: 1px solid rgba(5, 150, 105, 0.18);
  background: #ffffff;
}

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  width: min(1192px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(280px, 440px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search {
  display: flex;
  gap: 10px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  color: #0f172a;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(5, 150, 105, 0.42);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.10);
}

.quick-links a {
  padding: 9px 13px;
  color: #047857;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 800;
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  cursor: pointer;
}

.hero-dot.active {
  width: 48px;
  background: var(--accent);
}

.content-section,
.page-hero,
.detail-hero,
.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 24px 0;
}

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

.section-heading h2,
.category-overview-head h2,
.player-section h2,
.detail-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(5, 150, 105, 0.30);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #d1fae5;
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.25);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-width: 56px;
  min-height: 30px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 36px;
  min-height: 36px;
}

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

.movie-card h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.3;
}

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

.movie-card p {
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.tag-row span {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
}

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

.rank-panel,
.category-overview-card,
.filter-section,
.detail-copy,
.player-section {
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.rank-panel {
  position: sticky;
  top: 96px;
}

.compact-heading {
  margin-bottom: 18px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li + li {
  margin-top: 10px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
  background: #ecfdf5;
  transform: translateX(3px);
}

.rank-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: var(--accent);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  color: #0f172a;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-type {
  color: var(--muted);
  font-size: 13px;
}

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

.category-tile {
  display: block;
  overflow: hidden;
  min-height: 250px;
  padding: 22px;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.category-tile span {
  display: block;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  min-height: 70px;
  margin: 10px 0 18px;
  color: #64748b;
  font-size: 14px;
}

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

.category-tile img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #d1fae5;
}

.page-hero {
  padding-top: 72px;
}

.simple-hero,
.rank-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  border-radius: 0 0 36px 36px;
}

.simple-hero div,
.rank-hero div {
  width: 100%;
  padding: 42px;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 20%, rgba(52, 211, 153, 0.16), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  box-shadow: var(--shadow);
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 24px;
}

.empty-state {
  margin-top: 28px;
  padding: 24px;
  color: #64748b;
  text-align: center;
  border-radius: 20px;
  background: #f8fafc;
}

.detail-main {
  padding-bottom: 70px;
}

.detail-hero {
  padding-top: 48px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-deep);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.14), transparent 24%),
    #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: #d1fae5;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
}

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

.detail-info .primary-btn {
  margin-top: 24px;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.player-section {
  margin-top: 34px;
}

.player-section h2 {
  margin-bottom: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.30);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.32);
  font-size: 32px;
  transform: translateX(3px);
}

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

.detail-copy {
  margin-top: 34px;
}

.detail-copy h2 + p {
  margin-top: 12px;
}

.detail-copy p + h2 {
  margin-top: 28px;
}

.detail-copy p {
  margin-bottom: 0;
  color: #475569;
  font-size: 17px;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.28);
}

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

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

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

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

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: auto;
  }

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

  .hero-slide {
    min-height: auto;
    padding: 34px 18px 210px;
    gap: 28px;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 320px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    bottom: 24px;
    width: calc(100% - 28px);
  }

  .hero-dots {
    bottom: 168px;
  }

  .hero-search {
    flex-direction: column;
  }

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

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

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

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-layout {
    padding: 20px;
  }

  .detail-poster {
    max-width: 320px;
  }

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

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

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

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

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-content h2 {
    font-size: 28px;
  }

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

  .simple-hero div,
  .rank-hero div,
  .rank-panel,
  .category-overview-card,
  .filter-section,
  .detail-copy,
  .player-section {
    padding: 20px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
