:root {
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 52%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.96), rgba(6, 182, 212, 0.96), rgba(37, 99, 235, 0.96));
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
  font-size: 15px;
}

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

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

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px;
  gap: 6px;
}

.nav-search input {
  width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 8px 10px;
}

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

.nav-search button,
.hero-actions a,
.primary-button,
.filter-panel button,
.play-overlay {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
}

.nav-search button {
  color: #0f766e;
  background: #fff;
  padding: 8px 14px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(110deg, #14b8a6 0%, #06b6d4 45%, #2563eb 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.42;
}

.hero::before {
  width: 360px;
  height: 360px;
  background: rgba(255, 255, 255, 0.25);
  top: -110px;
  right: 8%;
}

.hero::after {
  width: 420px;
  height: 420px;
  background: rgba(15, 23, 42, 0.18);
  bottom: -170px;
  left: 5%;
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  align-items: center;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 52px;
  min-height: 620px;
  padding: 70px 0 84px;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 26px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-actions a,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-actions a:first-child,
.primary-button {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.hero-actions a:not(:first-child) {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions a:hover,
.primary-button:hover,
.play-overlay:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(2px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.34);
  background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(15,23,42,0.16));
}

.hero-card-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-card-caption strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.hero-card-caption span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

.section,
.page-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 58px 0;
}

.page-main {
  padding: 42px 0 72px;
}

.section-head,
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-title,
.page-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-subtitle,
.page-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 760px;
}

.section-link {
  color: #0f766e;
  font-weight: 900;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(226, 232, 240, 0.86);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-title:hover {
  color: #0f766e;
}

.card-body p {
  margin: 10px 0 14px;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.card-meta a {
  color: #0f766e;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
}

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

.category-tile {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.16);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #06b6d4, #4f46e5);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  font-size: 14px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.rank-panel,
.filter-panel,
.detail-card,
.player-section,
.library-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.rank-panel {
  padding: 22px;
}

.rank-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 62px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #ecfeff;
  transform: translateX(4px);
}

.rank-num {
  color: #0f766e;
  font-size: 22px;
  font-weight: 950;
}

.rank-item img {
  width: 62px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.rank-text strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.rank-text em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filter-panel {
  padding: 18px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 180px 120px;
  gap: 12px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
  background: #fff;
}

.filter-panel button {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  color: #fff;
  padding: 0 18px;
}

.breadcrumb {
  margin-bottom: 22px;
  color: #64748b;
  font-weight: 700;
  font-size: 14px;
}

.breadcrumb a {
  color: #0f766e;
}

.detail-hero {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 34px;
}

.detail-card {
  overflow: hidden;
}

.detail-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.detail-info .lead {
  margin: 0 0 20px;
  color: #475569;
  font-size: 20px;
  line-height: 1.8;
}

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

.info-box {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.info-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.info-box strong {
  display: block;
  font-size: 15px;
}

.player-section {
  padding: 22px;
  margin: 34px 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.24);
}

.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
  z-index: 5;
}

.play-overlay.is-hidden {
  display: none;
}

.content-block {
  margin: 30px 0;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.content-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-block p {
  margin: 0;
  color: #475569;
  line-height: 1.95;
  font-size: 16px;
}

.library-panel {
  padding: 26px;
  margin-bottom: 24px;
}

.library-panel h2 {
  margin: 0 0 18px;
}

.library-links {
  columns: 4 220px;
  column-gap: 28px;
}

.library-links a {
  display: block;
  break-inside: avoid;
  padding: 8px 0;
  color: #334155;
  border-bottom: 1px solid #eef2f7;
}

.library-links a:hover {
  color: #0f766e;
}

.search-empty {
  padding: 40px;
  border-radius: 28px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  padding: 48px 0 22px;
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
}

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

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

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

.footer-links a {
  color: #cbd5e1;
}

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

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

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 980px) {
  .nav-wrap {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0 8px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

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

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

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

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

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

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

@media (max-width: 640px) {
  .hero,
  .hero-stage,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 46px 0 78px;
  }

  .movie-grid,
  .category-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-head {
    display: block;
  }

  .brand {
    font-size: 20px;
  }

  .card-title {
    min-height: auto;
  }

  .card-body p {
    min-height: auto;
  }
}
