:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --dark: #020617;
  --slate: #0f172a;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: linear-gradient(90deg, #020617, #0f172a 42%, #111827);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.25);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
}

.brand-text,
.footer-logo {
  font-size: 22px;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease;
  font-weight: 600;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #22d3ee;
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.nav-search input,
.mobile-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: #fff;
  background: transparent;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.nav-search button,
.mobile-search button {
  border: 0;
  color: #fff;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.mobile-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-nav {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

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

.home-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72) 48%, rgba(2, 6, 23, 0.34)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M10 0H0v10' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.42;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 680px;
  margin: 0 auto;
  padding: 92px 22px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 40px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.16);
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy h1 span {
  display: block;
  margin-top: 10px;
  font-size: clamp(26px, 4vw, 44px);
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 30px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 20px;
  line-height: 1.78;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover,
.btn-ghost:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.hero-panel img {
  height: 240px;
  object-fit: cover;
}

.hero-panel-body {
  padding: 22px;
}

.hero-panel-body strong {
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
}

.hero-panel-body p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0 0 16px;
}

.hero-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-mini-meta span,
.detail-tags a,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-mini-meta span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.28);
}

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

.hero-controls button {
  border: 0;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.6;
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  opacity: 1;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 22px;
}

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

.section-header h1,
.section-header h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-header h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.section-header p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.card-category,
.card-score,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.card-category {
  top: 14px;
  left: 14px;
  padding: 8px 10px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.card-score {
  right: 14px;
  bottom: 14px;
  padding: 7px 9px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.rank-badge {
  left: 14px;
  bottom: 14px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.card-body strong {
  font-size: 18px;
  line-height: 1.32;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.card-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span {
  color: #0369a1;
  background: #e0f2fe;
}

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

.category-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--from), var(--to));
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.35s ease;
}

.category-card:hover::after {
  transform: scale(1.35);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  position: relative;
  z-index: 1;
}

.category-card p,
.category-card span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.ranking-section {
  background: linear-gradient(135deg, #020617, #111827 46%, #0e7490);
  color: #fff;
}

.ranking-section .section-header h2,
.ranking-section .section-header p {
  color: #fff;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 92px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.14);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

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

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info span {
  color: #cbd5e1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  color: #67e8f9;
  font-size: 20px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.32), transparent 36%), linear-gradient(135deg, #020617, #111827 58%, #0f766e);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 22px;
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  max-width: 820px;
  color: #cbd5e1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #67e8f9;
  font-weight: 700;
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.65);
}

.filter-area {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 22px 70px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: 0;
  color: #0f172a;
  background: #f8fafc;
  padding: 12px 14px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.detail-main {
  background: #020617;
  color: #e2e8f0;
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px 72px;
}

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

.player-card,
.detail-side,
.detail-section {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

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

.watch-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

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

.watch-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.watch-overlay img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.watch-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.84));
}

.watch-play-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 45px rgba(37, 99, 235, 0.42);
  font-size: 34px;
}

.player-caption {
  padding: 22px;
}

.player-caption h1 {
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 14px;
}

.player-caption p {
  color: #cbd5e1;
  line-height: 1.82;
  margin: 0;
}

.detail-side {
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 18px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

.detail-meta {
  display: grid;
  gap: 10px;
}

.detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  color: #cbd5e1;
}

.detail-meta strong {
  color: #fff;
  text-align: right;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-tags a {
  color: #cffafe;
  background: rgba(6, 182, 212, 0.16);
}

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

.detail-section h2 {
  color: #fff;
  font-size: 26px;
  margin: 0 0 14px;
}

.detail-section p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 16px;
}

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

.detail-main .movie-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-main .card-body strong {
  color: #fff;
}

.detail-main .card-meta,
.detail-main .card-desc {
  color: #cbd5e1;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

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

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

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

.footer-col a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #22d3ee;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

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

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

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 82px;
  }

  .hero-panel {
    max-width: 520px;
  }

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

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

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 18px;
  }

  .home-hero,
  .hero-inner {
    min-height: 720px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .section,
  .filter-area,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 34px 74px 1fr;
  }

  .rank-score {
    display: none;
  }

  .detail-side {
    display: block;
  }

  .detail-poster {
    max-width: 260px;
  }
}
