:root {
  --deepblue: #08233f;
  --deepblue-soft: #10375e;
  --ocean: #157d9f;
  --seagreen: #24a978;
  --coral: #ff7c6b;
  --sand: #f6f1e8;
  --ink: #102033;
  --muted: #5c7285;
  --line: rgba(13, 48, 77, 0.12);
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 45px rgba(8, 35, 63, 0.14);
  --shadow-strong: 0 28px 70px rgba(8, 35, 63, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 15% 5%, rgba(36, 169, 120, 0.18), transparent 32%), linear-gradient(135deg, #fbf6ec 0%, #eaf8fb 42%, #eaf8f2 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0b2746 0%, #126c8f 54%, #1b9c71 100%);
  box-shadow: 0 12px 36px rgba(8, 35, 63, 0.26);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0b2746;
  background: linear-gradient(135deg, #fff 0%, #baf4e2 100%);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

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

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

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.header-search input,
.mobile-search input,
.big-search input,
.page-filter-input {
  outline: none;
}

.header-search input,
.mobile-search input {
  width: 210px;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.header-search button,
.mobile-search button,
.big-search button {
  padding: 9px 14px;
  border-radius: 12px;
  color: #08233f;
  background: #fff;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: #fff;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search input {
  flex: 1;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

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

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(180deg, #051827 0%, #08233f 100%);
}

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

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

.hero-bg,
.hero-shade,
.detail-backdrop {
  position: absolute;
  inset: 0;
}

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

.hero-img {
  opacity: 0.45;
  transform: scale(1.04);
}

.hero-shade {
  background: linear-gradient(90deg, rgba(5, 24, 39, 0.95) 0%, rgba(8, 35, 63, 0.76) 42%, rgba(8, 35, 63, 0.14) 100%), linear-gradient(0deg, rgba(5, 24, 39, 0.9) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 80px 24px 110px;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffd0c9;
  background: rgba(255, 124, 107, 0.16);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 850px;
  font-size: clamp(38px, 7vw, 86px);
  line-height: 1.03;
  color: #fff;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.75;
}

.hero-tags,
.detail-meta,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 26px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn,
.card-action,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.primary-btn {
  padding: 14px 22px;
  color: #08233f;
  background: linear-gradient(135deg, #fff 0%, #baf4e2 100%);
  box-shadow: 0 18px 42px rgba(36, 169, 120, 0.28);
}

.ghost-btn {
  padding: 13px 21px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: all 0.2s ease;
}

.hero-dot.is-active {
  width: 60px;
  background: #fff;
}

.quick-search-panel,
.content-section,
.page-hero,
.detail-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 5;
  padding-top: 30px;
  padding-bottom: 30px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, rgba(11, 39, 70, 0.94), rgba(18, 108, 143, 0.92));
  box-shadow: var(--shadow-strong);
}

.quick-search-panel h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 950;
}

.quick-search-panel p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.big-search {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 15px 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.big-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.content-section {
  padding-top: 70px;
}

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

.section-title h2,
.home-ranking h2,
.detail-sidebar h2,
.text-card h2,
.player-card h2 {
  color: var(--deepblue);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-title p {
  margin-top: 8px;
  color: var(--muted);
}

.section-more,
.card-action {
  padding: 10px 14px;
  color: var(--ocean);
  background: rgba(21, 125, 159, 0.08);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 40px rgba(8, 35, 63, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 124, 107, 0.35);
  box-shadow: var(--shadow);
}

.movie-poster,
.ranking-cover,
.detail-poster,
.compact-cover,
.category-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0b2746 0%, #157d9f 58%, #24a978 100%);
}

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

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

.poster-img,
.ranking-img,
.detail-poster-img,
.compact-img,
.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #08233f;
  background: rgba(255, 255, 255, 0.94);
  font-weight: 950;
}

.movie-card-body {
  padding: 18px;
}

.movie-meta-line,
.detail-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(92, 114, 133, 0.55);
}

.movie-card h2 {
  margin-top: 9px;
  color: var(--deepblue);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: var(--ocean);
  background: rgba(21, 125, 159, 0.09);
}

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

.home-ranking,
.detail-sidebar,
.text-card,
.player-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 40px rgba(8, 35, 63, 0.08);
}

.home-ranking {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: var(--coral);
  font-weight: 950;
}

.rank-title {
  font-weight: 900;
  color: var(--deepblue);
}

.rank-score {
  color: var(--ocean);
  font-weight: 950;
}

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

.category-card {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #08233f;
  box-shadow: var(--shadow);
}

.category-cover {
  position: absolute;
  inset: 0;
}

.category-img {
  opacity: 0.42;
}

.category-content {
  position: relative;
  z-index: 2;
  min-height: 210px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(0deg, rgba(5, 24, 39, 0.88), rgba(5, 24, 39, 0.05));
}

.category-content strong {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.category-content em {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  line-height: 1.7;
}

.page-hero {
  margin-top: 42px;
  border-radius: 34px;
  color: #fff;
  background: radial-gradient(circle at 80% 20%, rgba(255, 124, 107, 0.32), transparent 28%), linear-gradient(135deg, #08233f 0%, #126c8f 50%, #1b9c71 100%);
  box-shadow: var(--shadow-strong);
}

.page-hero > div {
  padding: 70px 34px;
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

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

.category-overview-card {
  padding: 26px;
}

.category-overview-card h2 {
  color: var(--deepblue);
  font-size: 24px;
  font-weight: 950;
}

.category-overview-card p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.75;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  color: var(--ocean);
  font-weight: 800;
}

.card-action {
  margin-top: 22px;
}

.filter-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
}

.page-filter-input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--ocean);
  background: rgba(21, 125, 159, 0.08);
  font-weight: 800;
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--ocean), var(--seagreen));
}

