* {
  box-sizing: border-box;
}

:root {
  --forest-50: #f5f7f5;
  --forest-100: #e8ede7;
  --forest-400: #84a380;
  --forest-600: #4a6644;
  --forest-700: #3c5238;
  --forest-800: #32432f;
  --earth-200: #ddd8ca;
  --earth-300: #c5bcaa;
  --earth-400: #aa9b85;
  --earth-800: #4e443a;
  --earth-900: #423a32;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.08);
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--forest-50), #ffffff 34%, #f7f5ef);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70px;
  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;
  color: var(--forest-800);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--forest-600), var(--earth-900));
  box-shadow: var(--shadow-soft);
}

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

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

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

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--forest-50);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--forest-800);
  border-radius: 99px;
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

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

.mobile-link:hover,
.mobile-link.is-active {
  background: var(--forest-50);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background: radial-gradient(circle at 20% 16%, rgba(132, 163, 128, 0.38), transparent 34%), linear-gradient(135deg, var(--forest-800), var(--earth-900));
  color: white;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(17, 24, 39, 0.55), rgba(50, 67, 47, 0.2)), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 28%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: center;
  padding: 70px 0 64px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: center;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--forest-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  width: min(640px, 100%);
  margin: 24px 0 0;
  color: var(--forest-100);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--forest-700);
  background: var(--forest-100);
  font-size: 12px;
  font-weight: 800;
}

.hero .chip,
.detail-hero .chip {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.primary-button {
  color: white;
  background: var(--forest-600);
  box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: var(--forest-700);
  box-shadow: var(--shadow-hover);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  min-height: 470px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.hero-poster img {
  width: 100%;
  height: 470px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 30px;
  background: white;
}

.hero-side {
  display: grid;
  gap: 18px;
}

.hero-search,
.hero-channel-links,
.hero-mini-list {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--forest-100);
  font-weight: 800;
}

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

.hero-search input,
.local-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.hero-search button {
  min-width: 76px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--forest-600);
  cursor: pointer;
  font-weight: 800;
}

.hero-channel-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-channel-links a,
.footer-links a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.hero-mini-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-mini-card {
  display: grid;
  gap: 8px;
  color: white;
  font-weight: 800;
  font-size: 13px;
}

.hero-mini-card img {
  aspect-ratio: 16 / 11;
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.content-section,
.page-main,
.detail-main,
.ranking-list-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 74px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-block h2,
.player-section h2 {
  margin: 0;
  color: var(--forest-800);
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.section-heading p,
.page-hero p,
.detail-block p {
  margin: 8px 0 0;
  color: #4b5563;
}

.section-more {
  color: white;
  background: var(--forest-600);
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--forest-100);
}

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

.movie-card:hover .poster {
  transform: scale(1.04);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.62));
  opacity: 0.72;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--forest-600);
  box-shadow: var(--shadow-soft);
}

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

.movie-meta-line,
.ranking-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--forest-800);
}

.movie-card h2 a:hover,
.ranking-body h2 a:hover {
  color: var(--forest-600);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-covers img {
  height: 130px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-card h2 {
  margin: 0 0 8px;
  color: var(--forest-800);
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #4b5563;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.rank-row img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-num {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: var(--forest-600);
  font-weight: 900;
}

.rank-title {
  color: var(--forest-800);
  font-weight: 900;
}

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

.page-main,
.detail-main {
  padding: 34px 0 80px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  border-radius: 34px;
  padding: 54px;
  color: white;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 34%), linear-gradient(135deg, var(--forest-800), var(--earth-900));
  box-shadow: var(--shadow-soft);
}

.page-hero h1 {
  color: white;
  font-size: clamp(34px, 5vw, 60px);
}

.page-hero p {
  max-width: 760px;
  color: var(--forest-100);
}

.local-search {
  max-width: 680px;
  margin-top: 24px;
}

.search-wide {
  max-width: 880px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0 14px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 800;
}

.filter-button.is-active,
.filter-button:hover {
  color: var(--forest-800);
  background: white;
}

.empty-state {
  display: none;
  margin-top: 20px;
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  color: #4b5563;
  background: white;
  border: 1px solid var(--line);
}

.empty-state.is-visible {
  display: block;
}

.ranking-list-page {
  display: grid;
  gap: 16px;
  padding: 38px 0 80px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.ranking-poster img {
  width: 150px;
  height: 200px;
  object-fit: cover;
  border-radius: 18px;
}

.ranking-body h2 {
  margin: 10px 0 8px;
  color: var(--forest-800);
  font-size: 24px;
}

.ranking-body p {
  color: #4b5563;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  margin: 18px 0 24px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: center;
  border-radius: 34px;
  padding: 30px;
  color: white;
  background: radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.18), transparent 30%), linear-gradient(135deg, var(--forest-800), var(--earth-900));
  box-shadow: var(--shadow-soft);
}

.detail-cover img {
  width: 310px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  color: white;
  font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
  color: var(--forest-100);
  font-size: 18px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.detail-meta li {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta span {
  display: block;
  color: var(--earth-200);
  font-size: 12px;
}

.detail-meta strong {
  color: white;
}

.player-section,
.detail-block {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.2s ease;
}

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

.play-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-600);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  font-size: 36px;
}

.detail-block p {
  font-size: 17px;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 80px;
  color: var(--earth-200);
  background: var(--earth-900);
}

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

.footer-brand {
  color: white;
  font-size: 24px;
}

.site-footer p {
  max-width: 520px;
  color: var(--earth-300);
}

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

.footer-links a {
  color: var(--earth-200);
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--earth-400);
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

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

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

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

  .detail-hero {
    grid-template-columns: 240px 1fr;
  }

  .detail-cover img {
    width: 240px;
  }
}

@media (max-width: 780px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 42px 0;
  }

  .hero-carousel {
    min-height: 820px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 0;
    height: auto;
  }

  .hero-controls {
    bottom: 12px;
  }

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

  .section-heading,
  .footer-inner,
  .detail-hero,
  .category-card,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

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

  .page-hero {
    padding: 30px;
    border-radius: 26px;
  }

  .detail-cover img,
  .ranking-poster img {
    width: 100%;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 34px 50px 1fr;
  }

  .rank-row .rank-meta {
    grid-column: 3;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero-inner,
  .content-section,
  .page-main,
  .detail-main,
  .ranking-list-page,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .hero h1 {
    font-size: 44px;
  }

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

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

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

  .hero-search div,
  .local-search {
    display: grid;
  }

  .ranking-card {
    padding: 12px;
  }
}
