* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --cyan: #22d3ee;
  --indigo: #1e40af;
  --slate: #0f172a;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

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: #f3f6fb;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

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

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  color: #0f172a;
}

.brand-text small {
  color: #64748b;
  font-size: 12px;
}

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

.nav-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #1e3a8a;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
  background: white;
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--blue);
  background: #eff6ff;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #07111f;
}

.hero-slide {
  display: none;
  min-height: 650px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.34), transparent 26%),
    linear-gradient(110deg, rgba(2, 6, 23, 0.92), rgba(30, 64, 175, 0.78), rgba(15, 23, 42, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 650px;
  margin: 0 auto;
  padding: 86px 20px 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  align-items: center;
  gap: 42px;
  color: white;
}

.eyebrow,
.hero-copy .eyebrow,
.page-hero p,
.ranking-copy p,
.section-head p,
.detail-eyebrow {
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-subtitle {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: clamp(19px, 2.5vw, 28px);
  color: #dbeafe;
  font-weight: 700;
}

.hero-summary {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 16px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
}

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

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

.primary-btn,
.search-form button,
.hero-search button {
  color: white;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
}

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

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

.hero-search,
.search-form {
  display: flex;
  max-width: 620px;
  gap: 10px;
  margin-top: 28px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-search input,
.search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 16px;
}

.hero-search input::placeholder,
.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-side {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-side-title {
  color: #e0f2fe;
  font-weight: 900;
}

.compact-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(3px);
}

.compact-card img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: white;
  font-size: 14px;
}

.compact-card small {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.hero-dot,
.hero-arrow {
  border: 0;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 99px;
}

.hero-dot.active {
  width: 28px;
  background: white;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.category-strip,
.content-section,
.ranking-preview,
.page-main,
.detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px;
}

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

.center-head {
  align-items: center;
}

.section-head h2,
.page-hero h1,
.ranking-copy h2,
.detail-info h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-head a {
  color: var(--blue);
  font-weight: 900;
}

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

.category-tile,
.overview-card a {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.3s ease;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), transparent);
}

.category-tile span {
  position: relative;
  z-index: 2;
  color: white;
}

.category-tile strong,
.overview-copy h2 {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small,
.overview-copy p {
  display: block;
  margin-top: 6px;
  color: #dbeafe;
  font-size: 13px;
}

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

.movie-card {
  min-width: 0;
}

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

.cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #e2e8f0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.cover-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.15);
}

.cover-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.7);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: var(--blue);
}

.movie-meta,
.movie-desc {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
  align-items: start;
  margin-top: 20px;
}

.ranking-copy {
  position: sticky;
  top: 90px;
  padding: 34px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.42), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e3a8a 58%, #0891b2);
  box-shadow: var(--shadow);
}

.ranking-copy h2,
.ranking-copy span {
  color: white;
}

.ranking-copy span {
  display: block;
  margin: 16px 0 24px;
  color: #dbeafe;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ranking-list li a,
.ranking-row a {
  display: grid;
  grid-template-columns: 44px 76px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-list li a:hover,
.ranking-row a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  font-weight: 900;
}

.ranking-list img {
  width: 76px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
}

.rank-info small,
.rank-info em {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.rank-info em {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-main,
.detail-main {
  padding-top: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

.page-hero {
  overflow: hidden;
  padding: 42px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.35), transparent 34%),
    linear-gradient(135deg, #0f172a, #1d4ed8 58%, #06b6d4);
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero span {
  color: white;
}

.page-hero span {
  display: block;
  margin-top: 12px;
  color: #dbeafe;
  max-width: 820px;
}

.overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.overview-card a {
  min-height: 240px;
  background: white;
  align-items: stretch;
  padding: 0;
}

.overview-covers {
  width: 42%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.overview-covers img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.overview-copy {
  flex: 1;
  padding: 30px;
}

.overview-copy h2 {
  color: #0f172a;
}

.overview-copy p {
  color: #64748b;
  font-size: 15px;
}

.overview-copy span {
  display: inline-flex;
  margin-top: 20px;
  color: var(--blue);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin: 28px 0;
  padding: 18px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.filter-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  padding: 0 14px;
}

.filter-panel input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
}

.full-ranking {
  margin-top: 26px;
}

.search-page .search-form {
  max-width: 760px;
  background: rgba(255, 255, 255, 0.16);
}

.search-results-section {
  margin-top: 34px;
}

.player-section {
  margin-top: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.detail-poster,
.detail-info {
  border-radius: 26px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-poster {
  padding: 16px;
  position: sticky;
  top: 92px;
}

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

.full-btn {
  width: 100%;
  margin-top: 14px;
}

.detail-info {
  padding: 30px;
}

.detail-eyebrow {
  color: var(--blue);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
}

.detail-info .detail-tags span {
  color: #334155;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.detail-info section {
  margin-top: 28px;
}

.detail-info h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 22px;
}

.detail-info p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  white-space: pre-wrap;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 30px;
}

.footer-brand strong {
  color: white;
}

.footer-brand p {
  max-width: 520px;
  margin: 6px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 700;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

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

  .hero-content,
  .ranking-preview,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .ranking-copy,
  .detail-poster {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 64px 18px 86px;
  }

  .hero-side {
    display: none;
  }

  .hero-search,
  .search-form {
    border-radius: 20px;
    flex-direction: column;
  }

  .hero-search input,
  .search-form input {
    min-height: 44px;
  }

  .category-strip,
  .content-section,
  .ranking-preview,
  .page-main,
  .detail-main {
    padding: 38px 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .overview-card a {
    display: block;
  }

  .overview-covers {
    width: 100%;
    height: 160px;
  }

  .overview-covers img {
    min-height: 160px;
  }

  .page-hero {
    padding: 30px 22px;
    border-radius: 24px;
  }

  .ranking-list li a,
  .ranking-row a {
    grid-template-columns: 36px 64px 1fr;
    gap: 10px;
  }

  .ranking-list img {
    width: 64px;
    height: 82px;
  }

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

  .detail-info {
    padding: 22px;
  }
}
