:root {
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f9fafb;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #1f2937;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img,
video {
  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;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.25);
}

.logo-text {
  font-size: 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 270px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input,
.mobile-search input,
.filter-input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.header-search input {
  padding-left: 12px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}

.header-search button,
.mobile-search button,
.filter-button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.2);
}

.header-search button {
  padding: 8px 14px;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #374151;
  background: transparent;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: #ffffff;
}

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

.mobile-nav-link {
  display: block;
  padding: 10px 0;
  color: #374151;
  font-weight: 700;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mobile-search button {
  padding: 8px 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide:first-child {
  position: relative;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 45%, rgba(20, 184, 166, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.84) 43%, rgba(17, 24, 39, 0.36) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 42px;
  padding: 88px 0 100px;
}

.hero-copy {
  max-width: 700px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  color: #ecfdf5;
  border: 1px solid rgba(236, 253, 245, 0.28);
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.26);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 690px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.hero-tags span,
.tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

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

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

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

.hero-search {
  display: flex;
  width: min(100%, 520px);
  margin-top: 24px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 14px;
}

.hero-search input::placeholder {
  color: #d1d5db;
}

.hero-search button {
  color: #ffffff;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.hero-poster-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-poster-info {
  padding: 20px;
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

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

.section {
  padding: 70px 0;
}

.section-tight {
  padding: 44px 0;
}

.section-soft {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.section-gray {
  background: linear-gradient(135deg, #f3f4f6, #f9fafb);
}

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

.section-head h1,
.section-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.text-link {
  color: var(--emerald);
  font-weight: 800;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow-strong);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.72));
  transition: opacity 0.22s ease;
}

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

.movie-card-body {
  display: block;
  padding: 18px;
}

.card-meta,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta strong {
  color: #eab308;
}

.card-meta em,
.card-foot span,
.rank-item em {
  font-style: normal;
}

.card-title {
  display: -webkit-box;
  min-height: 30px;
  margin: 9px 0 6px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--emerald);
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: block;
  margin-top: 12px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 750;
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.24);
  font-weight: 900;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 26px;
  color: #ffffff;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.95), rgba(13, 148, 136, 0.95));
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.95), rgba(5, 150, 105, 0.95));
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 18px;
  color: #ecfeff;
}

.category-card span {
  font-weight: 850;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 28px;
}

.rank-panel {
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 82px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-item img {
  width: 82px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #e5e7eb;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  color: #111827;
}

.rank-item em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.filter-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-card label {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
}

.filter-button {
  padding: 12px 20px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 750;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.22), transparent 34%),
    linear-gradient(135deg, #064e3b, #0f766e 55%, #111827);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #d1fae5;
  font-size: 18px;
}

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

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

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

.player-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(5, 150, 105, 0.28), transparent 35%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

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

.big-play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 24px 50px rgba(5, 150, 105, 0.34);
  font-size: 36px;
}

.player-caption {
  position: absolute;
  z-index: 2;
  left: 26px;
  right: 26px;
  bottom: 22px;
}

.player-caption strong {
  display: block;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.1;
}

.player-caption span {
  display: block;
  margin-top: 8px;
  color: #d1fae5;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.meta-chip {
  color: #065f46;
  background: #d1fae5;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.review-box {
  padding: 22px;
  border-left: 5px solid var(--emerald);
  border-radius: 18px;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  color: #047857;
  background: #ecfdf5;
}

.side-card {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 18px;
  color: #111827;
}

.side-movie {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.side-movie img {
  width: 86px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #e5e7eb;
}

.side-movie strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-movie span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.related-grid {
  margin-top: 34px;
}

.no-results {
  display: none;
  padding: 44px;
  color: #6b7280;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.no-results.show {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 50%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0 38px;
}

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

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

.site-footer p {
  max-width: 430px;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  padding: 20px;
  color: #9ca3af;
  border-top: 1px solid rgba(229, 231, 235, 0.12);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero-slider {
    min-height: 760px;
  }

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

  .side-card {
    position: static;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 780px;
  }

  .hero-content {
    padding: 56px 0 86px;
  }

  .hero-search {
    display: block;
  }

  .hero-search input {
    width: 100%;
    height: 42px;
  }

  .hero-search button {
    width: 100%;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

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

  .rank-item {
    grid-template-columns: 34px 72px 1fr;
  }

  .rank-item img {
    width: 72px;
  }
}
