:root {
  color-scheme: light;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 70px rgba(15, 23, 42, 0.22);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eefcf7 42%, #f9fafb 100%);
  color: var(--gray-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.site-logo:hover .site-logo-mark {
  transform: scale(1.06);
}

.site-logo-text {
  max-width: 12em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 21px;
  background: linear-gradient(90deg, var(--emerald-600), var(--teal-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-700);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-button.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--gray-100);
}

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

.mobile-nav-link {
  padding: 12px 4px;
}

.main-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 72px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000;
  color: var(--white);
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.12) 100%);
}

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

.hero-slide {
  background: radial-gradient(circle at 72% 25%, rgba(20, 184, 166, 0.42), transparent 34%), linear-gradient(135deg, #020617, #111827 48%, #064e3b);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-content-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald-400);
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.secondary-button,
.section-more,
.category-link-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--emerald-500);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

.primary-button:hover,
.section-more:hover {
  background: var(--emerald-600);
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.hero-nav-button {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease;
}

.hero-nav-button:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-nav-prev {
  left: 18px;
}

.hero-nav-next {
  right: 18px;
}

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

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

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

.hero-search-card {
  position: relative;
  z-index: 5;
  width: min(1040px, calc(100% - 32px));
  margin: -48px auto 0;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-form button {
  border: 0;
}

.section-block {
  padding: 64px 0 0;
}

.section-heading {
  position: relative;
  margin-bottom: 26px;
}

.section-heading > span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--emerald-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h1,
.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  color: var(--gray-900);
}

.section-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--gray-600);
  line-height: 1.8;
}

.section-more {
  position: absolute;
  right: 0;
  top: 8px;
  min-height: 40px;
  color: var(--white);
  background: var(--emerald-500);
}

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

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

.movie-card,
.category-card,
.rank-row,
.filter-panel,
.detail-card,
.player-panel,
.content-card {
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.movie-card,
.category-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: var(--shadow-strong);
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: radial-gradient(circle at 30% 10%, rgba(52, 211, 153, 0.44), transparent 32%), linear-gradient(135deg, #111827, #064e3b);
}

.poster-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

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

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  border-radius: 9px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 900;
}

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px;
  color: var(--white);
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.84) 100%);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-overlay {
  opacity: 1;
  transform: translateY(0);
}

.poster-overlay p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.6;
}

.poster-overlay span {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.82);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-body h2 {
  margin: 0 0 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 16px;
  font-weight: 900;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body h2 {
  color: var(--emerald-600);
}

.movie-meta-line {
  margin-bottom: 8px;
  color: var(--gray-500);
  font-size: 12px;
  gap: 8px;
}

.movie-card-body p {
  margin: 0;
  color: var(--gray-600);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.65;
}

.category-card {
  min-height: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.22);
}

.category-card h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.75;
  flex: 1;
}

.category-link-text {
  align-self: flex-start;
  min-height: 38px;
  padding: 0 14px;
  color: var(--emerald-700);
  background: var(--emerald-50);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.rank-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #064e3b);
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

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

.rank-hot {
  min-width: 86px;
  text-align: center;
  color: var(--emerald-600);
  font-weight: 900;
}

.filter-panel {
  margin: 34px 0 28px;
  padding: 22px;
  border-radius: 20px;
}

.filter-heading {
  margin-bottom: 18px;
}

.filter-heading h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
}

.filter-heading p {
  margin: 0;
  color: var(--gray-600);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  margin: 20px 0 0;
  padding: 16px;
  border-radius: 14px;
  color: var(--gray-600);
  background: var(--gray-50);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--emerald-600);
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 30px;
  align-items: stretch;
}

.detail-card,
.player-panel,
.content-card {
  border-radius: 24px;
  overflow: hidden;
}

.detail-poster {
  position: relative;
  min-height: 420px;
  background: radial-gradient(circle at 30% 10%, rgba(52, 211, 153, 0.38), transparent 32%), linear-gradient(135deg, #111827, #064e3b);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-copy {
  padding: 34px;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.detail-copy > p {
  margin: 0 0 22px;
  color: var(--gray-600);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span,
.tag-list span {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

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

.player-panel {
  margin-top: 34px;
  padding: 24px;
  background: linear-gradient(135deg, #030712, #111827 52%, #064e3b);
  color: var(--white);
  border: 0;
}

.player-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.24), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.9);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.36);
  font-size: 34px;
  transform: translateZ(0);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-button {
  transform: scale(1.08);
  background: var(--emerald-600);
}

.content-card {
  margin-top: 34px;
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--gray-700);
  line-height: 1.9;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.detail-facts div {
  padding: 16px;
  border-radius: 16px;
  background: var(--gray-50);
}

.detail-facts strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gray-500);
  font-size: 13px;
}

.detail-facts span {
  color: var(--gray-900);
  font-weight: 800;
}

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero {
    height: 520px;
  }

  .hero-nav-button {
    display: none;
  }

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

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

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

  .detail-card {
    max-width: 460px;
    margin: 0 auto;
  }

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

  .rank-row {
    grid-template-columns: 46px 76px 1fr;
  }

  .rank-hot {
    grid-column: 3 / 4;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header-inner,
  .main-shell,
  .hero-content-inner,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .site-logo-text {
    max-width: 9em;
    font-size: 18px;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-search-card {
    width: calc(100% - 24px);
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .section-more {
    position: static;
    margin-top: 16px;
  }

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

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

  .movie-card-body p,
  .poster-overlay {
    display: none;
  }

  .category-card {
    min-height: 190px;
    padding: 18px;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .detail-copy {
    padding: 24px;
  }

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

  .player-panel,
  .content-card {
    padding: 18px;
    border-radius: 20px;
  }

  .rank-row {
    grid-template-columns: 38px 64px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 13px;
  }

  .rank-info h2 {
    font-size: 16px;
  }

  .rank-info p {
    -webkit-line-clamp: 1;
  }
}
