:root {
  --primary: #00A3AF;
  --primary-dark: #008C97;
  --primary-soft: #E6F7F8;
  --primary-light: #33B8C2;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f7fafc;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eefbfc 0%, #f7fafc 320px, #ffffff 100%);
}

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

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

.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.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 163, 175, 0.14);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 10px 20px rgba(0, 163, 175, 0.25);
}

.logo-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link,
.mobile-nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #475569;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.quick-search,
.mobile-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0, 163, 175, 0.22);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.quick-search input,
.mobile-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  background: transparent;
}

.quick-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.pager a,
.play-large {
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.quick-search button,
.mobile-search button,
.primary-btn,
.play-large {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.quick-search button,
.mobile-search button {
  padding: 11px 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 22px;
}

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

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.hero {
  position: relative;
  margin: 28px auto 44px;
  border-radius: 30px;
  overflow: hidden;
  min-height: 520px;
  background: #071619;
  box-shadow: 0 32px 72px rgba(0, 89, 96, 0.24);
}

.hero-track {
  position: relative;
  height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 20, 24, 0.93), rgba(0, 78, 86, 0.72) 44%, rgba(0, 163, 175, 0.12) 100%);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.24), transparent 32%);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 78px 56px;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d9feff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 750;
}

.hero-content h1,
.hero-content h2 {
  margin: 22px 0 18px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.play-large:hover {
  transform: translateY(-2px);
}

.primary-btn {
  box-shadow: 0 16px 32px rgba(0, 163, 175, 0.28);
}

.secondary-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 56px;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.quick-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 52px;
}

.quick-cat {
  position: relative;
  overflow: hidden;
  padding: 24px;
  min-height: 148px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  box-shadow: 0 16px 38px rgba(0, 163, 175, 0.22);
}

.quick-cat::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.quick-cat span {
  display: block;
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 8px;
}

.quick-cat strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 24px;
}

.section-block {
  margin: 52px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--primary-dark);
  font-weight: 800;
}

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

.movie-card {
  background: var(--card);
  border: 1px solid rgba(0, 163, 175, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dff8fa, #ffffff);
  overflow: hidden;
}

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

.poster img.image-empty {
  opacity: 0;
}

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

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

.play-chip,
.score-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.play-chip {
  left: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 10px 20px rgba(0, 163, 175, 0.35);
}

.score-chip {
  right: 12px;
  top: 12px;
  min-width: 44px;
  height: 28px;
  background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

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

.tag-row a,
.info-tag,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 750;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 14px;
  padding: 18px;
  margin: 26px 0 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}

.page-title {
  padding: 44px 0 12px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 36px 0 20px;
}

.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 163, 175, 0.16);
  color: var(--primary-dark);
  font-weight: 800;
}

.pager .current,
.pager a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 0.9fr);
  gap: 30px;
  padding: 32px 0 50px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.28);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.44));
  transition: opacity 0.25s ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
}

.play-large {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  font-size: 34px;
  padding-left: 6px;
  box-shadow: 0 18px 40px rgba(0, 163, 175, 0.42);
  pointer-events: auto;
}

.player-error {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: none;
  padding: 13px 16px;
  border-radius: 14px;
  color: #fff;
  background: rgba(220, 38, 38, 0.86);
}

.player-error.show {
  display: block;
}

.detail-info,
.detail-panel,
.review-panel,
.related-panel {
  background: #fff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.detail-info {
  margin-top: 24px;
}

.detail-info h1 {
  margin-bottom: 14px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f766e;
  background: var(--primary-soft);
  font-weight: 800;
}

.detail-info p,
.review-panel p,
.related-panel p,
.detail-panel dd,
.detail-panel dt {
  line-height: 1.85;
}

.detail-panel dl {
  margin: 0;
}

.detail-panel div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-panel div:last-child {
  border-bottom: 0;
}

.detail-panel dt {
  color: var(--muted);
}

.detail-panel dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.review-panel,
.related-panel,
.detail-panel {
  margin-top: 22px;
}

.sidebar-list {
  display: grid;
  gap: 14px;
}

.side-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 13px;
  align-items: center;
}

.side-card img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--primary-soft);
}

.side-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.side-card span {
  color: var(--muted);
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 120px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-num {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.rank-row img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--primary-soft);
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-stat {
  text-align: right;
  color: var(--primary-dark);
  font-weight: 900;
}

.no-results {
  display: none;
  padding: 40px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
}

.no-results.show {
  display: block;
}

.site-footer {
  margin-top: 70px;
  padding: 46px 0 0;
  color: #c8f8fb;
  background: linear-gradient(135deg, #06353b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  margin: 14px 0 0;
  max-width: 640px;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

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

.footer-bottom {
  margin-top: 36px;
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

  .quick-cats {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .hero,
  .hero-track {
    min-height: 460px;
    height: 460px;
  }

  .hero-content {
    padding: 54px 28px;
  }

  .hero-dots {
    left: 28px;
    bottom: 28px;
  }

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

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

  .rank-row {
    grid-template-columns: 46px 92px 1fr;
  }

  .rank-stat {
    grid-column: 2 / 4;
    text-align: left;
  }
}

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

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

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

  .hero,
  .hero-track {
    min-height: 430px;
    height: 430px;
    border-radius: 22px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .quick-cats,
  .movie-grid,
  .filter-bar,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-info,
  .detail-panel,
  .review-panel,
  .related-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .side-card {
    grid-template-columns: 74px 1fr;
  }

  .side-card img {
    width: 74px;
    height: 96px;
  }

  .rank-row {
    grid-template-columns: 42px 80px 1fr;
    gap: 10px;
  }

  .rank-row img {
    width: 80px;
    height: 108px;
  }

  .rank-row h3 {
    font-size: 17px;
  }
}
