:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef7f7 45%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--teal-dark), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.28);
}

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

.desktop-nav a,
.mobile-panel a,
.site-footer a {
  font-weight: 600;
  color: #334155;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: var(--teal-dark);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.wide-search input,
.search-page-form input {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 11px 15px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.wide-search input:focus,
.search-page-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.header-search button,
.wide-search button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 22px;
}

.mobile-panel {
  padding: 0 20px 18px;
  border-top: 1px solid #e2e8f0;
}

.mobile-panel nav {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.cover-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0891b2, #0f172a);
}

.cover-frame::before {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.cover-missing::before {
  display: flex;
}

.missing-image {
  opacity: 0;
}

.hero-cover,
.hero-cover img {
  width: 100%;
  height: 100%;
}

.hero-cover img {
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(20, 184, 166, 0.22), transparent 35%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.20) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.08) 58%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 40px));
  color: #ffffff;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(20, 184, 166, 0.95);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 12px 20px rgba(20, 184, 166, 0.24);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 28px;
  color: #e2e8f0;
}

.hero-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
}

.hero-actions,
.section-heading,
.quick-search-panel,
.footer-inner,
.detail-hero,
.detail-content {
  display: flex;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 30px rgba(8, 145, 178, 0.22);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(15, 23, 42, 0.32);
}

.ghost-btn.dark {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.45);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.is-active {
  width: 28px;
  background: #ffffff;
}

.quick-search-panel,
.content-section,
.page-hero,
.sitemap-section,
.detail-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.quick-search-panel {
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: -42px;
  position: relative;
  z-index: 5;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-search-panel p,
.section-heading p,
.page-hero p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.wide-search {
  display: flex;
  gap: 10px;
  min-width: min(460px, 100%);
}

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

.content-section {
  padding: 54px 0 0;
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-more {
  color: var(--teal-dark);
  font-weight: 800;
}

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

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

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

.movie-card,
.category-tile,
.category-overview-card,
.feature-panel,
.detail-content article,
.detail-content aside,
.player-card {
  border: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
}

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

.movie-card:hover {
  box-shadow: var(--shadow);
}

.movie-card .cover-frame {
  aspect-ratio: 16 / 10;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

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

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

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
  min-height: 52px;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: #64748b;
}

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

.category-tile,
.category-overview-card {
  border-radius: 24px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 14px 0 8px;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-thumbs,
.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.category-thumbs span,
.overview-covers img {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

.category-thumbs img,
.overview-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
}

.full-row {
  grid-column: 1 / -1;
}

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

.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.rank-no {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.compact-title {
  display: grid;
  gap: 5px;
}

.compact-title span {
  color: var(--muted);
  font-size: 13px;
}

.feature-panel {
  border-radius: 26px;
  padding: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.22), transparent 35%),
    #ffffff;
}

.feature-panel h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

.feature-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.page-main {
  padding-top: 34px;
}

.page-hero {
  border-radius: 32px;
  padding: 48px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 15%, rgba(103, 232, 249, 0.28), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #115e59 55%, #0891b2 100%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 820px;
  color: #dbeafe;
  font-size: 18px;
}

.category-overview-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-covers {
  grid-template-columns: repeat(3, 1fr);
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--teal-dark);
}

.detail-hero {
  gap: 30px;
  align-items: stretch;
  padding: 32px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.25), transparent 34%),
    linear-gradient(135deg, #020617 0%, #0f172a 50%, #115e59 100%);
  box-shadow: var(--shadow);
}

.detail-poster {
  width: min(360px, 38%);
  flex: 0 0 auto;
}

.poster-cover {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

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

.detail-info {
  flex: 1;
  align-self: center;
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

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

.detail-meta div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-meta dt {
  color: #bae6fd;
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-meta dd {
  margin: 0;
  font-weight: 800;
}

.jump-player {
  margin-top: 22px;
}

.player-section,
.detail-content,
.related-section {
  margin-top: 42px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 45%, rgba(20, 184, 166, 0.20), transparent 25%),
    rgba(2, 6, 23, 0.35);
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 32px;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 24px 45px rgba(8, 145, 178, 0.36);
}

.player-card.is-playing .play-overlay {
  display: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
  text-align: center;
  pointer-events: none;
}

.detail-content {
  gap: 24px;
  align-items: flex-start;
}

.detail-content article {
  flex: 1;
  border-radius: 28px;
  padding: 30px;
}

.detail-content aside {
  width: 320px;
  border-radius: 28px;
  padding: 26px;
}

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

.detail-content p,
.detail-content li {
  color: #334155;
  line-height: 1.85;
}

.detail-content ul {
  padding-left: 18px;
}

.sitemap-section {
  margin-top: 34px;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--soft-shadow);
}

.sitemap-section ul {
  columns: 3;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  justify-content: space-between;
  gap: 30px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

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

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

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

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

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

  .hero-carousel {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .quick-search-panel,
  .section-heading,
  .footer-inner,
  .detail-hero,
  .detail-content,
  .two-column-section {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .wide-search {
    min-width: 0;
    flex-direction: column;
  }

  .movie-grid,
  .category-page-grid,
  .category-grid,
  .category-overview-grid,
  .wide-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster,
  .detail-content aside {
    width: 100%;
  }

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

  .sitemap-section ul {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 68px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-content {
    bottom: 12%;
  }

  .page-hero,
  .detail-hero,
  .quick-search-panel {
    border-radius: 24px;
    padding: 26px;
  }

  .movie-grid,
  .category-page-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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