:root {
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --dark: #0f172a;
  --muted: #64748b;
  --paper: #ffffff;
  --soft: #ecfeff;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 42%, #f0fdfa 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

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: 80;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.nav-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.main-nav a,
.nav-dropdown > a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown:hover > a {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-panel {
  position: absolute;
  top: 56px;
  left: -16px;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  color: #0f172a;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: #ccfbf1;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search {
  display: flex;
  align-items: center;
  width: 235px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.header-search button,
.menu-button {
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.menu-button {
  display: none;
}

.mobile-menu {
  display: none;
  padding: 0 16px 18px;
}

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

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  height: 440px;
  overflow: hidden;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.56) 46%, rgba(15, 23, 42, 0.16) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
}

.hero p {
  max-width: 670px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.8;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.32);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn.small {
  min-height: 38px;
  color: #0f766e;
  background: #ccfbf1;
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.34);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  bottom: 24px;
  left: 50%;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  background: #ffffff;
  transform: scale(1.35);
}

.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 4px;
  background: rgba(0, 0, 0, 0.24);
}

.hero-progress span {
  display: block;
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width 0.4s ease;
}

.section,
.page-main {
  padding-top: 38px;
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: #0891b2;
  font-weight: 800;
}

.tabbar,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.tabbar button {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  cursor: pointer;
  font-weight: 800;
}

.tabbar button.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.22s ease;
}

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

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.card-year,
.rank-number {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.rank-number {
  left: 10px;
  right: auto;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.line-clamp {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.meta-row em {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.list-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}

.poster-wide {
  height: 100%;
  aspect-ratio: auto;
}

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

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

.category-tile {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(even) {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
}

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

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.ranking-section {
  padding-bottom: 54px;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.page-hero {
  margin-top: 32px;
  padding: 42px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero.soft {
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.page-hero.vivid {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--teal));
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 50px);
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.page-hero.vivid p {
  color: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #0891b2;
  font-weight: 700;
}

.filter-bar input,
.search-hero-form input {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.search-hero-form {
  max-width: 700px;
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

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

.detail-hero {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 30px;
  padding: 28px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #155e75 55%, #0e7490);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.detail-info p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.player-section {
  margin-top: 28px;
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.42));
  transition: opacity 0.2s ease;
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 44px rgba(20, 184, 166, 0.35);
  font-size: 34px;
  text-indent: 4px;
}

.player.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-panel {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-panel p {
  margin: 0;
  color: #334155;
  line-height: 2;
}

.related-section {
  padding-top: 28px;
}

.site-footer {
  margin-top: 56px;
  color: #e2e8f0;
  background: linear-gradient(180deg, #1f2937, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-grid h2,
.footer-grid h3 {
  color: #ffffff;
  margin: 0 0 14px;
}

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

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

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 820px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-wrap {
    gap: 12px;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    padding: 0 44px;
  }

  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

  .section-heading,
  .filter-bar,
  .search-hero-form {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .detail-cover {
    max-width: 360px;
  }
}

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

  .logo span:last-child {
    font-size: 18px;
  }

  .hero {
    height: 560px;
  }

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

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

  .hero-dots {
    bottom: 16px;
  }

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

  .list-card {
    grid-template-columns: 130px 1fr;
  }

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

  .player {
    border-radius: 20px;
  }

  .play-cover span {
    width: 68px;
    height: 68px;
    font-size: 27px;
  }
}
