:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(59, 130, 246, 0.25);
  --line-soft: rgba(148, 163, 184, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --cyan: #67e8f9;
  --gold: #f59e0b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.18), transparent 32%), linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.34);
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--blue-light), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: #d1d5db;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 12px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(30, 64, 175, 0.55);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-search input {
  color: white;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(59, 130, 246, 0.44);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 260px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.inline-search input:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24);
}

.header-search button,
.mobile-search button {
  border: 0;
  color: white;
  background: var(--blue);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: white;
  background: rgba(30, 64, 175, 0.52);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
}

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

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-search input {
  min-width: 0;
  padding: 11px 12px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.74) 38%, rgba(0, 0, 0, 0.18) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.82), transparent 62%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 86px;
  max-width: 760px;
}

.hero-badge,
.tag,
.poster-type,
.poster-year,
.card-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  line-height: 1;
}

.hero-badge {
  margin-bottom: 18px;
  padding: 8px 13px;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.22);
}

.hero h1,
.page-hero h1,
.movie-detail h1 {
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.58);
}

.hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.primary-button,
.ghost-button,
.rank-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: white;
  background: var(--blue);
  padding: 13px 22px;
}

.primary-button:hover,
.rank-watch:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.52);
  padding: 12px 20px;
}

.ghost-button:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.8);
  background: rgba(30, 64, 175, 0.45);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: white;
}

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

.page-top {
  padding-top: 34px;
}

.content-section {
  margin: 64px 0;
}

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

.section-header div {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.section-header h2 {
  margin: 0;
  color: white;
  font-size: 26px;
}

.section-more {
  color: var(--blue-light);
  font-weight: 700;
}

.section-desc {
  max-width: 780px;
  margin: -10px 0 24px;
  color: var(--subtle);
}

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

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

.compact-grid {
  gap: 20px;
}

.movie-card {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.62);
  box-shadow: var(--shadow);
}

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

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

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

.poster-type,
.poster-year {
  position: absolute;
  top: 12px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.poster-type {
  left: 12px;
}

.poster-year {
  right: 12px;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body p {
  min-height: 46px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 10px;
  color: var(--subtle);
  font-size: 13px;
}

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

.tag {
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(30, 64, 175, 0.22);
  padding: 6px 9px;
}

.card-category {
  margin-top: 14px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.16);
  padding: 7px 10px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.52);
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}

.rank-num,
.ranking-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #cbd5e1;
  background: #334155;
  font-weight: 850;
}

.rank-num.top,
.ranking-number.top {
  color: white;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.list-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.list-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.list-card a {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
}

.list-card img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.list-card-body h3 {
  margin: 0;
  font-size: 16px;
  color: white;
}

.list-card-body p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-body span {
  color: var(--subtle);
  font-size: 12px;
}

.page-hero {
  position: relative;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.28), transparent 34%), linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.small-hero {
  margin-bottom: 40px;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.inline-search {
  margin-top: 24px;
}

.inline-search input {
  width: min(520px, 100%);
  padding: 14px 16px;
}

.wide-search input {
  width: min(720px, 100%);
}

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

.category-card {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.6);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 20px;
}

.category-card-body h2 {
  margin: 0;
  font-size: 22px;
}

.category-card-body p {
  color: var(--muted);
  line-height: 1.65;
}

.category-card-body span {
  color: var(--blue-light);
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue-light);
}

.ranking-list {
  display: grid;
  gap: 16px;
  margin: 40px 0 72px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 132px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--panel);
}

.ranking-cover img {
  width: 132px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-body h2 {
  margin: 0;
  font-size: 20px;
}

.ranking-body p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-watch {
  color: white;
  background: var(--blue);
  padding: 10px 16px;
}

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

.watch-area,
.detail-side,
.movie-detail,
.text-panel {
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.watch-area {
  padding: 16px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(15, 23, 42, 0.22));
  cursor: pointer;
}

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

.play-circle {
  width: 74px;
  height: 74px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.38);
  font-size: 30px;
}

.detail-side {
  padding: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.side-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.side-meta span {
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.72);
}

.full-button {
  width: 100%;
}

.movie-detail {
  margin-top: 28px;
  padding: 34px;
}

.movie-detail h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.lead-text {
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-info-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.64);
}

.detail-info-grid strong,
.detail-info-grid span {
  display: block;
}

.detail-info-grid strong {
  color: var(--subtle);
  font-size: 13px;
}

.detail-info-grid span {
  margin-top: 6px;
  color: white;
}

.text-panel {
  margin-top: 18px;
  padding: 24px;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  text-align: justify;
}

.empty-state {
  display: none;
  margin: 30px 0 80px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--panel);
}

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

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
  color: var(--subtle);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-logo {
  color: white;
  font-size: 20px;
}

.footer-inner h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 17px;
}

.footer-inner p,
.footer-inner li {
  color: var(--subtle);
  line-height: 1.75;
}

.footer-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-inner a:hover {
  color: var(--blue-light);
}

.footer-bottom {
  padding: 18px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    align-items: center;
  }

  .detail-side img {
    aspect-ratio: 3 / 4;
  }

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

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

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

  .hero {
    height: 520px;
  }

  .hero-content {
    left: 22px;
    bottom: 70px;
  }

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

  .hero-arrow {
    width: 38px;
    height: 38px;
  }

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

  .ranking-item {
    grid-template-columns: 42px 96px 1fr;
  }

  .ranking-cover img {
    width: 96px;
    height: 68px;
  }

  .rank-watch {
    grid-column: 2 / 4;
    justify-self: start;
  }

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

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

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

  .hero {
    height: 500px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .page-hero,
  .movie-detail {
    padding: 24px;
    border-radius: 22px;
  }

  .ranking-item {
    grid-template-columns: 40px 1fr;
  }

  .ranking-cover {
    display: none;
  }

  .rank-watch {
    grid-column: 2;
  }

  .detail-side {
    display: block;
  }

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

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