:root {
  --deepblue-950: #000e16;
  --deepblue-900: #00151f;
  --deepblue-800: #002b40;
  --deepblue-700: #003f5d;
  --deepblue-600: #00547c;
  --ocean-800: #00444e;
  --ocean-700: #006575;
  --ocean-600: #00879c;
  --ocean-500: #00a8c2;
  --ocean-400: #33bacf;
  --ocean-300: #66cbdb;
  --ocean-100: #cceef3;
  --ocean-50: #e6f7f9;
  --seagreen-700: #0f6b50;
  --seagreen-600: #147c5c;
  --seagreen-100: #d1ebe3;
  --seagreen-50: #e8f5f1;
  --coral-600: #ef5738;
  --coral-500: #ff694b;
  --coral-400: #ff876f;
  --sand-100: #f5f1e9;
  --sand-50: #faf8f4;
  --shadow-ocean: 0 18px 45px rgba(0, 68, 78, 0.16);
  --shadow-ocean-lg: 0 28px 70px rgba(0, 68, 78, 0.24);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--deepblue-900);
  background: linear-gradient(135deg, var(--sand-50), var(--ocean-50) 48%, var(--seagreen-50));
  min-height: 100vh;
}

body.nav-open {
  overflow: hidden;
}

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

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

main {
  min-height: 70vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--deepblue-800), var(--ocean-700), var(--seagreen-700));
  color: white;
  box-shadow: 0 12px 35px rgba(0, 21, 31, 0.22);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--coral-500), var(--ocean-400));
  color: white;
  box-shadow: 0 12px 26px rgba(255, 105, 75, 0.34);
}

.brand-text {
  font-size: 1.35rem;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ocean-50);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-nav input,
.search-entrance input,
.filter-controls input,
.filter-controls select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  font-size: 0.95rem;
  transition: border 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search input,
.mobile-nav input {
  width: 220px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.nav-search input::placeholder,
.mobile-nav input::placeholder {
  color: var(--ocean-100);
}

.nav-search input:focus,
.mobile-nav input:focus,
.search-entrance input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--coral-400);
  box-shadow: 0 0 0 4px rgba(255, 135, 111, 0.16);
}

.nav-search button,
.mobile-nav button,
.search-entrance button,
.btn-primary {
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--coral-500);
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(255, 105, 75, 0.28);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button:hover,
.mobile-nav button:hover,
.search-entrance button:hover,
.btn-primary:hover {
  background: var(--coral-600);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(255, 105, 75, 0.36);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 21, 31, 0.96);
  padding: 16px;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-nav input {
  flex: 1;
  width: auto;
}

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--deepblue-900), var(--ocean-800));
}

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 28%, rgba(51, 186, 207, 0.28), transparent 28%), linear-gradient(0deg, var(--deepblue-900), rgba(0, 21, 31, 0.74) 42%, rgba(0, 21, 31, 0.28));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  align-items: center;
  gap: 44px;
  color: white;
  padding-top: 28px;
}

.hero-text {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral-400);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-text h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  line-height: 1.08;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  letter-spacing: -0.05em;
}

.hero-text p,
.page-hero p,
.detail-info p {
  color: var(--ocean-100);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.85;
  margin: 0;
}

.hero-tags,
.detail-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 7px 13px;
  color: white;
  background: rgba(0, 135, 156, 0.36);
  border: 1px solid rgba(51, 186, 207, 0.36);
  backdrop-filter: blur(8px);
  font-size: 0.86rem;
  font-weight: 700;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: white;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  transition: background 0.25s ease, transform 0.25s ease;
}

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

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-ocean-lg);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--coral-500);
}

.search-entrance {
  margin-top: -34px;
  position: relative;
  z-index: 6;
}

.search-entrance form {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-ocean);
}

.search-entrance input {
  flex: 1;
  border-color: rgba(0, 135, 156, 0.24);
  background: var(--sand-50);
  color: var(--deepblue-900);
}

.section-block,
.highlight-panel,
.rank-panel,
.home-channel,
.rank-page {
  margin-top: 64px;
}

.home-channel {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2,
.filter-title h2,
.content-panel h2 {
  margin: 0;
  color: var(--deepblue-900);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.section-heading a {
  color: var(--ocean-600);
  font-weight: 800;
  transition: color 0.25s ease;
}

.section-heading a:hover {
  color: var(--coral-500);
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-ocean-lg);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--deepblue-900);
}

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

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 21, 31, 0.68), transparent 58%);
  opacity: 0.82;
}

