:root {
  --ocean-deep: #0a4a6b;
  --ocean-blue: #1a7fa0;
  --ocean-light: #4fb3d4;
  --sand-light: #f5ebe0;
  --sand-warm: #e3d5ca;
  --coral-accent: #ff6b6b;
  --coral-light: #ff9999;
  --seafoam: #88d4ab;
  --sunset-orange: #ff9f1c;
  --cloud-white: #ffffff;
  --mist-gray: #f8f9fa;
  --charcoal: #2c3e50;
  --text-dark: #1a1a1a;
  --text-gray: #6c757d;
  --shadow-ocean: 0 4px 20px rgba(10, 74, 107, .15);
  --shadow-ocean-lg: 0 10px 40px rgba(10, 74, 107, .20);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sand-light);
  color: var(--text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-blue) 50%, var(--ocean-light) 100%);
  box-shadow: var(--shadow-ocean-lg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--ocean-deep);
  background: var(--seafoam);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 650;
}

.nav-links a {
  transition: color .25s ease, transform .25s ease;
}

.nav-links a:hover {
  color: var(--seafoam);
  transform: translateY(-1px);
}

.top-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.card-filter {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text-dark);
  background: rgba(255, 255, 255, .96);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(10, 74, 107, .12);
}

.top-search input {
  width: 210px;
}

.top-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  color: #fff;
  background: var(--coral-accent);
  transition: background .25s ease, transform .25s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
  background: var(--coral-light);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin: 12px auto;
  width: min(1180px, calc(100% - 32px));
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .10);
}

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

body.menu-open .mobile-panel {
  display: block;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--ocean-deep);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  min-height: 560px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s ease, visibility .7s ease, transform .7s ease;
  transform: scale(1.02);
}

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

.hero-content {
  color: #fff;
  max-width: 720px;
}

.hero-content h1 {
  margin: 10px 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--coral-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.btn-primary {
  color: #fff;
  background: var(--coral-accent);
  box-shadow: 0 12px 26px rgba(255, 107, 107, .28);
}

.btn-primary:hover {
  background: var(--coral-light);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, .20);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  color: var(--ocean-deep);
  background: #fff;
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  transition: background .25s ease, transform .25s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, .30);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-flow {
  padding: 52px 0;
}

.inner-page {
  min-height: 60vh;
}

.content-section {
  margin-bottom: 56px;
}

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

.section-title h2 {
  margin: 0;
  color: var(--ocean-deep);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-title a {
  color: var(--ocean-blue);
  font-weight: 800;
}

.section-title.light h2,
.section-title.light a,
.section-title.light .eyebrow {
  color: #fff;
}

.panel-card {
  border-radius: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow-ocean);
}

.gradient-panel {
  border-radius: 24px;
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--sunset-orange) 0%, var(--coral-accent) 100%);
  box-shadow: var(--shadow-ocean-lg);
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-ocean);
  transition: transform .28s ease, box-shadow .28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px rgba(10, 74, 107, .22);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--sand-warm);
}

.poster-wrap img,
.detail-cover img,
.category-tile img,
.movie-card-wide img,
.rank-item img,
.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform .45s ease;
}

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: var(--coral-accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.card-body {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 16px;
}

.movie-card h3,
.rank-item h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--text-dark);
  font-size: 18px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card p,
.rank-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: var(--text-gray);
  font-size: 12px;
}

.card-meta span,
.tag-row span,
.detail-tags span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--sand-warm);
}

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

.tag-row span:nth-child(2),
.card-meta span:nth-child(2) {
  color: var(--ocean-deep);
  background: rgba(79, 179, 212, .22);
}

.horizontal-row {
  display: grid;
  grid-auto-columns: minmax(190px, 220px);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  border-radius: 4px;
  background: var(--sand-light);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--ocean-light);
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 150px;
}

.movie-card-wide img {
  aspect-ratio: 1 / 1;
}

.movie-card-wide > div {
  padding: 16px 16px 16px 0;
}

