:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-strong: rgba(15, 23, 42, 0.95);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #10b981;
  --accent-2: #14b8a6;
  --accent-3: #22d3ee;
  --danger: #f43f5e;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.15), transparent 34rem),
    radial-gradient(circle at 78% 12%, rgba(20, 184, 166, 0.13), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 15px 32px rgba(16, 185, 129, 0.25);
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, #d1fae5, #5eead4, #a7f3d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.13);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  color: #dbeafe;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: rgba(148, 163, 184, 0.14);
}

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

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

.hero {
  position: relative;
  padding: 34px 0 54px;
  overflow: hidden;
}

.hero-shell {
  position: relative;
  min-height: 580px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 34px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(34px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.88) 58%, rgba(2, 6, 23, 0.35)),
    radial-gradient(circle at 28% 26%, rgba(16, 185, 129, 0.22), transparent 24rem);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 12px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
}

.hero h1 {
  margin: 22px 0 16px;
  max-width: 820px;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-title-sub {
  display: block;
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.04em;
  color: #ccfbf1;
}

.hero p {
  max-width: 740px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(16px, 1.6vw, 20px);
}

.hero-meta,
.meta-row,
.tag-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  white-space: nowrap;
}

.pill.accent {
  color: #ecfeff;
  border-color: rgba(20, 184, 166, 0.32);
  background: rgba(20, 184, 166, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.23);
}

.btn-soft {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.12);
}

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

.hero-poster-wrap {
  position: relative;
  min-height: 100%;
}

.hero-poster-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.45), transparent 46%, rgba(2, 6, 23, 0.2)), linear-gradient(0deg, rgba(2, 6, 23, 0.65), transparent 50%);
}

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

.hero-control {
  position: absolute;
  z-index: 5;
  bottom: 24px;
  left: clamp(24px, 6vw, 72px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 62px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.section {
  padding: 44px 0;
}

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

.section-title {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.section-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.74);
  padding: 0 14px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(20, 184, 166, 0.7);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(20, 184, 166, 0.14));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: #ecfeff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.86);
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.2);
}

.play-icon {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.card-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.card-title a:hover {
  color: #5eead4;
}

.card-text {
  margin: 10px 0 0;
  color: #94a3b8;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-tags span {
  color: #cbd5e1;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.18), transparent 16rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.42);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 20px;
  color: #94a3b8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(20, 184, 166, 0.38);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #0f766e, #10b981);
}

.rank-cover {
  width: 82px;
  height: 106px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  padding: 52px 0 28px;
}

.page-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(24px, 5vw, 46px);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.17), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.72));
  box-shadow: var(--shadow);
}

.page-card h1 {
  max-width: 860px;
  margin: 12px 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-card p {
  max-width: 820px;
  color: #cbd5e1;
  margin: 0;
}

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

.breadcrumb a:hover {
  color: #5eead4;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.7);
}

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

.detail-main {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(15, 23, 42, 0.72);
}

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-lead {
  color: #ccfbf1;
  font-size: 19px;
  margin: 0 0 20px;
}

.text-block {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  margin-top: 22px;
  padding-top: 22px;
}

.text-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.text-block p {
  margin: 0 0 16px;
  color: #cbd5e1;
}

.player-section {
  padding: 36px 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.64));
  z-index: 2;
}

.player-box.is-playing .player-layer {
  display: none;
}

.play-button {
  width: min(240px, calc(100% - 48px));
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 22px 44px rgba(16, 185, 129, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-button:hover {
  transform: scale(1.04);
  box-shadow: 0 28px 58px rgba(16, 185, 129, 0.42);
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(2, 6, 23, 0.9));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 22px;
  color: #94a3b8;
}

.footer-inner h3 {
  margin: 0 0 12px;
  color: #f8fafc;
}

.footer-inner p,
.footer-inner a {
  color: #94a3b8;
}

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

.footer-links a:hover {
  color: #5eead4;
}

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.show {
  display: block;
}

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

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

  .hero-shell {
    min-height: 700px;
  }

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

  .hero-content {
    min-height: 420px;
  }

  .hero-poster-wrap {
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-shell {
    min-height: 660px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 28px;
  }

  .hero h1 {
    letter-spacing: -0.05em;
  }

  .hero-control {
    left: 28px;
    bottom: 18px;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 42px 68px 1fr;
  }

  .rank-cover {
    width: 68px;
    height: 92px;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    width: 100%;
  }

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

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

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

@media (max-width: 460px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .poster-link {
    aspect-ratio: 16 / 11;
  }

  .hero-poster-wrap {
    min-height: 220px;
  }
}
