:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0f766e;
  --cyan: #0891b2;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate);
  background: #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  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;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.28);
}

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

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: #0f172a;
}

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

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.hero-slider {
  position: relative;
  min-height: 530px;
  overflow: hidden;
  background: linear-gradient(135deg, #059669, #0f766e 48%, #0891b2);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.16), transparent 25%), linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #ffffff;
}

.hero-pill,
.page-hero span,
.section-heading span,
.intro-card span,
.wide-card span,
.detail-meta span,
.rank-index {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 710px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.primary-button,
.ghost-button,
.text-link,
.side-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 780;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--emerald-dark);
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.side-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(18px, calc((100% - 1180px) / 2));
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

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

.home-intro,
.search-panel,
.content-section,
.soft-section,
.detail-shell,
.site-footer .footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: -58px;
  position: relative;
  z-index: 5;
}

.intro-card,
.intro-rank,
.search-panel,
.movie-card,
.category-card,
.rank-box,
.wide-card,
.player-card,
.detail-content-card,
.related-section,
.rank-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-card,
.intro-rank {
  padding: 28px;
}

.intro-card span,
.section-heading span,
.wide-card span,
.page-hero span,
.rank-index {
  color: var(--emerald-dark);
  background: #d1fae5;
}

.intro-card h2,
.search-panel h2,
.section-heading h2,
.rank-box h2,
.page-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.intro-card p,
.search-panel p,
.page-hero p,
.category-body p,
.movie-card-body p,
.wide-card p,
.list-content p,
.rank-content p {
  margin: 0;
  color: var(--muted);
}

.intro-rank {
  display: grid;
  gap: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.intro-rank strong {
  font-size: 22px;
}

.intro-rank span {
  color: rgba(255, 255, 255, 0.85);
}

.search-panel {
  display: grid;
  gap: 20px;
  margin-top: 30px;
  padding: 26px;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #f8fafc;
}

.search-box input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #ffffff;
  border-color: var(--emerald);
  background: var(--emerald);
}

.content-section,
.soft-section {
  padding: 64px 0 0;
}

.soft-section {
  width: 100%;
  padding: 64px max(16px, calc((100% - 1180px) / 2)) 70px;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

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

.section-heading.compact h2 {
  font-size: 28px;
}

.section-heading a,
.text-link {
  color: var(--emerald-dark);
  font-weight: 800;
}

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

.movie-grid-full {
  align-items: stretch;
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame,
.category-image,
.rank-poster,
.list-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame {
  height: 220px;
}

.poster-frame img,
.category-image img,
.rank-poster img,
.list-poster img,
.side-poster img,
.wide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-card:hover img,
.rank-card:hover img,
.wide-card:hover img,
.movie-list-card:hover img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.card-play,
.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0);
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.play-dot {
  font-size: 24px;
}

.movie-card:hover .card-play,
.movie-list-card:hover .play-dot {
  opacity: 1;
  background: rgba(15, 23, 42, 0.34);
}

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

.movie-card-body h2,
.category-body h2,
.wide-card h2,
.list-title,
.rank-content h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-card-body h2 a:hover,
.category-body h2 a:hover,
.wide-card h2 a:hover,
.list-title:hover,
.rank-content h2 a:hover {
  color: var(--emerald);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.meta-line span {
  padding: 3px 8px;
  border-radius: 8px;
  background: #f1f5f9;
}

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

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

.category-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-image {
  height: 130px;
}

.category-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.74));
}

.category-image span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  color: #ffffff;
  font-weight: 850;
  font-size: 20px;
}

.category-body {
  padding: 18px;
}

.category-body ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: #475569;
  font-size: 14px;
}

.category-body li a:hover {
  color: var(--emerald);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
}

.rank-box {
  position: sticky;
  top: 94px;
  height: fit-content;
  padding: 24px;
}

.rank-box ol {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rank-box li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.rank-box li a:hover {
  background: #f1f5f9;
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 850;
}

.rank-name,
.rank-meta {
  display: block;
}

.rank-name {
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.wide-list {
  display: grid;
  gap: 22px;
}

.wide-card {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  overflow: hidden;
}

.wide-card a:first-child {
  min-height: 260px;
  overflow: hidden;
}

.wide-card div {
  padding: 28px;
  align-self: center;
}

.wide-card h2 {
  margin-top: 14px;
  font-size: 28px;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal) 52%, var(--cyan));
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.category-hero,
.rank-hero {
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(135deg, #0f766e, #0891b2);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-poster {
  height: 120px;
  border-radius: 14px;
}

.rank-content h2 {
  font-size: 22px;
}

.detail-shell {
  padding: 32px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald);
}

.player-card {
  overflow: hidden;
}

.static-player {
  position: relative;
  background: #000000;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.static-player.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.play-button-large {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  font-size: 34px;
}

.detail-content-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  margin-top: 24px;
  padding: 30px;
}

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

.detail-content-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.lead-text {
  padding-left: 16px;
  color: #334155;
  border-left: 4px solid var(--emerald);
  font-size: 19px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}

.tag-row span {
  padding: 6px 10px;
  border-radius: 10px;
  color: #334155;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 650;
}

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

.article-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.article-section p {
  margin: 0;
  color: #334155;
  white-space: pre-line;
}

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

.info-grid div {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.info-grid .wide {
  grid-column: 1 / -1;
}

.info-grid dt {
  color: #64748b;
  font-size: 13px;
}

.info-grid dd {
  margin: 4px 0 0;
  font-weight: 750;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.side-link {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.related-section {
  margin-top: 24px;
  padding: 28px;
}

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

.movie-list-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  box-shadow: none;
}

.list-poster {
  height: 104px;
  border-radius: 14px;
}

.list-content {
  min-width: 0;
}

.list-title {
  display: block;
  font-weight: 800;
}

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

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

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

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #94a3b8;
}

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

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

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

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

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

  .rank-box {
    position: static;
  }
}

@media (max-width: 780px) {
  .nav-shell {
    height: 64px;
  }

  .desktop-nav {
    display: none;
  }

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

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

  .hero-content h1 {
    font-size: 42px;
  }

  .home-intro {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .wide-card,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .wide-card a:first-child,
  .rank-poster {
    min-height: 220px;
    height: 220px;
  }

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

@media (max-width: 540px) {
  .brand-text {
    font-size: 17px;
  }

  .hero-controls {
    left: 16px;
    right: 16px;
    justify-content: space-between;
  }

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

  .poster-frame {
    height: 250px;
  }

  .detail-content-card,
  .related-section,
  .search-panel,
  .intro-card,
  .intro-rank {
    padding: 20px;
  }

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

  .movie-list-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .list-poster {
    height: 92px;
  }
}
