* {
  box-sizing: border-box;
}

:root {
  --page: #f7faf9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #ecfdf5;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-deep: #064e3b;
  --teal: #0f766e;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  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: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.28);
}

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

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

.nav-link {
  padding: 9px 15px;
  border-radius: 999px;
  color: #475569;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
  background: var(--soft);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #334155;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-panel.is-open {
  display: grid;
  gap: 6px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.42), transparent 32%), linear-gradient(135deg, #031a16 0%, #064e3b 42%, #0f172a 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 520px;
  height: 520px;
  right: -120px;
  top: -160px;
  background: rgba(45, 212, 191, 0.18);
  filter: blur(6px);
}

.hero::after {
  width: 420px;
  height: 420px;
  left: -160px;
  bottom: -140px;
  background: rgba(5, 150, 105, 0.24);
  filter: blur(4px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 54px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d1fae5;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.primary-button,
.secondary-button,
.text-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--brand-deep);
  background: #ffffff;
  box-shadow: 0 20px 42px rgba(255, 255, 255, 0.16);
}

.secondary-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.text-button,
.section-more {
  color: var(--brand-dark);
  background: var(--soft);
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  width: min(620px, 100%);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.hero-search a {
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 999px;
  color: #064e3b;
  background: #ffffff;
  font-weight: 800;
}

.hero-stage {
  position: relative;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.32);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  position: absolute;
  inset: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 4%, rgba(2, 6, 23, 0.12) 36%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-slide-content {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.hero-slide-content h2 {
  margin: 0 0 10px;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.12;
}

.hero-slide-content p {
  margin: 0 0 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}

.slide-tags,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slide-tags span,
.meta-line span,
.tag-list a,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 750;
}

.slide-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.15);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 26px;
  display: flex;
  gap: 9px;
}

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

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

.hero-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.hero-mini a,
.stat-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  backdrop-filter: blur(14px);
}

.hero-mini strong,
.stat-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.hero-mini span,
.stat-card span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card,
.category-card,
.detail-panel,
.side-panel,
.search-panel,
.rank-row {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster,
.category-art,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #14b8a6);
}

.poster {
  aspect-ratio: 16 / 10;
}

.poster img,
.hero-slide img,
.category-art img,
.rank-cover img,
.detail-cover img,
.player-box video {
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .poster img,
.category-card:hover .category-art img,
.rank-row:hover .rank-cover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.card-body {
  padding: 18px;
}

.movie-card h3,
.rank-info h3,
.category-card h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.category-card h2 a:hover {
  color: var(--brand-dark);
}

.movie-card p,
.rank-info p,
.category-card p,
.detail-panel p,
.side-panel p {
  margin: 0;
  color: var(--muted);
}

.card-large {
  grid-column: span 2;
}

.card-large .poster {
  aspect-ratio: 16 / 8.5;
}

.card-large h3 {
  font-size: 25px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  overflow: hidden;
  padding: 14px;
  border-radius: var(--radius);
}

.category-art {
  min-height: 164px;
  border-radius: 18px;
}

.mini-links,
.footer-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a,
.footer-links a {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.search-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.page-hero {
  padding: 64px 0 32px;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 52%, #f8fafc 100%);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 74px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
}

.rank-num {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  font-weight: 900;
}

.rank-cover {
  width: 150px;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at 18% 8%, rgba(20, 184, 166, 0.24), transparent 30%), linear-gradient(135deg, #020617, #064e3b 52%, #111827);
}

.detail-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.36);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  font-size: 32px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  color: #ffffff;
  font-size: 14px;
}

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

.detail-panel,
.side-panel {
  border-radius: var(--radius);
  padding: 26px;
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-panel h2,
.side-panel h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #064e3b, #14b8a6);
  aspect-ratio: 16 / 10;
}

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

.side-movie {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.side-movie .poster {
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

.side-movie h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-movie p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #0f172a 60%, #064e3b);
}

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

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

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #bbf7d0;
}

.hidden-by-search {
  display: none !important;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 0 44px;
    gap: 34px;
  }

  .hero-slider {
    min-height: 430px;
    border-radius: 26px;
  }

  .hero-mini {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 44px 0;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

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

  .card-large {
    grid-column: span 2;
  }

  .category-card {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 52px 96px minmax(0, 1fr);
  }

  .rank-row .text-button {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .rank-cover {
    width: 96px;
  }

  .detail-panel,
  .side-panel {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .card-large {
    grid-column: span 1;
  }

  .hero-search {
    border-radius: 22px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search input {
    padding: 10px 12px;
  }

  .hero-search a {
    text-align: center;
  }
}