.play-chip,
.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--coral-500);
  box-shadow: 0 16px 32px rgba(255, 105, 75, 0.32);
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: rgba(0, 21, 31, 0.82);
  font-size: 0.76rem;
  font-weight: 900;
}

.movie-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px;
}

.movie-copy strong {
  color: var(--deepblue-900);
  font-size: 1.06rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-copy em {
  color: var(--ocean-700);
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: var(--ocean-700);
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--ocean-50);
}

.highlight-panel {
  padding: 38px;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--ocean-50), var(--seagreen-50));
  box-shadow: var(--shadow-ocean);
}

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

.category-tile,
.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
  border-radius: 26px;
  padding: 22px;
  color: var(--deepblue-900);
  background: white;
  box-shadow: var(--shadow-ocean);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-ocean-lg);
}

.category-tile strong,
.category-card strong {
  font-size: 1.2rem;
}

.category-tile span,
.category-card em {
  color: var(--ocean-700);
  font-style: normal;
  line-height: 1.7;
  font-size: 0.92rem;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 94px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 94px;
  object-fit: cover;
  border-radius: 12px;
}

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

.movie-card-horizontal {
  flex-direction: row;
  min-height: 150px;
}

.movie-card-horizontal .movie-cover {
  width: 160px;
  flex: 0 0 160px;
  aspect-ratio: auto;
}

.movie-card-horizontal .movie-copy {
  flex: 1;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, var(--deepblue-900), var(--ocean-800));
}

.page-hero {
  padding: 82px 0 70px;
}

.compact-page-hero {
  padding-bottom: 56px;
}

.page-hero .container {
  max-width: 920px;
}

.page-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.3rem);
}

.filter-panel {
  margin-top: -32px;
  position: relative;
  z-index: 3;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-ocean);
}

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

.filter-title p {
  margin: 0;
  color: var(--ocean-700);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border-color: rgba(0, 135, 156, 0.24);
  background: var(--sand-50);
  color: var(--deepblue-900);
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  color: var(--coral-600);
  font-weight: 800;
}

.empty-state.is-visible {
  display: block;
}

.catalog-grid {
  margin-top: 34px;
  padding-bottom: 42px;
}

.detail-hero {
  padding: 56px 0;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--deepblue-900), rgba(0, 21, 31, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
  gap: 34px;
  align-items: center;
}

.player-panel {
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-ocean-lg);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 21, 31, 0.88), rgba(0, 21, 31, 0.32));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  font-size: 1.6rem;
}

.player-cover strong {
  max-width: 90%;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  text-align: center;
}

.player-cover span:last-child {
  color: var(--ocean-100);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ocean-100);
  font-size: 0.92rem;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 42px;
}

.content-panel {
  border-radius: 28px;
  padding: 30px;
  background: white;
  box-shadow: var(--shadow-ocean);
}

.content-panel p {
  color: var(--ocean-800);
  line-height: 1.9;
  margin: 12px 0 26px;
}

.content-panel dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.content-panel dt {
  color: var(--ocean-700);
  font-weight: 900;
}

.content-panel dd {
  margin: 0;
  color: var(--deepblue-900);
  line-height: 1.6;
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 96px;
}

.site-footer {
  margin-top: 72px;
  color: var(--ocean-100);
  background: linear-gradient(180deg, var(--deepblue-900), var(--deepblue-950));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr 1.1fr;
  gap: 30px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 1rem;
}

.footer-grid p {
  margin: 12px 0 0;
  color: var(--ocean-300);
  line-height: 1.8;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin-bottom: 10px;
  color: var(--ocean-200);
  transition: color 0.25s ease;
}

.footer-grid a:hover {
  color: var(--coral-400);
}

.footer-bottom {
  border-top: 1px solid rgba(102, 203, 219, 0.18);
  padding: 20px 16px;
  text-align: center;
  color: var(--ocean-400);
}

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

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

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

@media (max-width: 860px) {
  .desktop-nav,
  .nav-shell > .nav-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    padding: 46px 0 76px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .rank-grid,
  .rank-list,
  .detail-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-layout {
    align-items: stretch;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 600px) {
  .nav-shell {
    min-height: 66px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero-text h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.03em;
  }

  .hero-tags,
  .detail-tags,
  .tag-list {
    gap: 8px;
  }

  .search-entrance form,
  .mobile-nav form {
    flex-direction: column;
  }

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

  .highlight-panel,
  .content-panel,
  .filter-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .category-grid,
  .category-overview-grid,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    flex-direction: column;
  }

  .movie-card-horizontal .movie-cover {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 10;
  }

  .page-hero {
    padding: 54px 0 64px;
  }
}
