:root {
  color-scheme: dark;
  --bg-0: #020617;
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --orange: #fb923c;
  --card: rgba(15, 23, 42, 0.72);
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 38%, var(--bg-0));
  color: var(--text);
  min-height: 100vh;
}

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

img {
  display: block;
  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.96), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
  color: #ffffff;
  font-size: 17px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

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

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.25s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 12px;
  padding: 10px;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle span {
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

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

.mobile-link {
  display: block;
  padding: 13px 14px;
  color: #cbd5e1;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.78);
}

.hero-section {
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

.hero-bg,
.hero-bg img,
.hero-mask {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
}

.hero-mask-left {
  background: linear-gradient(90deg, #020617 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.14) 100%);
}

.hero-mask-bottom {
  background: linear-gradient(0deg, var(--bg-1) 0%, transparent 44%);
}

.hero-content {
  position: relative;
  max-width: 1280px;
  min-height: 600px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 40px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.2);
}

.hero-copy h1,
.page-hero h1,
.detail-card h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 60px rgba(2, 6, 23, 0.7);
}

.hero-copy p,
.page-hero p {
  margin: 0;
  max-width: 780px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #cbd5e1;
}

.hero-meta {
  margin: 26px 0;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.search-page-form button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.search-page-form button,
.hero-search button {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-page-form button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-search,
.search-page-form,
.filter-bar {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.hero-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  outline: none;
}

.hero-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.hero-side {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(16px);
}

.hero-side h2 {
  margin: 0;
  font-size: 20px;
}

.hero-mini {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  min-height: 120px;
  background: var(--bg-2);
}

.hero-mini img {
  height: 120px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-mini span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 14px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
  color: #ffffff;
  font-weight: 800;
}

.hero-mini:hover img {
  transform: scale(1.08);
}

.content-section,
.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.page-main,
.detail-main {
  padding-top: 36px;
}

.soft-section {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0));
}

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

.section-head div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.section-icon {
  color: var(--cyan);
  font-size: 28px;
}

.section-more,
.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.large-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.poster-card,
.large-card,
.wide-card,
.category-panel {
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.poster-card:hover,
.large-card:hover,
.wide-card:hover,
.category-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: var(--shadow);
  background: rgba(30, 41, 59, 0.68);
}

.poster-link,
.large-cover,
.wide-cover,
.category-cover {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link {
  aspect-ratio: 2 / 3;
}

.poster-link img,
.large-cover img,
.wide-cover img,
.category-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-card:hover img,
.large-card:hover img,
.wide-card:hover img,
.category-panel:hover img {
  transform: scale(1.07);
}

.poster-gradient,
.card-shade,
.category-shade,
.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.1) 52%, rgba(2, 6, 23, 0.04));
}

.poster-type,
.card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.66);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-play,
.play-large,
.play-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #020617;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-play {
  width: 48px;
  height: 48px;
  top: 50%;
  left: 50%;
  margin: -24px 0 0 -24px;
}

.play-large {
  width: 66px;
  height: 66px;
  top: 50%;
  left: 50%;
  margin: -33px 0 0 -33px;
  font-size: 24px;
}

.play-badge {
  width: 42px;
  height: 42px;
  top: 50%;
  left: 50%;
  margin: -21px 0 0 -21px;
}

.poster-card:hover .poster-play,
.large-card:hover .play-large,
.wide-card:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.poster-info {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 13px 13px;
}

.poster-info strong,
.poster-info small {
  display: block;
}

.poster-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
}

.poster-info small {
  margin-top: 5px;
  color: #cbd5e1;
}

.large-cover {
  aspect-ratio: 16 / 9;
}

.large-cover strong {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 16px;
  font-size: 22px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.56);
}

.large-body {
  padding: 18px;
}

.large-body p,
.wide-body p,
.category-panel-body p,
.detail-card p,
.detail-content p {
  color: #cbd5e1;
  line-height: 1.75;
}

.large-body p,
.wide-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 14px;
}

.wide-grid,
.rank-grid,
.rank-list {
  display: grid;
  gap: 16px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 118px;
}

.wide-cover {
  min-height: 118px;
}

.wide-body {
  position: relative;
  padding: 16px 18px;
}

.movie-title {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.movie-title:hover {
  color: var(--cyan);
}

.rank-num {
  float: right;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin-left: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), #facc15);
  color: #111827;
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.category-tile strong,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 54px;
  font-size: 24px;
}

.category-tile small {
  bottom: 18px;
  color: #cbd5e1;
  line-height: 1.5;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 48px;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 38%), linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.94));
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.3);
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: center;
}

.category-hero img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.category-panel {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
}

.category-cover {
  min-height: 230px;
}

.category-panel-body {
  padding: 22px;
}

.category-panel-body h2 {
  margin: 0 0 10px;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.category-preview span,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(51, 65, 85, 0.78);
  color: #cbd5e1;
  font-size: 12px;
}

.filter-bar {
  margin: 0 0 24px;
}

.filter-bar select {
  max-width: 180px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #94a3b8;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch;
}

.player-box {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player,
.player-cover,
.player-cover img,
.player-dark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  object-fit: contain;
  background: #000000;
}

.player-cover {
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  color: #ffffff;
  transition: opacity 0.25s ease;
}

.player-cover img {
  object-fit: cover;
}

.player-dark {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(0, 0, 0, 0.72));
}

.player-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #020617;
  font-size: 34px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

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

.detail-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-card img {
  aspect-ratio: 2 / 3;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.detail-card h1 {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1.18;
}

.detail-meta {
  margin: 16px 0;
  font-size: 14px;
}

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

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

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-content p + h2 {
  margin-top: 28px;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.search-summary {
  margin-bottom: 20px;
  color: #cbd5e1;
  font-weight: 800;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 900;
}

.footer-about p,
.footer-links li,
.footer-bottom {
  color: #94a3b8;
}

.footer-about p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .hero-content,
  .player-layout {
    grid-template-columns: 1fr;
  }

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

  .hero-side h2 {
    grid-column: 1 / -1;
  }
}

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

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

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

  .header-inner {
    height: 68px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .hero-content {
    padding: 56px 18px;
  }

  .hero-side,
  .rank-grid,
  .category-grid,
  .category-panel-grid,
  .footer-inner,
  .category-hero,
  .detail-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .category-cover {
    min-height: 180px;
  }

  .page-hero {
    padding: 32px 22px;
    border-radius: 22px;
  }

  .player-box {
    min-height: 280px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-main,
  .detail-main,
  .footer-inner,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-section,
  .hero-content {
    min-height: 620px;
  }

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

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

  .hero-search,
  .search-page-form,
  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select {
    max-width: none;
  }

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

  .wide-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .wide-cover {
    min-height: 132px;
  }

  .wide-body p {
    -webkit-line-clamp: 2;
  }

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

  .detail-content {
    padding: 22px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    font-size: 27px;
  }
}
