:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.14), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 186px;
}

.logo-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.34);
}

.logo-mark::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 10px;
  border-left: 11px solid rgba(255, 255, 255, 0.94);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.logo-text strong {
  display: block;
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-text span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a,
.mobile-panel a {
  color: #cbd5e1;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a {
  padding: 10px 13px;
  font-size: 14px;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
  color: #67e8f9;
  background: rgba(51, 65, 85, 0.68);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
  width: 260px;
}

.search-form input,
.filter-input,
.filter-select {
  width: 100%;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.72);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input {
  height: 42px;
  padding: 0 48px 0 16px;
  border-radius: 13px;
}

.search-form button {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 30px;
  min-width: 38px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.search-form input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.13);
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 0 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-image,
.hero-image img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.42) 46%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 84px;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 690px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
  color: #cbd5e1;
}

.meta-line span,
.tag,
.rank-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.58);
  color: #cbd5e1;
  border-radius: 999px;
}

.meta-line span {
  padding: 8px 12px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 22px;
  color: white;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.76);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.26);
}

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

.btn-primary:hover {
  box-shadow: 0 20px 48px rgba(34, 211, 238, 0.36);
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.42);
}

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

.section-title {
  margin: 0;
  color: white;
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.movie-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.34) rgba(15, 23, 42, 0.5);
}

.movie-row .movie-card {
  flex: 0 0 330px;
}

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

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

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 56%);
  transition: opacity 0.28s ease;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

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

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.play-float {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: white;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 14px 4px 0;
}

.card-title {
  display: block;
  color: white;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: #67e8f9;
}

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

.card-meta {
  margin-top: 6px;
}

.card-desc {
  margin: 8px 0 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag {
  padding: 5px 9px;
  color: #94a3b8;
  font-size: 12px;
}

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

.category-card,
.info-card,
.rank-card,
.related-card,
.filter-bar {
  border: 1px solid rgba(148, 163, 184, 0.17);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  transition: transform 0.24s ease, border 0.24s ease, background 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(59, 130, 246, 0.08));
}

.category-card strong {
  display: block;
  color: white;
  font-size: 22px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 0;
}

.category-card span {
  color: #67e8f9;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.rank-card {
  display: grid;
  grid-template-columns: 54px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border-radius: 20px;
  transition: transform 0.22s ease, border 0.22s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.35);
}

.rank-number {
  color: #67e8f9;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

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

.rank-title {
  color: white;
  font-weight: 800;
  font-size: 17px;
}

.rank-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rank-pill {
  padding: 8px 12px;
  font-size: 13px;
  color: #67e8f9;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 62px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.18), transparent 25rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.82));
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
  margin: 16px 0 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
}

.filter-input,
.filter-select {
  min-height: 46px;
  border-radius: 14px;
  padding: 0 14px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-filter {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.quick-filter:hover,
.quick-filter.is-active {
  color: white;
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.16);
}

.detail-page {
  padding: 34px 0 76px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 24px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-info,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  border-radius: 26px;
}

.player-card {
  overflow: hidden;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.16), transparent 18rem),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.45));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.4);
  font-size: 30px;
}

.player-title-bar {
  padding: 22px 24px 26px;
}

.player-title-bar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.player-title-bar p {
  color: #cbd5e1;
  margin: 12px 0 0;
  line-height: 1.75;
}

.detail-info {
  margin-top: 24px;
  padding: 26px;
}

.detail-info h2,
.side-card h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 24px;
}

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

.side-card {
  padding: 18px;
  margin-bottom: 20px;
}

.side-cover {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 18px;
}

.side-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.side-meta {
  display: grid;
  gap: 10px;
  color: #cbd5e1;
}

.side-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.side-meta span:first-child {
  color: var(--muted);
}

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

.related-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  transition: transform 0.2s ease, border 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.35);
}

.related-card img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 13px;
}

.related-card strong {
  display: block;
  color: white;
  line-height: 1.35;
}

.related-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 22px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.66), rgba(2, 6, 23, 0.96));
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-title {
  color: white;
  font-size: 19px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
  line-height: 1.7;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.copyline {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .main-nav,
  .header-actions .search-form {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

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

  .mobile-panel .search-form {
    display: block;
    width: 100%;
    margin-bottom: 12px;
  }

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

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

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

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

  .header-inner {
    height: 66px;
  }

  .logo-text span {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 66vh;
  }

  .hero-content {
    padding: 86px 0 52px;
  }

  .section {
    padding: 48px 0;
  }

  .section-head,
  .filter-bar {
    display: block;
  }

  .section-actions,
  .quick-filters {
    margin-top: 16px;
  }

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

  .movie-row .movie-card {
    flex-basis: 260px;
  }

  .rank-card {
    grid-template-columns: 42px 90px 1fr;
  }

  .rank-card img {
    width: 90px;
    height: 64px;
  }

  .rank-pill {
    display: none;
  }

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

  .related-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .btn {
    width: 100%;
  }
}
