:root {
  --deepblue-950: #000a0f;
  --deepblue-900: #00141a;
  --deepblue-850: #001d2b;
  --deepblue-800: #002840;
  --deepblue-700: #004166;
  --ocean-900: #001a26;
  --ocean-700: #005580;
  --ocean-600: #0077b3;
  --ocean-500: #0099e6;
  --ocean-400: #1ab1ff;
  --ocean-300: #4dc2ff;
  --ocean-200: #80d4ff;
  --ocean-100: #b3e5ff;
  --teal-600: #008c73;
  --teal-500: #00b394;
  --white: #ffffff;
  --muted: rgba(179, 229, 255, 0.72);
  --card: rgba(0, 40, 64, 0.78);
  --card-strong: rgba(0, 65, 102, 0.86);
  --line: rgba(128, 212, 255, 0.16);
  --shadow-ocean: 0 20px 60px rgba(0, 153, 230, 0.18);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(26, 177, 255, 0.22), transparent 38rem),
    radial-gradient(circle at top right, rgba(0, 179, 148, 0.16), transparent 32rem),
    linear-gradient(135deg, var(--deepblue-950), var(--deepblue-900) 45%, var(--ocean-900));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 20, 26, 0.82);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--white);
  font-size: 15px;
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  box-shadow: var(--shadow-ocean);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  overflow: hidden;
}

.desktop-nav a {
  color: var(--ocean-100);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--white);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 270px;
}

.nav-search input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  color: var(--white);
  background: rgba(0, 40, 64, 0.9);
  border: 1px solid rgba(77, 194, 255, 0.24);
  outline: none;
  border-radius: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 4px rgba(26, 177, 255, 0.12);
}

.nav-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-btn {
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 12px 30px rgba(0, 153, 230, 0.2);
}

.ghost-btn {
  background: rgba(0, 40, 64, 0.72);
  border: 1px solid rgba(128, 212, 255, 0.25);
}

.nav-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 153, 230, 0.28);
}

.mobile-toggle {
  display: none;
  color: var(--white);
  background: rgba(0, 40, 64, 0.9);
  border: 1px solid rgba(128, 212, 255, 0.24);
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  background: rgba(0, 40, 64, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.mobile-panel a {
  display: block;
  color: var(--ocean-100);
  padding: 12px;
  border-radius: 12px;
}

.mobile-panel a:hover {
  background: rgba(26, 177, 255, 0.1);
  color: var(--white);
}

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

.hero-slider {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: var(--deepblue-900);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 10, 15, 0.96), rgba(0, 20, 26, 0.82) 38%, rgba(0, 20, 26, 0.26)),
    linear-gradient(0deg, var(--deepblue-950), transparent 32%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 380px);
  gap: 48px;
  align-items: center;
  padding: 64px 0;
}

.hero-copy h2 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  margin: 12px 0 22px;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--ocean-100);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  margin: 0;
}

.hero-meta,
.card-meta,
.detail-meta-card dl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 26px 0;
}

.hero-meta span,
.card-meta span,
.tag-row span {
  color: var(--ocean-100);
  background: rgba(0, 40, 64, 0.74);
  border: 1px solid rgba(77, 194, 255, 0.2);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(26, 177, 255, 0.18), rgba(0, 179, 148, 0.16));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(128, 212, 255, 0.16);
  transform: rotate(1deg);
}

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

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

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(179, 229, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 60px;
  background: linear-gradient(90deg, var(--ocean-400), var(--teal-500));
}

.section-wrap,
.page-hero,
.filter-panel,
.detail-main,
.breadcrumb {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.section-wrap {
  padding: 56px 0;
}

.intro-panel,
.filter-panel,
.page-hero,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(0, 40, 64, 0.82), rgba(0, 20, 26, 0.6));
  box-shadow: var(--shadow-card);
}

.intro-panel {
  margin-top: -38px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--ocean-300);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-panel h1,
