:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1b2e;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --teal: #0f766e;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 0%, rgba(245, 158, 11, 0.14), transparent 26rem),
    linear-gradient(180deg, #07111f 0%, #0a1323 48%, #050914 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.94), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 900;
  color: #082f2c;
  background: linear-gradient(135deg, var(--amber-2), #fde68a);
  box-shadow: 0 14px 35px rgba(245, 158, 11, 0.35);
}

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

.brand-text strong {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.brand-text small {
  color: #ccfbf1;
  font-size: 0.72rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.desktop-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--amber-2);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  flex: 0 1 310px;
  min-width: 210px;
}

.header-search input {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 0 14px;
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.16);
}

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

.header-search button,
.menu-toggle {
  height: 38px;
  border: 0;
  cursor: pointer;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
}

.header-search button {
  border-radius: 0 999px 999px 0;
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  border-radius: 999px;
  padding: 0 14px;
}

.mobile-drawer {
  display: none;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.84)),
    linear-gradient(0deg, rgba(7, 17, 31, 0.98), rgba(7, 17, 31, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 88px;
}

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

.hero-badges,
.movie-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span,
.movie-tags span,
.detail-tags span,
.card-tags span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ecfeff;
  background: rgba(15, 118, 110, 0.8);
  border: 1px solid rgba(103, 232, 249, 0.24);
}

.hero-badges span:first-child {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  border-color: transparent;
}

.hero h1 {
  margin: 20px 0 14px;
  max-width: 760px;
  font-size: clamp(2.55rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-meta {
  margin: 0 0 12px;
  color: #e0f2fe;
  font-size: 1.08rem;
}

.hero-desc {
  max-width: 640px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-actions,
.detail-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn-primary {
  color: #10201d;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.32);
}

.btn-secondary {
  color: #ecfeff;
  background: rgba(15, 118, 110, 0.9);
  box-shadow: 0 16px 40px rgba(20, 184, 166, 0.22);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 68px;
  display: flex;
  gap: 10px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(16px, calc((100% - 1180px) / 2));
  bottom: 48px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dot.active {
  background: var(--amber-2);
}

.section {
  padding: 56px 0 0;
}

.section-heading,
.page-hero,
.detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 8px;
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p,
.detail-copy p,
.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.kicker {
  display: inline-flex;
  color: var(--amber-2);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-more {
  flex: 0 0 auto;
  color: #67e8f9;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
  box-shadow: 0 16px 45px 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(34, 211, 238, 0.5);
  box-shadow: 0 26px 65px rgba(0, 0, 0, 0.34);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.22), transparent 45%),
    linear-gradient(135deg, #0f172a, #134e4a);
}

.movie-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.movie-score {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #a7f3d0;
  font-size: 0.76rem;
  font-weight: 800;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-info p {
  display: -webkit-box;
  min-height: 3.25em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags span {
  padding: 4px 8px;
  color: #d1fae5;
  font-size: 0.68rem;
  background: rgba(20, 184, 166, 0.13);
}

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

.category-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.86), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.28rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #111827;
  font-weight: 950;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.rank-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  align-items: flex-start;
  margin-top: 44px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 12% 16%, rgba(34, 211, 238, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.72), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 16px;
  color: var(--soft);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #67e8f9;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(230px, 330px);
  gap: 14px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0 12px;
  cursor: pointer;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

.filter-chip.active {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
}

.page-search {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccfbf1;
  font-size: 0.86rem;
  font-weight: 800;
}

.page-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0 13px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.detail-page {
  background:
    radial-gradient(circle at 20% 8%, rgba(245, 158, 11, 0.13), transparent 32rem),
    linear-gradient(180deg, #07111f, #050914 72%);
}

.detail-hero {
  align-items: stretch;
  margin-top: 10px;
}

.detail-cover {
  flex: 0 0 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-cover img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-copy {
  flex: 1;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  padding: 7px 12px;
  color: #ccfbf1;
  font-weight: 800;
  background: rgba(15, 118, 110, 0.58);
}

.player-shell {
  position: relative;
  margin: 34px 0;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #111827;
  font-size: 1.4rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.42);
}

.content-panel {
  margin: 30px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.content-panel h2 {
  margin: 0 0 14px;
}

.content-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.9;
}

.related-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 0;
}

.related-nav a {
  flex: 1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.06);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), #020617);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0 24px;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 1.45rem;
  font-weight: 950;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
  color: var(--soft);
  line-height: 1.8;
}

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

.footer-links a {
  border-radius: 999px;
  padding: 7px 11px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.07);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: var(--soft);
  font-size: 0.9rem;
}

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

.empty-state {
  display: none;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
}

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

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 0.92rem;
  }

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .mobile-drawer {
    position: fixed;
    inset: 68px 0 auto 0;
    z-index: 59;
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 68px);
    overflow: auto;
    padding: 18px;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
  }

  body.menu-open .mobile-drawer {
    transform: translateY(0);
  }

  .mobile-drawer a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: 540px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .hero-content {
    padding-bottom: 94px;
  }

  .hero-controls {
    right: 16px;
    bottom: 38px;
  }

  .section-heading,
  .page-hero,
  .detail-hero {
    display: block;
  }

  .detail-cover {
    margin-bottom: 18px;
  }

  .detail-cover img {
    min-height: 0;
  }

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

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

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

@media (max-width: 620px) {
  .header-inner,
  .main-wrap,
  .page-wrap,
  .hero-content,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 0.95rem;
  }

  .movie-info p,
  .movie-tags {
    display: none;
  }

  .page-hero,
  .detail-copy,
  .content-panel {
    padding: 22px;
  }

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }

  .related-nav {
    display: grid;
  }
}