.rank-grid,
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-list {
  margin-bottom: 44px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 86px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-ocean);
  transition: transform .25s ease, box-shadow .25s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(10, 74, 107, .18);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: var(--ocean-blue);
}

.rank-item:nth-child(-n + 3) .rank-no {
  background: var(--coral-accent);
}

.rank-item img {
  width: 86px;
  height: 104px;
  border-radius: 14px;
}

.rank-item small {
  color: var(--text-gray);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-gray);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--ocean-blue);
  font-weight: 700;
}

.breadcrumb span::before,
.breadcrumb a + a::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-gray);
}

.page-hero {
  border-radius: 28px;
  padding: clamp(30px, 5vw, 56px);
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-blue) 55%, var(--ocean-light) 100%);
  box-shadow: var(--shadow-ocean-lg);
}

.small-hero,
.category-hero {
  margin-bottom: 34px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

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

.filter-box,
.search-page-form {
  max-width: 680px;
  margin-top: 24px;
}

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

.category-tile {
  display: grid;
  gap: 18px;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-ocean);
  transition: transform .28s ease, box-shadow .28s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(10, 74, 107, .22);
}

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

.tile-covers img {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.category-tile h2 {
  margin: 0;
  color: var(--ocean-deep);
}

.category-tile p {
  margin: 0;
  color: var(--text-gray);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-ocean-lg);
}

.detail-info h1 {
  margin: 8px 0 16px;
  color: var(--ocean-deep);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.one-line {
  margin: 0 0 18px;
  color: var(--charcoal);
  font-size: 19px;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-tags span {
  color: var(--ocean-deep);
  background: rgba(136, 212, 171, .34);
}

.player-section {
  scroll-margin-top: 110px;
}

.player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow-ocean-lg);
}

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

.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: #000;
  transition: opacity .3s ease, visibility .3s ease;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, .10), rgba(0, 0, 0, .72));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: var(--coral-accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .34);
  transform: translate(-50%, -50%);
}

.text-page h1,
.text-page h2 {
  margin: 0 0 16px;
  color: var(--ocean-deep);
}

.text-page p {
  margin: 0 0 14px;
  color: var(--charcoal);
  font-size: 17px;
  line-height: 1.9;
}

.search-results:empty::before {
  content: "输入关键词后显示相关影片";
  grid-column: 1 / -1;
  display: block;
  border-radius: 20px;
  padding: 28px;
  color: var(--text-gray);
  background: #fff;
  box-shadow: var(--shadow-ocean);
}

.movie-card.is-hidden {
  display: none;
}

.site-footer {
  color: rgba(255, 255, 255, .82);
  background: var(--ocean-deep);
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--seafoam);
}

.site-footer p {
  margin: 14px 0 0;
}

.site-footer a,
.back-top {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, .78);
  transition: color .25s ease;
}

.site-footer a:hover,
.back-top:hover {
  color: #fff;
}

.back-top {
  border: 0;
  padding: 0;
  background: transparent;
}

.footer-bottom {
  padding: 18px 16px;
  text-align: center;
  color: rgba(255, 255, 255, .65);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

@media (max-width: 1024px) {
  .nav-links,
  .top-search {
    display: none;
  }

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

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

  .wide-grid,
  .rank-grid,
  .rank-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 260px 1fr;
  }

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

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

  .header-inner {
    min-height: 64px;
  }

  .logo {
    font-size: 20px;
  }

  .hero-carousel,
  .hero-slide {
    min-height: 500px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .card-body {
    min-height: 175px;
    padding: 13px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .panel-card,
  .gradient-panel {
    border-radius: 20px;
    padding: 18px;
  }

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

  .detail-cover {
    max-width: 280px;
    margin: 0 auto;
  }

  .rank-item {
    grid-template-columns: 38px 76px 1fr;
    gap: 10px;
  }

  .rank-item img {
    width: 76px;
    height: 96px;
  }

  .movie-card-wide {
    grid-template-columns: 110px 1fr;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .grid-large {
    grid-template-columns: 1fr;
  }

  .horizontal-row {
    grid-auto-columns: minmax(170px, 190px);
  }

  .mobile-search,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }
}