.page-hero h1,
.section-head h2,
.detail-meta-card h1,
.detail-section h2 {
  margin: 8px 0 0;
  line-height: 1.15;
}

.intro-panel h1,
.page-hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.intro-panel p,
.page-hero p,
.category-tile p,
.card-body p,
.detail-meta-card p,
.article-copy p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

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

.rail-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 248px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-color: var(--ocean-700) transparent;
}

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

.all-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(77, 194, 255, 0.42);
  box-shadow: 0 22px 50px rgba(0, 153, 230, 0.18);
}

.card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(26, 177, 255, 0.14), rgba(0, 179, 148, 0.12));
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 10, 15, 0.72), transparent 52%);
}

.poster-frame figcaption,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.poster-frame figcaption {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(0, 40, 64, 0.82);
  border: 1px solid rgba(128, 212, 255, 0.2);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 50px;
  margin: 0 0 12px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-meta span {
  padding: 4px 8px;
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.large-category-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.category-tile {
  display: block;
  min-height: 188px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 65, 102, 0.82), rgba(0, 23, 16, 0.72));
  border: 1px solid var(--line);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 177, 255, 0.42);
  box-shadow: var(--shadow-ocean);
}

.category-tile span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  font-weight: 900;
  margin-bottom: 18px;
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  font-size: 14px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 40, 64, 0.72);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  background: rgba(0, 65, 102, 0.76);
}

.rank-item b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.rank-item img {
  width: 64px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(26, 177, 255, 0.1);
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  font-size: 16px;
  margin-bottom: 6px;
}

.rank-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-main {
  padding: 40px 0 0;
}

.page-hero {
  padding: 44px;
}

.compact-hero {
  margin-top: 28px;
}

.filter-panel {
  margin-top: 24px;
  padding: 22px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label span {
  display: block;
  color: var(--ocean-200);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
}

.empty-state {
  margin: 18px 0 0;
  color: var(--ocean-200);
}

.breadcrumb {
  padding-top: 30px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--ocean-200);
}

.detail-main {
  padding-bottom: 20px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 420px);
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(128, 212, 255, 0.18);
  box-shadow: var(--shadow-card);
}

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

.player-action {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  background: linear-gradient(135deg, rgba(0, 153, 230, 0.92), rgba(0, 179, 148, 0.92));
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-action span {
  font-size: 34px;
  transform: translateX(3px);
}

.player-action:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.player-shell.is-started .player-action {
  opacity: 0;
  pointer-events: none;
}

.detail-aside {
  display: grid;
  gap: 16px;
}

.detail-aside > img {
  width: 100%;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(26, 177, 255, 0.14), rgba(0, 179, 148, 0.12));
  box-shadow: var(--shadow-card);
}

.detail-meta-card {
  padding: 22px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
}

.detail-meta-card h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.detail-meta-card dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px 14px;
  margin: 20px 0;
}

.detail-meta-card dt {
  color: var(--ocean-300);
  font-weight: 900;
}

.detail-meta-card dd {
  margin: 0;
  color: var(--ocean-100);
}

.detail-section {
  padding: 32px;
  margin-top: 34px;
}

.detail-section h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.article-copy p {
  font-size: 17px;
  margin: 18px 0 0;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(0, 10, 15, 0.72);
}

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

.footer-brand {
  margin-bottom: 14px;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--ocean-200);
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .intro-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    min-height: 64px;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 82vh;
  }

  .hero-content {
    padding: 46px 0 82px;
  }

  .hero-copy h2 {
    font-size: 42px;
  }

  .hero-poster {
    display: none;
  }

  .section-wrap {
    padding: 38px 0;
  }

  .intro-panel,
  .page-hero,
  .filter-panel,
  .detail-section {
    padding: 24px;
    border-radius: 22px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 13px;
    min-height: 42px;
  }

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

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

  .player-action {
    width: 66px;
    height: 66px;
  }

  .player-action span {
    font-size: 27px;
  }
}

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