
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --dark-soft: #1f2937;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f6f7fb 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.header-inner {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #4b5563);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
}

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

.brand-text strong {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.brand-text small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.header-search {
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(249, 250, 251, 0.92);
  border-radius: 999px;
  padding: 10px 16px;
  color: #1f2937;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #c7ccd5;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  color: #ffffff;
  background: var(--dark);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-btn:hover {
  background: #374151;
  transform: translateY(-1px);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #4b5563;
  font-size: 15px;
  white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.section-link:hover,
.breadcrumb a:hover {
  color: #111827;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 24px;
  cursor: pointer;
}

.mobile-panel {
  border-top: 1px solid var(--line);
  padding: 16px 22px 18px;
  background: rgba(255, 255, 255, 0.96);
}

.mobile-panel nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel a,
.hero-category-row a,
.search-tags button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  padding: 8px 13px;
  font-size: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 48%, rgba(17, 24, 39, 0.36));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(650px, calc(100% - 40px));
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 22px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: #4b5563;
  padding: 5px 10px;
  font-size: 12px;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

.primary-btn {
  color: #111827;
  background: #ffffff;
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.hero-search-card {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 44px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.hero-search-card form,
.big-search {
  display: flex;
  gap: 10px;
}

.hero-search-card input {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  outline: none;
}

.hero-search-card button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
}

.hero-category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 12px;
}

.hero-category-row a {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: max(22px, calc((100vw - 1280px) / 2 + 22px));
  bottom: 132px;
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  width: 30px;
  background: #ffffff;
}

.page-main,
.home-main {
  min-height: 70vh;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 22px;
}

.soft-section {
  max-width: none;
  background: linear-gradient(180deg, rgba(243, 244, 246, 0.70), rgba(255, 255, 255, 0.94));
}

.soft-section > .section-heading,
.soft-section > .movie-grid,
.soft-section > .horizontal-row,
.soft-section > .rank-list,
.soft-section > .category-tiles {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.section-link {
  color: #4b5563;
  font-weight: 700;
  white-space: nowrap;
}

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(209, 213, 219, 1);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.poster-link img,
.list-poster img,
.compact-card img,
.player-cover img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.category-tile img {
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.06);
}

.poster-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(17, 24, 39, 0.58));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade,
.category-tile:hover .tile-shade {
  opacity: 1;
}

.card-body {
  padding: 15px;
}

.card-body h3,
.list-body h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p,
.list-body p {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 10px;
}

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.86);
  color: #ffffff;
  font-weight: 800;
}

.list-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 12px;
}

.list-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.list-body {
  padding: 6px 8px 6px 0;
}

.compact-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.compact-card img {
  width: 82px;
  height: 58px;
  border-radius: 12px;
  background: #111827;
  flex: 0 0 auto;
}

.compact-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.compact-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #111827;
}

.compact-info small {
  color: #9ca3af;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.86));
}

.tile-content {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile-content strong {
  font-size: 22px;
}

.tile-content small,
.tile-previews {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.tile-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tile-previews span {
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  background: linear-gradient(135deg, #111827, #374151 70%, #4b5563);
  color: #ffffff;
  padding: 70px 22px;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero span {
  display: inline-flex;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.10);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.view-buttons {
  display: flex;
  gap: 8px;
}

.view-buttons button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 9px 14px;
  cursor: pointer;
}

.view-buttons button.active,
.search-tags button:hover {
  color: #ffffff;
  background: #111827;
}

.category-grid.list-mode {
  display: block;
}

.category-grid.list-mode .grid-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  margin-bottom: 16px;
}

.category-grid.list-mode .poster-link {
  aspect-ratio: 16 / 10;
}

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

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.search-tags button {
  cursor: pointer;
}

.search-result-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.search-result-title h2 {
  margin: 0;
  font-size: 28px;
}

.search-result-title p {
  margin: 0;
  color: var(--muted);
}

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

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 22px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #111827;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.76));
}

.player-cover.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.play-circle {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  font-size: 30px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.26);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  color: #ffffff;
  font-size: 14px;
}

.movie-detail-head {
  margin: 22px 0;
}

.movie-detail-head h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-meta {
  color: #6b7280;
}

.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  background: #f3f4f6;
}

.detail-box {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.detail-box h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-box p {
  margin: 0 0 12px;
  color: #374151;
  text-align: justify;
}

.detail-tags {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.review-box {
  background: linear-gradient(135deg, #ffffff, #f9fafb);
}

.detail-side {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.side-related {
  display: grid;
  gap: 12px;
}

.more-section {
  margin-top: 20px;
}

.site-footer {
  margin-top: 56px;
  background: linear-gradient(180deg, #f8fafc, #eef0f4);
  border-top: 1px solid var(--line);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer-brand strong {
  color: #111827;
  font-size: 20px;
}

.site-footer p {
  color: #6b7280;
  max-width: 520px;
}

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

.footer-links {
  display: grid;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 26px;
  color: #9ca3af;
  font-size: 14px;
  border-top: 1px solid rgba(229, 231, 235, 0.82);
}

[hidden] {
  display: none !important;
}

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 680px;
  }

  .hero-content {
    margin: 0 22px;
    width: calc(100% - 44px);
  }

  .hero-search-card {
    bottom: 24px;
  }

  .hero-dots {
    right: 24px;
    bottom: 170px;
  }

  .hero-search-card form,
  .big-search,
  .filter-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filter-bar {
    display: grid;
  }

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

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

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

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

  .hero-carousel {
    min-height: 720px;
  }

  .hero-actions,
  .hero-search-card form {
    flex-direction: column;
  }

  .hero-search-card button,
  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .movie-grid,
  .category-tiles,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .search-result-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section {
    padding: 42px 16px;
  }

  .page-hero {
    padding: 50px 16px;
  }

  .detail-layout {
    padding: 20px 16px 0;
  }

  .detail-box {
    padding: 18px;
  }
}
