:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.12), transparent 32rem), var(--bg);
  min-width: 320px;
}

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;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b 54%, #0f172a);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
  transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: center;
}

.main-nav a,
.mobile-nav a {
  color: #e2e8f0;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #67e8f9;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
}

.header-search input {
  width: 210px;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 9px 12px;
}

.header-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.quick-search button,
.search-panel button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.mobile-toggle {
  display: none;
  color: #ffffff;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.12);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-carousel {
  position: relative;
  max-width: 1280px;
  min-height: 560px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 68px;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.8s ease;
  transform: scale(1.03);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.42), transparent 20rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.22));
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-content {
  position: relative;
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.page-hero span,
.category-hero span,
.section-heading span {
  display: inline-block;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-content h1,
.detail-hero h1,
.category-hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p,
.detail-hero p,
.category-hero p,
.page-hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0891b2;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 800;
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.btn-soft {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
}

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

.hero-dots {
  position: absolute;
  left: 68px;
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.quick-panel,
.section,
.page-hero,
.category-hero,
.detail-hero {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 26px;
  align-items: center;
  margin-top: 28px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.quick-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.quick-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 20px;
  background: var(--surface-soft);
}

.quick-search input,
.search-panel input,
.search-panel select {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
  background: #ffffff;
}

.section {
  padding: 46px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-heading a {
  color: #0891b2;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.42);
  box-shadow: var(--shadow);
}

.poster-link {
  display: block;
}

.poster {
  position: relative;
  min-height: 264px;
  aspect-ratio: 2 / 3;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.poster::after,
.ranking-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.76));
}

.poster-year {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-meta-line span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.movie-card h3,
.ranking-card h2 {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
  color: #0891b2;
}

.movie-card p,
.ranking-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.mini-tags {
  margin-top: 13px;
}

.mini-tags span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

.split-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.panel-card {
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.in-panel {
  margin-bottom: 18px;
}

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

.category-card {
  position: relative;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 18px;
  color: #ffffff;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  transition: transform 0.22s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.84));
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card span,
.category-card strong {
  position: relative;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #ecfeff;
  transform: translateX(4px);
}

.rank-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.category-hero,
.detail-hero {
  margin-top: 28px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #164e63);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 70px;
}

.category-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background-size: cover;
  background-position: center;
}

.category-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at right top, rgba(6, 182, 212, 0.38), transparent 28rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.20));
}

.category-hero > div,
.detail-hero-inner {
  position: relative;
  max-width: 760px;
  padding: 70px;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.category-links a {
  padding: 8px 12px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid var(--line);
  font-weight: 800;
}

.pagination .current,
.pagination a:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumbs a:hover {
  color: #67e8f9;
}

.player-section {
  scroll-margin-top: 86px;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.26), rgba(0, 0, 0, 0.48));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.36);
  font-size: 28px;
}

.play-layer strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-panel,
.meta-panel,
.search-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-panel {
  padding: 28px;
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-panel p {
  color: #334155;
  line-height: 2;
  margin: 0;
}

.meta-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.meta-panel div {
  padding: 20px;
  border-right: 1px solid var(--line);
}

.meta-panel div:last-child {
  border-right: 0;
}

.meta-panel strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.meta-panel span {
  font-weight: 800;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-poster {
  position: relative;
  min-height: 184px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.ranking-poster span {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.search-section {
  padding-bottom: 40px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 160px 150px auto;
  gap: 12px;
  padding: 18px;
  margin-bottom: 22px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

.footer-inner h2 {
  color: #ffffff;
  margin: 0 0 16px;
  font-size: 18px;
}

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

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.10);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .header-search input {
    width: 100%;
  }

  .hero-carousel,
  .quick-panel,
  .section,
  .page-hero,
  .category-hero,
  .detail-hero {
    width: calc(100% - 28px);
  }

  .hero-slide,
  .category-hero > div,
  .detail-hero-inner,
  .page-hero {
    padding: 38px;
  }

  .hero-carousel {
    min-height: 500px;
    border-radius: 24px;
  }

  .quick-panel,
  .split-section,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .meta-panel div {
    border-bottom: 1px solid var(--line);
  }

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

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

@media (max-width: 620px) {
  .brand-text small {
    display: none;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

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

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

  .hero-content p,
  .detail-hero p,
  .category-hero p,
  .page-hero p {
    font-size: 15px;
  }

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

  .hero-slide,
  .category-hero > div,
  .detail-hero-inner,
  .page-hero {
    padding: 26px;
  }

  .hero-dots {
    left: 26px;
    bottom: 22px;
  }

  .quick-search {
    flex-direction: column;
  }

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

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

  .poster {
    min-height: 220px;
  }

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

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

  .rank-info {
    grid-column: 2;
  }

  .ranking-card {
    grid-template-columns: 112px 1fr;
  }

  .ranking-poster {
    min-height: 162px;
  }

  .meta-panel {
    grid-template-columns: 1fr;
  }

  .meta-panel div {
    border-right: 0;
  }
}

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .poster {
    aspect-ratio: 16 / 10;
  }

  .ranking-card {
    grid-template-columns: 1fr;
  }
}
