* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --max: 1180px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.30);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--teal-dark);
  background: #ecfdf5;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 190px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: #4b5563;
  font-size: 14px;
}

.dropdown-panel a:hover {
  color: var(--teal-dark);
  background: #ecfdf5;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #374151;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 22px 18px;
  background: #ffffff;
}

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

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: #f3f4f6;
  color: var(--teal-dark);
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-top: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 90px 22px 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-label {
  background: var(--teal);
  color: #ffffff;
  margin-bottom: 18px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2.5vw, 22px);
}

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

.primary-button,
.ghost-button,
.section-more,
.rank-action,
.home-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: #ffffff;
  color: #111827;
}

.primary-button:hover {
  background: var(--teal);
  color: #ffffff;
  transform: translateY(-2px);
}

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

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

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

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.30);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.featured-shell {
  position: relative;
  z-index: 4;
  max-width: var(--max);
  margin: -78px auto 26px;
  padding: 0 22px;
}

.content-section,
.home-search-band,
.page-hero,
.detail-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 22px;
}

.compact-section {
  padding-top: 28px;
  padding-bottom: 28px;
}

.white-section {
  max-width: none;
  background: #ffffff;
  padding-left: max(22px, calc((100% - var(--max)) / 2 + 22px));
  padding-right: max(22px, calc((100% - var(--max)) / 2 + 22px));
}

.home-search-band {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--soft-shadow);
  margin-top: 34px;
}

.home-search-band h2,
.section-heading h2,
.center-heading h2,
.page-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.home-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
}

.home-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
}

.home-search button,
.rank-action,
.section-more,
.text-link {
  border: 0;
  color: #ffffff;
  background: var(--teal);
}

.home-search button:hover,
.rank-action:hover,
.section-more:hover,
.text-link:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

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

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

.center-heading .eyebrow {
  margin: 0 auto;
}

.center-heading p {
  color: var(--muted);
  margin: 14px 0 0;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.six-col {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.movie-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}

.card-large .card-poster {
  aspect-ratio: 21 / 9;
}

.card-featured {
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
  min-height: 260px;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.card-featured .card-poster {
  height: 100%;
  aspect-ratio: auto;
}

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

.movie-card:hover .card-poster img,
.category-tile:hover img,
.rank-row:hover img {
  transform: scale(1.06);
}

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
  opacity: 1;
}

.play-badge,
.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.72);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  opacity: 0;
  z-index: 2;
  transition: all 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.70);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-tags,
.card-meta,
.rank-meta,
.detail-meta,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-tags span,
.tag-cloud span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h3 a:hover,
.rank-content h3 a:hover {
  color: var(--teal-dark);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-meta,
.rank-meta,
.detail-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.card-horizontal {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.card-horizontal .card-poster {
  height: 100%;
  aspect-ratio: auto;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.page-hero {
  margin-top: 28px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.34), transparent 26%), linear-gradient(135deg, #111827, #0f766e);
}

.slim-hero {
  padding-top: 44px;
  padding-bottom: 44px;
}

.page-hero .eyebrow {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.page-hero h1,
.page-hero p {
  max-width: 780px;
}

.page-hero p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-tile > a {
  position: relative;
  min-height: 190px;
  overflow: hidden;
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile > a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.68));
}

.category-tile > a span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile div {
  padding: 24px;
}

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  color: var(--muted);
  margin: 0 0 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  padding: 14px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f3f4f6;
}

.search-field span {
  color: var(--teal-dark);
  font-weight: 900;
}

.search-field input,
.filter-select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.filter-select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f3f4f6;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 118px 64px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

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

.rank-number {
  color: var(--teal-dark);
  font-size: 30px;
  font-weight: 900;
}

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-content p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 22px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.video-element {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  background: #000000;
  cursor: pointer;
}

.player-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
}

.player-overlay .big-play {
  z-index: 4;
  width: 82px;
  height: 82px;
  font-size: 34px;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.detail-info {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: #e5e7eb;
}

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

.detail-info h1 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #374151;
  font-size: 16px;
  margin: 0;
}

.detail-content {
  padding-top: 18px;
  padding-bottom: 18px;
}

.detail-text {
  padding: 30px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-text h2 + p {
  margin-bottom: 28px;
}

.detail-text p {
  color: #374151;
  font-size: 17px;
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f3f4f6);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 22px 22px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-brand p {
  margin: 4px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--teal-dark);
}

.copyright {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px 32px;
  color: var(--muted);
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

  .six-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    height: 66px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-content {
    padding-top: 60px;
  }

  .hero-arrow {
    display: none;
  }

  .featured-shell {
    margin-top: -56px;
  }

  .card-featured,
  .card-horizontal,
  .category-tile,
  .detail-info,
  .rank-row,
  .home-search-band,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .card-featured .card-poster,
  .card-horizontal .card-poster {
    aspect-ratio: 16 / 9;
  }

  .four-col,
  .three-col,
  .six-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-row {
    gap: 12px;
  }

  .rank-number {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .content-section,
  .home-search-band,
  .page-hero,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .home-search input {
    min-height: 44px;
  }

  .four-col,
  .three-col,
  .six-col,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 180px;
  }
}
