:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --blue: #2563eb;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(20, 184, 166, 0.18);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--teal), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 14px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.28);
}

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

.nav-link,
.mobile-nav-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 290px;
  padding: 6px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: white;
}

.header-search input,
.mobile-search input,
.filter-bar input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #ccfbf1;
  color: #0f766e;
  font-weight: 800;
  cursor: pointer;
}

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

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: #f8fafc;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 0.7s ease;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.93), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.16)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 42%, rgba(20, 184, 166, 0.32), transparent 34%), linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.9));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
}

.hero-content > * {
  max-width: 720px;
}

.hero-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #5eead4;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 22px;
  color: white;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta,
.movie-card-meta,
.side-content div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.hero-meta span {
  color: white;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.ghost-light-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.primary-button:hover,
.ghost-button:hover,
.ghost-light-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.ghost-light-button {
  color: #0f766e;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: white;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 9px;
  padding: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
}

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

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

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

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, rgba(204, 251, 241, 0.62), rgba(219, 234, 254, 0.62));
}

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

.section-heading h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--teal-dark);
  font-weight: 900;
}

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

.movie-card,
.category-tile,
.side-card,
.detail-card,
.text-panel,
.detail-side {
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.movie-card-link {
  display: grid;
  height: 100%;
}

.poster-shell,
.side-poster,
.detail-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0f766e 48%, #2563eb);
}

.poster-shell {
  aspect-ratio: 16 / 10;
}

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

.poster-shell img.image-hidden,
.side-poster img.image-hidden,
.detail-poster img.image-hidden {
  opacity: 0;
}

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.76));
  transition: opacity 0.22s ease;
}

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

.play-dot {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--teal);
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.45);
}

.duration-badge,
.rank-badge,
.side-rank {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 900;
}

.duration-badge {
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-badge,
.side-rank {
  left: 12px;
  top: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2,
.side-content h2 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p,
.side-content p,
.category-tile strong,
.site-footer p,
.text-panel p,
.detail-line {
  color: var(--muted);
  line-height: 1.75;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 48px;
  font-size: 14px;
}

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

.movie-card-tags span,
.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-meta {
  justify-content: space-between;
  margin-top: 15px;
}

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

.category-tile {
  min-height: 166px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border-radius: 24px;
  color: white;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.88)), var(--tile-image);
  background-position: center;
  background-size: cover;
  transition: transform 0.22s ease;
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 950;
}

.category-tile strong {
  margin-top: 8px;
  color: #dbeafe;
  font-size: 14px;
}

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

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

.side-card {
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.side-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.14);
}

.side-card a {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: stretch;
}

.side-poster {
  min-height: 116px;
}

.side-content {
  padding: 16px 16px 16px 0;
}

.side-content h2 {
  font-size: 17px;
}

.side-content p {
  margin: 0 0 10px;
  font-size: 14px;
}

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

.page-hero {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  background-image: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.36), transparent 30%), linear-gradient(135deg, #0f172a, #134e4a 48%, #1e3a8a);
}

.category-hero {
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.5)), var(--category-image);
  background-position: center;
  background-size: cover;
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 700px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.filter-bar input {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-links a,
.search-page-bar a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 900;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 42px;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 12px;
  background: white;
  color: #334155;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.pagination strong {
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.empty-state {
  display: none;
  padding: 50px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
}

.empty-state.is-visible {
  display: block;
}

.player-section {
  padding: 36px 16px 0;
  background: radial-gradient(circle at 50% 0, rgba(20, 184, 166, 0.22), transparent 40%), #020617;
}

.video-shell {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.56));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 22px 58px rgba(20, 184, 166, 0.35);
  font-size: 34px;
}

.video-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

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

.detail-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  border-radius: 28px;
}

.detail-poster {
  min-height: 360px;
  border-radius: 22px;
}

.detail-info h1 {
  margin: 4px 0 14px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-line {
  margin: 0 0 20px;
  font-size: 17px;
}

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

.detail-meta-grid span {
  padding: 13px;
  border-radius: 14px;
  color: #64748b;
  background: #f8fafc;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.text-panel,
.detail-side {
  margin-top: 20px;
  padding: 24px;
  border-radius: 24px;
}

.text-panel h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.text-panel p {
  margin: 0;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 100px;
  height: fit-content;
  margin-top: 38px;
}

.detail-side .side-card a {
  grid-template-columns: 128px 1fr;
  gap: 12px;
}

.detail-side .side-poster {
  min-height: 86px;
}

.detail-side .side-content {
  padding: 10px 12px 10px 0;
}

.detail-side .side-content h2 {
  margin: 0 0 6px;
  font-size: 14px;
}

.detail-side .side-content p {
  display: none;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 17px;
}

.site-footer p {
  max-width: 390px;
  color: #cbd5e1;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

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

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

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

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

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

  .detail-side {
    position: static;
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

  .hero-controls {
    justify-content: center;
  }

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

  .movie-grid,
  .rank-preview,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    min-height: 420px;
  }

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

  .video-shell {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    gap: 16px;
  }

  .side-card a,
  .detail-side .side-card a {
    grid-template-columns: 112px 1fr;
  }

  .side-poster {
    min-height: 100px;
  }

  .detail-poster {
    min-height: 360px;
  }

  .play-layer span {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
