* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-200: #fde68a;
  --rose-500: #f43f5e;
  --white: #ffffff;
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.12);
  --shadow-deep: 0 28px 60px rgba(15, 23, 42, 0.24);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  color: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.brand-icon::after {
  position: absolute;
  top: 9px;
  left: 12px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 11px solid var(--slate-950);
  content: "";
}

.brand-text {
  background: linear-gradient(90deg, var(--amber-200), var(--amber-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: var(--slate-200);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.mobile-link:hover {
  background: rgba(51, 65, 85, 0.85);
  color: var(--white);
}

.nav-link.is-active,
.mobile-link.is-active {
  background: var(--amber-500);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.36);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img,
.page-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.52) 48%, rgba(15, 23, 42, 0.96) 100%),
    radial-gradient(circle at 18% 78%, rgba(245, 158, 11, 0.34), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding-bottom: 78px;
  color: var(--white);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--amber-400);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber-400);
  box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.18);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
  color: #cbd5e1;
}

.hero-meta a,
.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.hero-meta a,
.card-meta span:first-child,
.tag-list span {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
}

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

.primary-button,
.ghost-button,
.section-link,
.search-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-bar button {
  padding: 0 22px;
  border: 0;
  background: var(--amber-500);
  color: var(--white);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.34);
}

.ghost-button {
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(15, 23, 42, 0.4);
  color: var(--white);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.search-bar button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--white);
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 0 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-dot.is-active {
  width: 32px;
  background: var(--amber-400);
}

.section-shell,
.detail-main,
.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-shell {
  padding: 44px 0;
}

.quick-search {
  margin-top: -38px;
  padding: 0;
  position: relative;
  z-index: 6;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(16px);
}

.search-bar input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  outline: none;
}

.search-bar input {
  padding: 0 18px;
  border: 0;
  background: #f1f5f9;
}

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

.section-heading h2,
.category-overview-head h2,
.article-card h2,
.info-card h2,
.player-header h2,
.footer-links h2 {
  margin: 0;
  color: #1f2937;
  font-size: 26px;
  line-height: 1.2;
}

.section-heading p,
.category-overview-head p {
  margin: 8px 0 0;
  color: var(--slate-500);
  line-height: 1.7;
}

.section-link {
  min-height: 40px;
  padding: 0 16px;
  color: var(--amber-600);
}

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

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

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

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

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

.two-panel {
  display: grid;
  gap: 36px;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-deep);
}

.movie-card a {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

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

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

.card-duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.card-duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 7px 10px;
  background: var(--amber-500);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-meta span {
  min-height: 26px;
  padding: 5px 9px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
}

.movie-card.is-horizontal a {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 134px;
}

.movie-card.is-horizontal .card-poster {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.is-horizontal .card-body h3 {
  min-height: auto;
}

.movie-card.is-large .card-poster {
  aspect-ratio: 16 / 11;
}

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

.category-tile,
.category-overview-card,
.filter-panel,
.article-card,
.info-card,
.player-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 152px;
  padding: 22px;
  border-radius: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}

.category-tile span {
  color: var(--amber-600);
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: #64748b;
  font-size: 14px;
  line-height: 1.8;
}

.page-main {
  padding-bottom: 36px;
}

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 360px;
  padding: 92px max(16px, calc((100% - 1180px) / 2)) 60px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(245, 158, 11, 0.28), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e293b 48%, #0f172a);
  color: var(--white);
}

.compact-hero {
  min-height: 320px;
}

.ranking-hero {
  min-height: 460px;
}

.page-hero > div:not(.page-hero-overlay) {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-hero > img {
  position: absolute;
  inset: 0;
}

.compact-actions {
  margin-top: 24px;
}

.stacked-sections {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  padding: 24px;
  border-radius: 24px;
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 22px;
}

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

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  padding: 0 14px;
}

.filter-grid .movie-card.is-hidden,
#searchResults .movie-card.is-hidden {
  display: none;
}

.detail-main {
  padding: 34px 0 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-600);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 22% 18%, rgba(245, 158, 11, 0.24), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--white);
  box-shadow: var(--shadow-deep);
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
}

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

.detail-info {
  align-self: center;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.12);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag-list span {
  min-height: 28px;
}

.detail-player-section {
  width: 100%;
}

.player-card {
  overflow: hidden;
  border-radius: 26px;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
}

.player-header span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--amber-600);
  font-weight: 900;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.42);
}

.play-circle::after {
  position: absolute;
  top: 28px;
  left: 34px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid var(--white);
  content: "";
}

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

.article-card,
.info-card {
  padding: 24px;
  border-radius: 24px;
}

.article-card p {
  margin: 12px 0 24px;
  color: #475569;
  font-size: 16px;
  line-height: 2;
}

.info-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.info-card dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.info-card dd {
  margin: 0 0 8px;
  color: #1f2937;
  line-height: 1.6;
}

.compact-tags span {
  background: #fff7ed;
}

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

.footer-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-logo .brand-text {
  color: var(--white);
  -webkit-text-fill-color: transparent;
}

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

.footer-links h2 {
  color: var(--white);
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  text-align: center;
}

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

  .two-panel,
  .detail-content-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 280px 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 640px;
  }

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

  .hero-controls {
    right: 16px;
    left: 16px;
    justify-content: center;
  }

  .search-bar,
  .filter-panel,
  .search-panel,
  .detail-hero,
  .movie-card.is-horizontal a {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .category-overview-head,
  .player-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .three-columns,
  .two-columns,
  .rank-grid,
  .rank-page-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.is-horizontal .card-poster {
    aspect-ratio: 16 / 10;
  }

  .page-hero {
    min-height: 300px;
    padding-top: 70px;
  }

  .detail-cover img {
    min-height: 360px;
  }
}
