:root {
  --primary: #4a7c54;
  --primary-dark: #3d6744;
  --primary-soft: #f4f7f5;
  --accent: #c58a3a;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --bg: #fafaf9;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
}

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

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 26px rgba(74, 124, 84, 0.28);
}

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

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

.nav-link {
  color: #4b5563;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: var(--primary-soft);
  font-size: 22px;
}

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

.mobile-nav .nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

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

.hero-carousel {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.14)), linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-kicker,
.section-heading span,
.section-kicker,
.page-hero span {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-kicker {
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.7;
}

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

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.quick-search-form button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search-form button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(74, 124, 84, 0.28);
}

.primary-button:hover,
.quick-search-form button:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

main {
  min-height: 60vh;
}

.content-section,
.quick-search-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.quick-search-section {
  padding-top: 54px;
  padding-bottom: 28px;
}

.quick-search-card {
  padding: 34px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.quick-search-card h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.quick-search-card p {
  max-width: 820px;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.quick-search-form,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.quick-search-form input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.filter-panel {
  grid-template-columns: 1fr 220px;
  margin-bottom: 28px;
}

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

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

.section-heading p {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #ffffff, var(--primary-soft));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(74, 124, 84, 0.45);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #1f2937, #4a7c54);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.play-chip,
.year-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-chip {
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  background: rgba(74, 124, 84, 0.92);
}

.year-chip {
  right: 12px;
  top: 12px;
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

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

.movie-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.movie-card h3,
.ranking-card h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
  color: var(--primary);
}

.movie-one-line,
.ranking-card p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
}

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h3 {
  font-size: 17px;
}

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

.category-tile {
  display: block;
  min-height: 150px;
  padding: 24px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  color: #ffffff;
  background: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-tile:hover p {
  color: rgba(255, 255, 255, 0.84);
}

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

.rank-strip {
  padding-top: 28px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.rank-list a:hover {
  border-color: rgba(74, 124, 84, 0.4);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.rank-list strong {
  color: var(--primary);
  font-size: 22px;
}

.rank-list span {
  font-weight: 800;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(74, 124, 84, 0.22), transparent 42%), linear-gradient(135deg, #ffffff, #f4f7f5);
}

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

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.slim-hero .breadcrumb {
  color: var(--muted);
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 72px 112px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.rank-num {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
  padding: 76px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.36);
  background: linear-gradient(145deg, #1f2937, #4a7c54);
}

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

.detail-copy h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.75;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-copy .primary-button {
  margin-top: 30px;
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -80px auto 0;
  position: relative;
  z-index: 5;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.22);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.52));
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  font-size: 32px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.play-cover.is-hidden {
  display: none;
}

.detail-text-section {
  padding-top: 60px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
}

.detail-text-grid article {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.detail-text-grid h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.detail-text-grid p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.95;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.footer-brand .brand-name {
  color: var(--ink);
}

[data-card].is-hidden {
  display: none;
}

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

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero-carousel {
    min-height: 620px;
    height: 76vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 17px;
  }

  .quick-search-form,
  .filter-panel,
  .section-heading,
  .detail-inner,
  .detail-text-grid,
  .ranking-card,
  .rank-list a {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

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

  .detail-inner {
    gap: 28px;
  }

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

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

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .header-inner {
    height: 66px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .content-section,
  .quick-search-section {
    width: min(100% - 24px, 1180px);
    padding: 44px 0;
  }

  .quick-search-card,
  .detail-text-grid article {
    padding: 22px;
  }

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

  .hero-content h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

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

  .detail-inner {
    padding: 46px 0 86px;
  }

  .player-section {
    width: min(100% - 24px, 1180px);
  }
}