.filter-item.is-hidden {
  display: none;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(8, 35, 63, 0.08);
}

.ranking-cover {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
}

.ranking-info h2 {
  color: var(--deepblue);
  font-size: 22px;
  font-weight: 950;
}

.ranking-info p {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.ranking-index {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--coral);
  font-weight: 950;
}

.ranking-score {
  color: var(--ocean);
  font-size: 24px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #051827;
}

.detail-backdrop {
  opacity: 0.32;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 24, 39, 0.96), rgba(8, 35, 63, 0.8)), linear-gradient(0deg, rgba(5, 24, 39, 0.94), transparent);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 58px;
  padding-bottom: 58px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

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

.detail-info h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 68px);
}

.detail-meta {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.76);
}

.detail-tags {
  margin-top: 20px;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card,
.text-card,
.detail-sidebar {
  padding: 24px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle at 50% 50%, rgba(21, 125, 159, 0.42), rgba(5, 24, 39, 0.82));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #08233f;
  background: #fff;
  font-size: 30px;
  box-shadow: 0 18px 50px rgba(255, 255, 255, 0.28);
}

.player-overlay strong {
  font-size: 20px;
  font-weight: 950;
}

.text-card p {
  margin-top: 14px;
  color: #31475a;
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-line;
}

.related-section {
  padding-top: 0;
}

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

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

.compact-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-cover {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
}

.compact-info strong {
  display: block;
  color: var(--deepblue);
  font-weight: 950;
  line-height: 1.4;
}

.compact-info em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #08233f 0%, #04111e 100%);
}

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

.footer-brand p {
  max-width: 480px;
  margin-top: 14px;
  line-height: 1.8;
}

.footer-links h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

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

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.56);
}

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .hero-content,
  .hero-slider {
    min-height: 640px;
  }

  .hot-layout,
  .detail-layout,
  .footer-inner,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .home-ranking,
  .detail-sidebar {
    position: static;
  }

  .detail-poster {
    max-width: 260px;
  }

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

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

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

  .hero-content,
  .quick-search-panel,
  .content-section,
  .page-hero,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-content p,
  .page-hero p,
  .detail-one-line {
    font-size: 17px;
  }

  .big-search,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .all-grid,
  .related-grid,
  .category-grid,
  .overview-grid,
  .movie-grid-featured {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 86px 1fr;
  }

  .ranking-score {
    grid-column: 2;
  }
}
