* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #f8fafc;
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #000000 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.95), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(30, 64, 175, 0.34);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #020617;
  background: linear-gradient(135deg, #f59e0b, #facc15);
  border-radius: 999px;
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.45);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  margin-top: 4px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 500;
}

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

.nav-link {
  color: #e2e8f0;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(59, 130, 246, 0.25);
  padding: 12px 24px 20px;
  background: rgba(15, 23, 42, 0.98);
}

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

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.74));
}

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

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.detail-title-block h1,
.page-hero h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.detail-title-block p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta span,
.meta-pill,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  padding: 6px 12px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.24);
}

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

.primary-btn,
.ghost-btn,
.mini-search button,
.search-box-large button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.mini-search button,
.search-box-large button {
  min-height: 46px;
  padding: 0 28px;
  color: #020617;
  background: #f59e0b;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.primary-btn:hover,
.mini-search button:hover,
.search-box-large button:hover {
  transform: translateY(-2px) scale(1.01);
  background: #fbbf24;
}

.ghost-btn {
  min-height: 46px;
  padding: 0 24px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.ghost-btn:hover {
  border-color: rgba(251, 191, 36, 0.8);
  color: #fbbf24;
  transform: translateY(-2px);
}

.ghost-btn.small {
  min-height: 42px;
  padding: 0 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 34px;
  background: #f59e0b;
}

.section {
  padding: 64px 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.detail-panel h2,
.sidebar-card h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  max-width: 760px;
  margin: 0;
  color: #94a3b8;
}

.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.text-link {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

.quick-search {
  padding-top: 40px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: center;
  padding: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.58));
  border: 1px solid rgba(59, 130, 246, 0.26);
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
}

.search-panel p {
  margin: 0;
  color: #cbd5e1;
}

.mini-search,
.search-box-large,
.filter-bar {
  display: flex;
  gap: 12px;
}

.mini-search input,
.search-box-large input,
.filter-bar input {
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  outline: none;
}

.mini-search input:focus,
.search-box-large input:focus,
.filter-bar input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

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

.small-grid,
.catalog-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(51, 65, 85, 0.92);
  border-radius: 18px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.82);
  box-shadow: 0 24px 46px rgba(30, 58, 138, 0.22);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.feature-grid .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 55%);
}

.meta-pill {
  position: absolute;
  top: 10px;
  padding: 4px 9px;
  color: #020617;
  background: rgba(245, 158, 11, 0.92);
}

.top-left {
  left: 10px;
}

.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 30px;
  height: 30px;
  justify-content: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body strong {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: #fbbf24;
}

.card-desc {
  display: -webkit-box;
  margin: 0;
  min-height: 44px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #60a5fa;
  font-size: 13px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.92);
  border-radius: 999px;
  font-size: 12px;
}

.dark-panel-section,
.category-strip:nth-of-type(even) {
  background: rgba(15, 23, 42, 0.38);
  border-top: 1px solid rgba(51, 65, 85, 0.54);
  border-bottom: 1px solid rgba(51, 65, 85, 0.42);
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 26px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: #f59e0b;
  box-shadow: 0 24px 48px rgba(30, 58, 138, 0.2);
}

.category-tile span,
.category-icon {
  display: block;
  margin-bottom: 14px;
  font-size: 42px;
}

.category-tile strong,
.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 22px;
}

.category-tile em,
.category-card p,
.category-card em {
  color: #94a3b8;
  font-style: normal;
}

.category-card p {
  margin: 0 0 16px;
}

.category-card em {
  color: #fbbf24;
  font-weight: 800;
}

.page-hero {
  position: relative;
  padding: 86px 0 54px;
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.18), transparent 30%),
    radial-gradient(circle at 84% 10%, rgba(37, 99, 235, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.filter-bar {
  max-width: 720px;
  margin-top: 26px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 60px 92px minmax(0, 1fr) 180px 110px 180px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-ranking .ranking-row {
  grid-template-columns: 52px 82px minmax(0, 1fr) 150px 100px;
}

.compact-ranking .ranking-tags {
  display: none;
}

.ranking-row:hover {
  transform: translateX(4px);
  border-color: #f59e0b;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #020617;
  background: #f59e0b;
  border-radius: 14px;
  font-weight: 900;
}

.ranking-row img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ranking-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy em {
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta,
.ranking-heat,
.ranking-tags {
  color: #94a3b8;
  font-size: 13px;
}

.ranking-heat {
  color: #fbbf24;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 58%, rgba(2, 6, 23, 0.28)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.48));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 42px 0 50px;
}

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

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-title-block {
  max-width: 820px;
}

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

.player-card,
.detail-panel,
.sidebar-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.32);
}

.player-shell {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
  border: 0;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: #020617;
  background: #f59e0b;
  border-radius: 999px;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.54);
}

.detail-panel {
  margin-top: 22px;
  padding: 26px;
}

.detail-panel p {
  margin: 0;
  color: #cbd5e1;
  white-space: pre-line;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
}

.info-list dt {
  color: #64748b;
}

.info-list dd {
  margin: 0;
  color: #e2e8f0;
}

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

.detail-sidebar {
  position: sticky;
  top: 92px;
}

.sidebar-card {
  padding: 20px;
}

.sidebar-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.sidebar-grid .movie-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: stretch;
}

.sidebar-grid .poster-wrap {
  aspect-ratio: 16 / 10;
}

.sidebar-grid .movie-card-body strong {
  min-height: auto;
  font-size: 14px;
}

.sidebar-grid .card-desc,
.sidebar-grid .tag-row {
  display: none;
}

.search-box-large {
  max-width: 780px;
  margin-top: 28px;
}

.site-footer {
  margin-top: 40px;
  color: #94a3b8;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #000000);
  border-top: 1px solid rgba(30, 64, 175, 0.32);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.footer-grid p {
  margin: 12px 0 0;
}

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

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding: 18px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(51, 65, 85, 0.62);
}

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

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

  .menu-toggle {
    display: block;
  }

  .feature-grid,
  .small-grid,
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-sidebar {
    position: static;
  }

  .ranking-row,
  .compact-ranking .ranking-row {
    grid-template-columns: 50px 82px minmax(0, 1fr) 120px;
  }

  .ranking-tags,
  .ranking-heat {
    display: none;
  }
}

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

  .brand-name {
    font-size: 17px;
  }

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

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

  .hero-copy p,
  .detail-title-block p,
  .page-hero p {
    font-size: 15px;
  }

  .hero-actions,
  .mini-search,
  .search-box-large,
  .filter-bar {
    flex-direction: column;
  }

  .section {
    padding: 42px 0;
  }

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

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .ranking-row,
  .compact-ranking .ranking-row {
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-meta {
    display: none;
  }

  .ranking-row img {
    width: 70px;
  }

  .detail-hero,
  .detail-hero-inner {
    min-height: 470px;
  }

  .detail-panel {
    padding: 20px;
  }

  .info-list div {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sidebar-grid .movie-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

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