html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #0f172a;
  background: #f8fafc;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #334155, #020617);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);
}

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

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

.brand-text small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

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

.nav-link {
  padding: 10px 14px;
  color: #475569;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0f172a;
  background: #e2e8f0;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-nav,
.mobile-cats {
  display: grid;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.mobile-nav-link,
.mobile-cats a {
  padding: 10px 12px;
  color: #334155;
  border-radius: 12px;
  background: #f8fafc;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.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 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, #475569, #020617 62%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 70vh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 90px 0 84px;
  color: #ffffff;
}

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

.hero-kicker span,
.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-kicker span {
  padding: 7px 13px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero h1 {
  width: min(820px, 100%);
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  width: min(760px, 100%);
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.7;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(255, 255, 255, 0.2);
}

.btn-dark {
  color: #ffffff;
  background: #0f172a;
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 6;
  display: flex;
  gap: 9px;
}

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

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

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 690px;
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: radial-gradient(circle at top left, #64748b, #020617 68%);
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #0f172a;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.24);
}

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

.movie-meta span {
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.tag-list span {
  padding: 5px 9px;
  color: #334155;
  background: #e2e8f0;
}

.category-chip {
  display: inline-flex;
  margin-top: 14px;
  padding: 7px 10px;
  color: #0f172a;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 210px;
}

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
  opacity: 0.96;
}

.category-tile-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.08));
}

.category-tile-text {
  position: absolute;
  inset: auto 18px 18px;
  color: #ffffff;
}

.category-tile-text strong {
  display: block;
  margin-bottom: 7px;
  font-size: 20px;
}

.category-tile-text em {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.page-hero {
  padding: 64px 0 48px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 10%, #475569, #020617 52%);
}

.page-hero h1 {
  width: min(820px, 100%);
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  margin-bottom: 28px;
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  background: #ffffff;
  outline: none;
}

.search-box input:focus,
.select-box select:focus {
  border-color: #475569;
  box-shadow: 0 0 0 4px rgba(71, 85, 105, 0.13);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.rank-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #ffffff;
  border-radius: 18px;
  background: linear-gradient(135deg, #334155, #020617);
  font-size: 19px;
  font-weight: 900;
}

.rank-item img {
  width: 150px;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.detail-shell {
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, #475569, #020617 60%);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: end;
  padding: 56px 0 42px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.detail-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-hero p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.13);
}

.detail-poster {
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.52);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0f172a;
}

.player-panel {
  padding: 38px 0 0;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.44);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.16);
  cursor: pointer;
}

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

.player-play {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: #0f172a;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  font-size: 34px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding: 42px 0 68px;
}

.content-card,
.side-card {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.content-card {
  padding: 30px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 20px;
  color: #334155;
  font-size: 16px;
  line-height: 1.95;
}

.side-card {
  padding: 20px;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-links strong {
  font-size: 14px;
}

.side-links span {
  color: #64748b;
  font-size: 12px;
}

.search-results {
  display: grid;
  gap: 18px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
}

.search-result-card img {
  width: 112px;
  height: 148px;
  object-fit: cover;
  border-radius: 15px;
  background: #0f172a;
}

.search-result-card h2 {
  margin: 2px 0 8px;
  font-size: 20px;
}

.search-result-card p {
  color: #64748b;
  line-height: 1.7;
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 52px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 18px;
}

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding: 18px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 28px;
  color: #64748b;
  border-radius: 18px;
  background: #ffffff;
  text-align: center;
}

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

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

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

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

  .detail-poster {
    width: min(360px, 100%);
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    padding-bottom: 70px;
  }

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

  .section-head,
  .rank-item,
  .filter-bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .rank-item {
    display: grid;
  }

  .rank-item img {
    width: 100%;
    height: 180px;
  }

  .movie-card-horizontal {
    grid-template-columns: 130px 1fr;
  }

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

  .content-card {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero h1,
  .detail-hero h1 {
    font-size: 34px;
  }

  .movie-card-horizontal,
  .search-result-card {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .poster-wrap {
    aspect-ratio: 3 / 4;
  }
}
