:root {
  --brand: #00a3af;
  --brand-dark: #008c97;
  --brand-soft: #e6f7f8;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --page: #f7fafb;
  --night: #0b1220;
  --orange: #f97316;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, rgba(0, 163, 175, 0.10), transparent 28%), var(--page);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #33b8c2);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(0, 163, 175, 0.28);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 15px;
  color: #374151;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-soft);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-dark);
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--night);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 20, 0.92), rgba(5, 10, 20, 0.58) 46%, rgba(5, 10, 20, 0.18)),
    linear-gradient(0deg, rgba(5, 10, 20, 0.72), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: 70px;
}

.hero-copy {
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #ffffff;
  background: rgba(0, 163, 175, 0.88);
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  text-shadow: 0 16px 38px rgba(0, 0, 0, 0.38);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.tag-row span {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: transparent;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 15px 34px rgba(0, 163, 175, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

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

.section-link {
  min-height: 42px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 38px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--brand);
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  transform: translateX(-50%);
}

.hero-thumb {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  background: rgba(0, 163, 175, 0.42);
  transform: translateY(-2px);
}

.hero-thumb img {
  height: 66px;
  border-radius: 13px;
  object-fit: cover;
}

.hero-thumb span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 800;
}

.quick-search-section {
  margin-top: -28px;
  position: relative;
  z-index: 8;
}

.search-panel,
.content-panel,
.side-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.search-panel h2,
.section-title-row h2,
.content-panel h2,
.side-card h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 163, 175, 0.14);
}

.section-block {
  padding: 64px 0 8px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-bar button {
  padding: 9px 16px;
  color: #374151;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.filter-bar button:hover,
.filter-bar button.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(229, 231, 235, 0.80);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(0, 163, 175, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

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

.compact-card .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.62));
}

.rating,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 30px;
  padding: 0 10px;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.rating {
  right: 12px;
  bottom: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  background: rgba(239, 68, 68, 0.92);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--brand-dark);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 15px;
  color: #4b5563;
  font-size: 14px;
}

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

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

.category-card {
  min-height: 168px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(0, 163, 175, 0.16), transparent 42%),
    #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  border-color: rgba(0, 163, 175, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.category-card span {
  display: block;
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.ranking-strip {
  padding-bottom: 70px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(0, 163, 175, 0.38);
  transform: translateX(4px);
}

.rank-num {
  color: var(--orange);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 163, 175, 0.42), transparent 28%),
    linear-gradient(135deg, #07111f, #12263b 58%, #063840);
}

.compact-hero {
  padding: 74px 0 66px;
}

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

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

.page-search {
  max-width: 520px;
  margin-top: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #07111f;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.30;
  filter: blur(4px);
  transform: scale(1.04);
}

.detail-backdrop img {
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.95), rgba(7, 17, 31, 0.62)),
    linear-gradient(0deg, rgba(7, 17, 31, 1), transparent 48%);
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
  min-height: 520px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

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

.detail-tags span {
  background: rgba(0, 163, 175, 0.22);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 54px 0 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hls-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 163, 175, 0.14), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(0, 163, 175, 0.36);
  font-size: 34px;
}

.content-panel {
  margin-top: 24px;
  padding: 28px;
}

.content-panel p {
  color: #4b5563;
  font-size: 17px;
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.side-card h2 {
  margin-top: 0;
  font-size: 24px;
}

.side-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.side-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-item:hover {
  background: var(--brand-soft);
  transform: translateX(3px);
}

.side-item img {
  height: 92px;
  object-fit: cover;
  border-radius: 13px;
}

.side-item span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  padding: 38px 0;
  color: rgba(255, 255, 255, 0.78);
  background: #07111f;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-grid p {
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
}

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

[data-movie-card][hidden] {
  display: none;
}

@media (max-width: 1024px) {
  .hero-thumbs {
    display: none;
  }

  .hero-dots {
    bottom: 34px;
  }

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 66px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: 14px;
  }

  .hero-slider {
    min-height: 590px;
  }

  .hero-content {
    padding-top: 34px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .search-panel,
  .section-title-row,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-title-row {
    align-items: start;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }

  .compact-hero {
    padding: 54px 0 48px;
  }

  .detail-hero-grid {
    padding: 44px 0;
    gap: 26px;
  }

  .detail-layout {
    padding-top: 34px;
  }
}

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

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

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .featured-grid,
  .compact-grid,
  .category-movie-grid,
  .ranking-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    border-radius: 18px;
  }

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

  .content-panel,
  .side-card,
  .search-panel {
    padding: 20px;
  }
}
