:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --teal: #0d9488;
  --cyan: #0891b2;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.28);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
}

.nav-search input,
.wide-search input,
.filter-input,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  padding: 10px 14px;
}

.nav-search input:focus,
.wide-search input:focus,
.filter-input:focus,
.search-page-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.nav-search button,
.wide-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.28), transparent 30%), linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 96px 0 92px;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #99f6e4;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy h2 + p,
.hero-copy p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.primary-button {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #ffffff;
  box-shadow: 0 16px 35px rgba(8, 145, 178, 0.28);
}

.ghost-button {
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 500px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

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

.hero-controls button {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  width: 32px;
  border-radius: 999px;
  background: #2dd4bf;
}

.hero-quick-links {
  position: absolute;
  right: max(16px, calc((100% - 1240px) / 2));
  bottom: 34px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 540px;
  justify-content: flex-end;
}

.hero-quick-links a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.home-search-band,
.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  margin-top: -42px;
  position: relative;
  z-index: 8;
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.search-band-inner h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 3vw, 34px);
}

.wide-search,
.search-page-form {
  display: flex;
  gap: 12px;
}

.wide-search input,
.search-page-form input,
.filter-input {
  padding: 14px 18px;
}

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

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1240px) / 2));
  padding-right: max(16px, calc((100% - 1240px) / 2));
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

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

.section-heading h2,
.page-hero h1,
.detail-article h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  padding: 11px 18px;
  color: var(--teal);
  background: #ccfbf1;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.quality-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

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

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

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

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

.category-card {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.category-card div {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent);
}

.category-card h3,
.category-card h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 54px 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.ranking-item img {
  width: 96px;
  height: 126px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #ffffff;
  font-weight: 900;
}

.ranking-item h3,
.top-rank-card h2,
.search-result-card h2 {
  margin: 0 0 8px;
}

.ranking-item p,
.search-result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  min-height: 320px;
  display: grid;
  align-items: center;
  background: radial-gradient(circle at 75% 20%, rgba(45, 212, 191, 0.2), transparent 28%), linear-gradient(135deg, #ecfeff, #f8fafc 58%, #eef2ff);
}

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

.top-rank-card {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.top-rank-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  opacity: 0.72;
}

.top-rank-card div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.rank-medal {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 900;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  border-color: var(--teal);
  color: #ffffff;
  background: var(--teal);
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 28px;
  text-align: center;
  border-radius: 20px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

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

.search-page-form {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.search-results {
  display: grid;
  gap: 16px;
}

.search-result-card a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.search-result-card img {
  width: 96px;
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
}

.search-result-card span {
  color: var(--muted);
  font-size: 13px;
}

.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--teal);
  font-weight: 800;
}

.watch-card,
.detail-article,
.side-info {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.watch-card {
  padding: 14px;
}

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

.watch-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.watch-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.28), rgba(2, 6, 23, 0.42));
  cursor: pointer;
}

.watch-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.watch-play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.36);
  font-size: 28px;
}

.watch-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  display: none;
  max-width: calc(100% - 32px);
  border-radius: 14px;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
}

.watch-message.is-visible {
  display: block;
}

.detail-article {
  margin-top: 24px;
  padding: 30px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

.score-pill {
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-size: 22px;
}

.detail-tags {
  margin: 18px 0;
}

.one-line {
  padding: 18px;
  border-radius: 20px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 700;
}

.detail-article h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-article p {
  color: #334155;
  line-height: 1.9;
}

.side-poster {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-info {
  margin-top: 20px;
  padding: 24px;
}

.side-info h2 {
  margin: 0 0 16px;
}

.side-info dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.side-info dt {
  color: var(--muted);
}

.side-info dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.block-button {
  width: 100%;
  margin-top: 22px;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand p {
  max-width: 560px;
  line-height: 1.8;
  color: #94a3b8;
}

.brand-footer .brand-text {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

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

.footer-links h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links a:hover {
  color: #2dd4bf;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    align-items: start;
  }

  .side-info {
    margin-top: 0;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 84px;
  }

  .hero-poster {
    display: none;
  }

  .hero-quick-links {
    display: none;
  }

  .search-band-inner,
  .footer-shell,
  .category-grid,
  .overview-grid,
  .top-rank-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .wide-search,
  .search-page-form {
    flex-direction: column;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .editor-grid,
  .small-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

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

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

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

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .movie-grid,
  .editor-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item a {
    grid-template-columns: 44px 76px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-item img,
  .search-result-card img {
    width: 76px;
    height: 104px;
  }

  .search-result-card a {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .detail-side {
    display: block;
  }

  .side-info {
    margin-top: 18px;
  }

  .detail-article,
  .side-info {
    padding: 20px;
  }
}
