:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #1f2937;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  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;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
}

.nav-shell {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1);
}

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

.nav-link,
.dropdown-toggle {
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  padding: 10px;
  display: none;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  display: grid;
  gap: 4px;
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #e2e8f0;
}

.dropdown-panel a:hover {
  background: rgba(20, 184, 166, 0.2);
  color: #fff;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  background: rgba(13, 148, 136, 0.96);
  backdrop-filter: blur(14px);
}

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.mobile-nav a,
.mobile-nav .nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.56) 45%, rgba(15, 118, 110, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2 + 20px));
  right: 20px;
  bottom: 76px;
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #67e8f9;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
}

.hero-summary {
  max-width: 680px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags {
  margin: 20px 0 0;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.text-btn,
.home-search button,
.filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button,
.filter-reset {
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.home-search button:hover,
.filter-reset:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.45);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.72);
}

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px;
}

.page-main {
  min-height: 70vh;
}

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

.section-title.compact {
  display: block;
  margin-bottom: 18px;
}

.section-title h2,
.page-hero h1 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-link,
.text-btn {
  color: #0f766e;
  font-weight: 800;
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.quick-search,
.soft-panel {
  border-radius: 28px;
  background: linear-gradient(90deg, #f0fdfa, #ecfeff);
  box-shadow: var(--shadow-soft);
}

.home-search {
  display: flex;
  gap: 12px;
}

.home-search input {
  flex: 1;
  height: 54px;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  padding: 0 20px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.05);
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

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

.category-tile {
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.08));
}

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile span {
  bottom: 70px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 20px;
  display: -webkit-box;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

.movie-card-large .poster-wrap {
  aspect-ratio: 4 / 5;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), transparent);
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.duration-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 8px 18px rgba(244, 63, 94, 0.36);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 10px 0 8px;
  color: #111827;
  font-size: 19px;
  line-height: 1.35;
}

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

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

.small-tags span {
  padding: 5px 9px;
  font-size: 12px;
}

.page-hero {
  max-width: 1180px;
  margin: 38px auto 0;
  padding: 56px 28px;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(120deg, #0f766e, #0891b2 48%, #2563eb);
  box-shadow: var(--shadow);
}

.page-hero .eyebrow {
  color: #a7f3d0;
}

.page-hero h1 {
  color: #fff;
}

.page-hero p:last-child {
  max-width: 820px;
  margin: 16px 0 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.slim-hero {
  padding: 46px 28px;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 18px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.category-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

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

.category-overview-card h2 {
  margin: 0;
  font-size: 28px;
}

.category-overview-card p {
  color: #64748b;
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.category-samples a {
  border-radius: 999px;
  padding: 7px 10px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid #ccfbf1;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(140px, 0.7fr)) auto;
  gap: 14px;
  align-items: end;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: #fff;
  color: #1f2937;
  outline: none;
}

.no-results {
  padding: 34px;
  border-radius: 20px;
  background: #fff;
  color: #64748b;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.breadcrumb {
  max-width: 1180px;
  margin: 28px auto 18px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0f766e;
  font-weight: 800;
}

.detail-main .section-wrap {
  padding-top: 28px;
}

.detail-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.player-panel,
.detail-info,
.content-card {
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-panel {
  overflow: hidden;
  align-self: start;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.24), rgba(2, 6, 23, 0.82));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 20px 40px rgba(8, 145, 178, 0.35);
  font-size: 34px;
}

.detail-info {
  overflow: hidden;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

.detail-copy {
  padding: 22px;
}

.detail-copy h1 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 34px;
  line-height: 1.18;
}

.detail-one-line {
  color: #475569;
  font-size: 16px;
  line-height: 1.8;
}

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

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

.detail-meta dt {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 6px 0 0;
  color: #1f2937;
  font-weight: 800;
}

.detail-tags span {
  background: linear-gradient(90deg, #f0fdfa, #ecfeff);
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: #1e293b;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

.warm-card {
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

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

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 20px;
}

.footer-grid p {
  margin: 0;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
}

.footer-grid li {
  margin-bottom: 9px;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
}

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

  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .hero {
    height: 540px;
  }

  .hero-content {
    left: 20px;
    bottom: 68px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .section-wrap {
    padding: 42px 16px;
  }

  .quick-search {
    margin-top: 0;
    border-radius: 0;
  }

  .home-search {
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .large-grid,
  .rank-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .category-tile {
    min-height: 190px;
  }

  .section-title {
    display: block;
  }

  .page-hero {
    margin: 20px 16px 0;
    padding: 38px 20px;
    border-radius: 24px;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .detail-layout,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .category-grid,
  .movie-grid,
  .large-grid,
  .rank-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
