:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --blue: #2563eb;
  --orange: #ea580c;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #eef7f6 48%, #f8fafc 100%);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  white-space: nowrap;
}

.nav-links a,
.mobile-links a {
  font-weight: 700;
  opacity: 0.92;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.mobile-links a:hover {
  color: #ccfbf1;
  opacity: 1;
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.nav-search input,
.mobile-search input {
  width: 180px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--teal-dark);
  background: #fff;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
}

.mobile-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-links {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(115deg, var(--teal), var(--cyan), var(--blue));
}

.hero-slide {
  display: none;
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  align-items: center;
  gap: 48px;
  padding: 82px 0 118px;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  animation: fadeUp 0.55s ease both;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -80px -10vw;
  z-index: 0;
  background-image: linear-gradient(90deg, rgba(15, 118, 110, 0.92), rgba(37, 99, 235, 0.66), rgba(15, 23, 42, 0.70)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto -10vw 0;
  height: 180px;
  z-index: 0;
  background: linear-gradient(0deg, #f9fafb, rgba(249, 250, 251, 0));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(18px, 2vw, 24px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
}

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

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

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

.btn-primary {
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

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

.btn-soft {
  color: var(--teal-dark);
  background: #ccfbf1;
}

.hero-poster {
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.65);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.7;
}

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

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

.soft-section {
  margin-bottom: 30px;
  padding: 42px;
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.60);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-link img.image-missing,
.hero-poster img.image-missing,
.category-card img.image-missing,
.rank-thumb img.image-missing,
.player-cover img.image-missing {
  opacity: 0;
}

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.74));
}

.card-type,
.card-year,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.card-type {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
}

.card-year {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
}

.rank-number {
  left: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--blue));
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 56px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--teal-dark);
}

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

.card-meta {
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span {
  display: inline-flex;
  max-width: 100%;
}

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

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 16px 34px rgba(13, 148, 136, 0.20);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-tile small {
  color: rgba(255, 255, 255, 0.86);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(13, 148, 136, 0.10);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-thumb img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--blue));
  font-weight: 900;
}

.rank-info a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.rank-info span {
  color: #64748b;
  font-size: 13px;
}

.page-hero {
  color: #fff;
  background: linear-gradient(115deg, var(--teal-dark), var(--cyan), var(--blue));
}

.slim-hero {
  padding: 72px max(16px, calc((100vw - 1180px) / 2)) 78px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 30px;
  color: #fff;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.category-card img {
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.35s ease;
}

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

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.88));
}

.category-card div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.toolbar label {
  display: grid;
  gap: 8px;
  width: min(520px, 100%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.toolbar input,
.big-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 13px 18px;
  color: var(--ink);
  background: #fff;
}

.toolbar input:focus,
.big-search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

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

.search-panel {
  min-height: 480px;
}

.big-search {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}

.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 0;
}

.detail-bg {
  position: absolute;
  inset: 0;
  min-height: 520px;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.76), rgba(248, 250, 252, 0.98)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-column {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: #fff;
  background: #000;
}

.player-cover[hidden] {
  display: none;
}

.player-cover img {
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.play-circle {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.36);
  transform: translate(-50%, -50%);
  font-size: 36px;
}

.detail-card,
.detail-side {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-card {
  margin-top: 24px;
  padding: 30px;
  border-radius: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-card .detail-meta span {
  color: var(--teal-dark);
  background: #ccfbf1;
}

.lead-text {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 100px;
  padding: 22px;
  border-radius: 26px;
}

.detail-side h2 {
  margin: 0 0 18px;
}

.side-rank-list .rank-item {
  grid-template-columns: 56px minmax(0, 1fr);
}

.side-rank-list .rank-index {
  display: none;
}

.side-rank-list .rank-thumb img {
  min-height: 76px;
}

.site-footer {
  margin-top: 30px;
  color: #fff;
  background: linear-gradient(100deg, #111827, #1f2937, #111827);
}

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

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

.footer-grid p,
.footer-grid a,
.footer-grid li {
  color: #d1d5db;
  font-size: 14px;
}

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

.footer-grid li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 14px;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .hero-slide.is-active,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    position: static;
  }

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

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

  .hero-carousel,
  .hero-slide {
    min-height: 760px;
  }

  .hero-slide {
    padding: 58px 0 120px;
  }

  .hero-slide.is-active {
    gap: 26px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-card-grid,
  .full-rank-list,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title,
  .toolbar,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .soft-section {
    padding: 28px 18px;
  }
}

@media (max-width: 560px) {
  .nav-wrap {
    min-height: 66px;
  }

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

  .hero-carousel,
  .hero-slide {
    min-height: 720px;
  }

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

  .hero-actions,
  .detail-actions,
  .big-search {
    flex-direction: column;
  }

  .hero-controls {
    width: calc(100% - 32px);
    justify-content: center;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-card-grid,
  .full-rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 62px 38px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-info p {
    display: none;
  }

  .detail-card {
    padding: 22px;
  }
}
