:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --blue: #2563eb;
  --slate: #0f172a;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --text: #1f2937;
  --muted: #64748b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.28);
}

.brand-text {
  font-size: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav-link {
  color: #334155;
  text-decoration: none;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  min-width: 190px;
  padding: 10px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  color: #475569;
  text-decoration: none;
  border-radius: 12px;
}

.dropdown-panel a:hover {
  color: var(--teal-dark);
  background: #f0fdfa;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #cbd5e1;
  outline: none;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  transition: 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 15px;
}

.header-search input:focus,
.mobile-panel input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
}

.header-search button,
.mobile-panel button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 22px;
  display: grid;
  gap: 12px;
  background: #ffffff;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-panel a {
  color: #334155;
  text-decoration: none;
  font-weight: 700;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  padding: 10px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(20, 184, 166, 0.18)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-overlay,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.32), transparent 32%), linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.8));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 680px;
  margin: 0 auto;
  padding: 90px 24px 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 56px;
  align-items: center;
}

.hero-kicker,
.eyebrow,
.sub-hero span {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(15, 118, 110, 0.38);
  border: 1px solid rgba(153, 246, 228, 0.32);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-text h1,
.detail-copy h1,
.sub-hero h1 {
  margin: 22px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-text p,
.detail-copy .lead,
.sub-hero p {
  max-width: 680px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  aspect-ratio: 2 / 3;
}

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

.hero-poster span,
.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(13, 148, 136, 0.88);
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.35);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-dot.active {
  width: 34px;
  background: #5eead4;
}

.search-band,
.page-section,
.sub-hero > div,
.detail-inner,
.footer-grid,
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-band {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-band h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
}

.search-band p {
  margin: 0;
  color: var(--muted);
}

.wide-search {
  display: flex;
  gap: 10px;
}

.wide-search input {
  flex: 1;
  padding: 14px 18px;
}

.wide-search button {
  padding: 0 22px;
}

.quick-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  color: #0f766e;
  background: #ccfbf1;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.page-section {
  padding-top: 72px;
  padding-bottom: 32px;
}

.compact-section {
  padding-top: 44px;
}

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

.section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.section-more {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.66);
  font-weight: 800;
  font-size: 12px;
  backdrop-filter: blur(6px);
}

.poster-play {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.movie-info {
  padding: 16px;
}

.movie-title {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.movie-title.compact {
  font-size: 17px;
}

.movie-title a {
  color: inherit;
  text-decoration: none;
}

.movie-meta {
  margin: 8px 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.movie-desc {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 12px;
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.ranking-card {
  border-radius: 26px;
  padding: 24px;
  background: linear-gradient(145deg, #0f172a, #134e4a);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-card.large {
  position: sticky;
  top: 92px;
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ranking-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.ranking-head a {
  color: #99f6e4;
  text-decoration: none;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 11px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.rank-item a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.rank-num {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  font-weight: 900;
}

.rank-name {
  font-weight: 850;
}

.rank-meta {
  grid-column: 2;
  color: #cbd5e1;
  font-size: 12px;
}

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

.category-tile {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
  transition: transform 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile em {
  color: #dbeafe;
  font-style: normal;
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.32), transparent 30%), linear-gradient(135deg, #0f172a, #0f766e 55%, #1d4ed8);
}

.sub-hero > div {
  position: relative;
  z-index: 1;
  padding-top: 88px;
  padding-bottom: 88px;
}

.sub-hero h1 {
  max-width: 900px;
  font-size: clamp(38px, 5vw, 64px);
}

.filter-bar {
  display: flex;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 18px;
}

.filter-bar input {
  flex: 1;
}

.empty-state {
  text-align: center;
  padding: 42px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.pagination a,
.pagination span {
  min-width: 92px;
  text-align: center;
  padding: 10px 16px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  text-decoration: none;
  font-weight: 800;
}

.pagination span {
  color: #94a3b8;
  background: #e2e8f0;
}

.detail-hero {
  min-height: 620px;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-tags {
  margin: 24px 0;
}

.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.55));
}

.play-trigger span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 20px 45px rgba(13, 148, 136, 0.36);
}

.player-shell.playing .play-trigger {
  display: none;
}

.detail-content {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.detail-content p {
  margin: 0 0 24px;
  color: #475569;
  line-height: 1.9;
}

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

.detail-meta-grid div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.detail-meta-grid dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-meta-grid dd {
  margin: 6px 0 0;
  color: #0f172a;
  font-weight: 850;
}

.site-footer {
  margin-top: 64px;
  color: #e2e8f0;
  background: linear-gradient(135deg, #1e293b, #0f172a 52%, #134e4a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
  padding-top: 52px;
  padding-bottom: 36px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid p {
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  margin: 9px 0;
}

.footer-grid a:hover {
  color: #5eead4;
}

.footer-bottom {
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

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

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

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

  .ranking-card.large {
    position: static;
  }
}

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 70px;
  }

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

  .search-band,
  .wide-search,
  .filter-bar,
  .detail-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-band {
    margin-left: 16px;
    margin-right: 16px;
  }

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

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

@media (max-width: 540px) {
  .header-inner,
  .search-band,
  .page-section,
  .sub-hero > div,
  .detail-inner,
  .footer-grid,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 610px;
  }

  .hero-text h1,
  .detail-copy h1,
  .sub-hero h1 {
    font-size: 38px;
  }

  .hero-text p,
  .detail-copy .lead,
  .sub-hero p {
    font-size: 16px;
  }

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

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

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