:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--cyan));
  box-shadow: 0 12px 26px rgba(2, 132, 199, 0.28);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--sky-dark);
  background: #e0f2fe;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #e0f2fe;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

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

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

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

.hero-section {
  position: relative;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(115deg, #0284c7 0%, #2563eb 48%, #06b6d4 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.34), transparent 58%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.82) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px 34px;
}

.hero-slider {
  min-height: 430px;
  position: relative;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  gap: 46px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
  position: absolute;
  inset: 0;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  position: relative;
}

.eyebrow {
  margin: 0 0 12px;
  color: #cffafe;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}

.eyebrow.dark {
  color: var(--sky-dark);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
}

.hero-desc {
  margin: 24px 0 22px;
  max-width: 720px;
  color: #dbeafe;
  font-size: 20px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-btn,
.ghost-btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--sky-dark);
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.26);
  min-height: 520px;
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 22px 0;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  border-radius: 999px;
  background: #ffffff;
}

.hero-rank-link,
.text-link {
  color: var(--sky-dark);
  font-weight: 900;
}

.hero-rank-link {
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  text-align: left;
}

.hero-thumb.active {
  background: rgba(255, 255, 255, 0.24);
}

.hero-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.hero-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.search-band {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.search-band-inner,
.section-wrap,
.footer-inner,
.footer-bottom,
.detail-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.search-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 30px;
  padding-top: 34px;
  padding-bottom: 34px;
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-content-card h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-band h2 {
  font-size: clamp(26px, 4vw, 42px);
}

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

.search-form input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  color: var(--ink);
}

.search-form button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  cursor: pointer;
}

.search-form.big {
  width: min(720px, 100%);
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.search-form.big input {
  color: #ffffff;
}

.search-form.big input::placeholder {
  color: #dbeafe;
}

.section-wrap {
  padding-top: 70px;
  padding-bottom: 70px;
}

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

.section-heading.compact {
  margin-bottom: 20px;
}

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

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

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

.category-card {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.86) 100%);
}

.category-card-text {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-card-text strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.category-card-text em {
  display: block;
  margin-top: 6px;
  color: #dbeafe;
  font-style: normal;
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.88);
  font-size: 12px;
  font-weight: 900;
}

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

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

.movie-card h2 a:hover,
.ranking-body h2 a:hover {
  color: var(--sky-dark);
}

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

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 7px;
  color: #cbd5e1;
}

.split-section {
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
}

.split-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.rank-panel,
.side-card,
.detail-content-card,
.player-card,
.filter-panel,
.category-preview {
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 92px;
}

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

.rank-link {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-link:hover {
  background: #e0f2fe;
  transform: translateX(3px);
}

.rank-link img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-num {
  width: 30px;
  color: var(--sky-dark);
  font-weight: 900;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(115deg, #0284c7 0%, #2563eb 54%, #06b6d4 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 34%), rgba(15, 23, 42, 0.18);
}

.page-hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 68px 20px;
}

.page-hero h1 {
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.04;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: #dbeafe;
  font-size: 19px;
}

.preview-stack {
  display: grid;
  gap: 22px;
  padding-top: 0;
}

.category-preview {
  padding: 24px;
}

.category-preview-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-preview h2 {
  margin: 0 0 6px;
}

.category-preview p {
  margin: 0;
  color: var(--muted);
}

.category-preview .rank-link {
  grid-template-columns: 58px minmax(0, 1fr);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 16px;
  padding: 20px;
  margin-bottom: 28px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  outline: 0;
  background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.movie-card.hidden-by-filter {
  display: none;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
}

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

.ranking-poster span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  font-weight: 900;
}

.ranking-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.ranking-body p:not(.eyebrow) {
  color: var(--muted);
}

.detail-wrap {
  padding-top: 34px;
  padding-bottom: 70px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
  background: #020617;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  font-weight: 900;
  font-size: 18px;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--sky-dark);
  background: #ffffff;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.32);
  font-size: 26px;
  padding-left: 4px;
}

.detail-content-card {
  padding: 30px;
}

.detail-content-card h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.lead-text {
  color: #334155;
  font-size: 20px;
  margin: 24px 0 18px;
}

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

.detail-content-card p {
  color: #334155;
}

.detail-side {
  display: grid;
  gap: 20px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.detail-poster {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #e0f2fe;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin-top: 0;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-card div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.side-card a {
  color: var(--sky-dark);
}

.detail-related {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 0.9fr 0.9fr;
  gap: 34px;
  padding-top: 52px;
  padding-bottom: 38px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 420px;
  color: #94a3b8;
}

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

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

.footer-col a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 20px;
  padding-bottom: 26px;
  color: #94a3b8;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 440px;
    height: 440px;
  }

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: flex;
  }

  .site-nav {
    height: 62px;
  }

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

  .hero-inner {
    padding-top: 44px;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-slide,
  .hero-slide.active {
    position: relative;
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-slide:not(.active) {
    display: none;
  }

  .hero-desc {
    font-size: 17px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: auto;
    height: auto;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
  }

  .search-band-inner,
  .filter-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .category-preview-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .ranking-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .page-hero-inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

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

  .side-card div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
