* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-500: #14b8a6;
  --amber-500: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 118, 110, 0.12);
  --shadow-card: 0 12px 30px rgba(17, 24, 39, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, #ffffff 0%, #f5fffb 55%, #ffffff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-name {
  font-size: clamp(18px, 2vw, 26px);
  background: linear-gradient(90deg, var(--emerald-700), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.28);
  font-size: 14px;
}

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

.nav-link,
.mobile-nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--emerald-50);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--emerald-700);
  border-radius: 999px;
}

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

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

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

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

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

.container.narrow {
  width: min(820px, calc(100% - 32px));
  text-align: center;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(20, 184, 166, 0.36), transparent 30%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.86) 0%, rgba(3, 7, 18, 0.60) 42%, rgba(3, 7, 18, 0.16) 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.02) 22%);
}

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

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: rgba(209, 250, 229, 0.95);
  font-size: 14px;
  font-weight: 750;
}

.hero-eyebrow {
  color: var(--white);
  background: rgba(5, 150, 105, 0.86);
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.hero-movie-title {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--emerald-100);
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.search-panel button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.search-panel button,
.hero-search button {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 14px 34px rgba(5, 150, 105, 0.32);
}

.primary-button:hover,
.search-panel button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.38);
}

.primary-button.full {
  width: 100%;
  margin-top: 16px;
}

.ghost-button {
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.92);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: var(--emerald-50);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.hero-search input,
.search-panel input,
.filter-panel input,
.filter-panel select {
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--emerald-100);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-search input {
  border: 0;
  background: transparent;
}

.hero-search input:focus,
.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.soft-section {
  background:
    radial-gradient(circle at 12% 12%, rgba(16, 185, 129, 0.10), transparent 24%),
    linear-gradient(135deg, #fffbeb, #ecfdf5 48%, #f0fdfa);
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  font-size: clamp(30px, 4.8vw, 48px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-title-block p {
  margin: 14px auto 0;
  color: var(--gray-600);
  font-size: 17px;
  line-height: 1.8;
}

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

.category-tile,
.category-overview-card {
  min-height: 160px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.34);
  box-shadow: var(--shadow-card);
}

.category-tile span,
.category-title-link h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--gray-900);
  font-size: 20px;
  font-weight: 850;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.category-samples a,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.poster-link,
.ranking-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-100);
}

.poster-link img,
.ranking-poster img,
.detail-poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.poster-badge,
.poster-year,
.ranking-index {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.poster-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
}

.poster-year {
  right: 12px;
  background: linear-gradient(135deg, var(--amber-500), #fb7185);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s ease;
}

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

.card-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 9px 0 13px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--gray-50);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 38px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  font-weight: 900;
}

.rank-item img {
  width: 64px;
  height: 82px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--gray-100);
}

.rank-text strong {
  display: block;
  color: var(--gray-900);
  font-size: 16px;
}

.rank-text small {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
  line-height: 1.5;
}

.plain-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--emerald-700);
  font-weight: 850;
}

.page-hero,
.detail-hero {
  padding: 72px 0 58px;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.20), transparent 28%),
    linear-gradient(135deg, #ecfdf5, #ffffff 48%, #f0fdfa);
  border-bottom: 1px solid rgba(16, 185, 129, 0.12);
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 30px;
  padding: 14px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
}

.search-panel {
  grid-template-columns: 1fr auto;
  max-width: 760px;
  margin: 0 auto 34px;
}

.search-title {
  margin-bottom: 22px;
  color: var(--gray-900);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.empty-state {
  padding: 50px;
  border-radius: 24px;
  color: var(--gray-600);
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow-card);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  padding: 14px;
}

.ranking-poster {
  border-radius: 18px;
}

.ranking-index {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, var(--amber-500), #ef4444);
}

.ranking-info {
  align-self: center;
}

.ranking-info a {
  color: var(--gray-900);
  font-size: 19px;
  font-weight: 900;
}

.ranking-info p {
  display: -webkit-box;
  margin: 9px 0;
  overflow: hidden;
  color: var(--gray-600);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-info span {
  color: var(--gray-500);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.detail-title-block {
  max-width: 840px;
}

.player-wrap {
  padding-top: 42px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.30);
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  object-fit: contain;
  background: #020617;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.24), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.player-cover img {
  object-fit: cover;
  opacity: 0.82;
}

.player-cover.hidden {
  display: none;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 18px 48px rgba(5, 150, 105, 0.42);
  font-size: 30px;
}

.player-message {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 4;
  color: var(--white);
  text-align: center;
  font-weight: 750;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr;
  gap: 34px;
  align-items: start;
}

.detail-poster-card {
  position: sticky;
  top: 96px;
  padding: 14px;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-poster-card img {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
}

.detail-content {
  padding: 30px;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-content h2 {
  margin: 28px 0 12px;
  color: var(--gray-900);
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 6px;
}

.site-footer {
  border-top: 1px solid rgba(16, 185, 129, 0.14);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--gray-600);
  font-weight: 750;
}

.footer-links a:hover {
  color: var(--emerald-600);
}

[hidden] {
  display: none !important;
}

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

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

  .category-overview-grid,
  .rank-layout {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 72px;
    justify-content: center;
  }

  .hero-search,
  .search-panel,
  .filter-panel {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-dots {
    bottom: 160px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .category-movie-grid,
  .compact-grid,
  .ranking-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 92px 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .detail-poster-card {
    position: static;
  }

  .movie-player {
    border-radius: 20px;
  }
}
