:root {
  color-scheme: light;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --green-50: #f0fdf4;
  --green-600: #16a34a;
  --green-700: #15803d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-700: #b45309;
  --red-500: #ef4444;
  --shadow-soft: 0 20px 45px rgba(28, 25, 23, 0.14);
  --shadow-card: 0 14px 28px rgba(28, 25, 23, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--stone-50);
  color: var(--stone-800);
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  min-height: 70vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(214, 211, 209, 0.75);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--amber-700), var(--green-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--green-700));
  box-shadow: 0 12px 22px rgba(21, 128, 61, 0.22);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--stone-700);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--green-700);
  background: var(--green-50);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--stone-100);
  color: var(--stone-700);
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

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

.hero-slider {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(245, 158, 11, 0.20), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.66) 45%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(28, 25, 23, 0.74), transparent 42%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2 + 20px));
  top: 50%;
  width: min(620px, calc(100vw - 48px));
  transform: translateY(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  padding: 7px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--green-600);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
}

.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 580px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 13px 22px;
  color: #ffffff;
  background: var(--green-600);
  box-shadow: 0 18px 28px rgba(22, 163, 74, 0.30);
}

.ghost-btn {
  padding: 12px 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

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

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

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

.hero-dot.is-active {
  background: var(--amber-400);
}

.hero-search-panel {
  max-width: 1180px;
  margin: -54px auto 0;
  position: relative;
  z-index: 3;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 390px) 1.2fr;
  gap: 16px;
  align-items: center;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(214, 211, 209, 0.8);
}

.hero-search-panel strong {
  display: block;
  font-size: 20px;
  color: var(--stone-900);
}

.hero-search-panel span {
  color: var(--stone-500);
}

.quick-search {
  display: flex;
  gap: 8px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  background: #ffffff;
  color: var(--stone-800);
  outline: none;
}

.quick-search input {
  padding: 13px 14px;
}

.quick-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  background: var(--stone-900);
  color: #ffffff;
  font-weight: 900;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-chips a,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 800;
}

.quick-chips a {
  padding: 8px 11px;
  font-size: 13px;
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px 0;
}

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

.section-heading span,
.page-hero span,
.detail-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--green-700);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: var(--stone-900);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

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

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--stone-500);
  line-height: 1.8;
}

.section-link,
.text-link {
  color: var(--green-700);
  font-size: 15px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(214, 211, 209, 0.75);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(28, 25, 23, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-200), var(--stone-100));
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.68));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--green-600);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
}

.rank-no {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--red-500));
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--stone-500);
  line-height: 1.7;
  font-size: 14px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.45), transparent 45%),
    linear-gradient(135deg, var(--stone-900), var(--green-700));
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.ranking-block {
  max-width: 980px;
}

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

.rank-item {
  padding: 12px;
  display: grid;
  grid-template-columns: 48px 72px 1fr;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--stone-200);
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.07);
  transition: transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-item strong {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--green-600));
}

.rank-item img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--stone-200);
}

.rank-item b {
  display: block;
  color: var(--stone-900);
  font-size: 17px;
  margin-bottom: 6px;
}

.rank-item em {
  color: var(--stone-500);
  font-style: normal;
}

.page-hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.30), transparent 34%),
    linear-gradient(135deg, var(--stone-900), #123d23 70%, var(--green-700));
  color: #ffffff;
}

.small-hero {
  padding: 86px 20px;
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 880px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 64px);
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  padding: 18px;
  align-items: center;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--stone-200);
  box-shadow: var(--shadow-card);
}

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

.category-cover-stack img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: var(--stone-200);
}

.category-overview-card h2 {
  margin: 0 0 8px;
  color: var(--stone-900);
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--stone-500);
  line-height: 1.75;
}

.filter-section {
  padding-top: 42px;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--stone-200);
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
}

.filter-bar input,
.filter-bar select {
  padding: 13px 14px;
}

.movie-card.is-hidden {
  display: none;
}

.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--stone-500);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--green-700);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--stone-900);
  box-shadow: var(--shadow-soft);
}

.player-shell video {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: contain;
  background: #000000;
}

.player-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.34), rgba(28, 25, 23, 0.72));
  cursor: pointer;
}

.player-trigger.is-hidden {
  display: none;
}

.player-trigger span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-600);
  box-shadow: 0 20px 45px rgba(22, 163, 74, 0.42);
  font-size: 32px;
}

.player-trigger strong {
  font-size: 22px;
}

.detail-side-card {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--stone-200);
  box-shadow: var(--shadow-card);
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--stone-200);
}

.detail-side-card div {
  padding: 16px;
}

.detail-side-card p {
  margin: 0 0 10px;
  color: var(--stone-500);
  font-weight: 800;
}

.detail-side-card a {
  color: var(--green-700);
  font-weight: 900;
}

.detail-content {
  max-width: 860px;
  padding: 34px 0 0;
}

.detail-content h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.one-line {
  margin: 16px 0 0;
  color: var(--stone-500);
  font-size: 19px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0 28px;
}

.detail-tags span {
  padding: 8px 12px;
  font-size: 14px;
}

.detail-content h2 {
  margin: 30px 0 12px;
  color: var(--stone-900);
  font-size: 27px;
}

.detail-content p {
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.95;
}

.site-footer {
  margin-top: 88px;
  padding: 54px 20px 28px;
  color: var(--stone-300);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: var(--stone-300);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a:hover {
  color: var(--amber-400);
}

.copyright {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(231, 229, 228, 0.14);
  text-align: center;
  color: var(--stone-500);
}

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

  .hero-search-panel {
    grid-template-columns: 1fr;
    margin: -38px 20px 0;
  }

  .quick-chips {
    justify-content: flex-start;
  }

  .player-layout {
    grid-template-columns: 1fr;
  }

  .detail-side-card {
    display: grid;
    grid-template-columns: 140px 1fr;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-content {
    top: auto;
    bottom: 76px;
    transform: none;
  }

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

  .category-overview-card,
  .filter-bar,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 540px) {
  .header-inner {
    height: 62px;
    padding: 0 14px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero-content h2 {
    font-size: 40px;
  }

  .hero-actions,
  .quick-search {
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 62px 1fr;
  }

  .rank-item img {
    width: 62px;
    height: 80px;
  }

  .player-shell,
  .player-shell video {
    min-height: 260px;
  }

  .detail-side-card {
    grid-template-columns: 96px 1fr;
  }

  .small-hero {
    padding: 62px 18px;
  }
}
