:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #f1f5f9 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(219, 234, 254, 0.85);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a,
.mobile-panel a {
  color: #334155;
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #0f766e;
  background: #f0fdfa;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.search-box {
  position: relative;
  width: min(330px, 34vw);
}

.search-input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 12px 44px 12px 18px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.search-button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.search-results-popover {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  max-height: 430px;
  overflow: auto;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 10px;
}

.search-results-popover.is-open {
  display: block;
}

.search-result-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 9px;
  border-radius: 16px;
  color: #0f172a;
}

.search-result-item:hover {
  background: #f0fdfa;
}

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

.search-result-title {
  font-weight: 800;
  line-height: 1.35;
}

.search-result-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 15px;
  background: #ffffff;
  cursor: pointer;
}

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

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

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

.main {
  min-height: 68vh;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 0 0 44px 44px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.9s ease, transform 1.2s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.68) 40%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  align-items: center;
  padding: 70px 0 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ccfbf1;
  font-weight: 800;
  border: 1px solid rgba(204, 251, 241, 0.35);
  background: rgba(13, 148, 136, 0.28);
  border-radius: 999px;
  padding: 8px 13px;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-summary {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  color: #e2e8f0;
  margin: 0 0 24px;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.hero-meta {
  color: #dbeafe;
  margin-bottom: 28px;
}

.badge,
.tag,
.detail-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.badge {
  padding: 6px 11px;
  color: #0f766e;
  background: #ccfbf1;
}

.tag,
.detail-tag {
  padding: 7px 12px;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.26);
}

.btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.btn-light {
  color: #0f766e;
  background: #ffffff;
  border-color: #ccfbf1;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

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

.hero-dot {
  width: 44px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.quick-panel {
  position: relative;
  z-index: 3;
  margin-top: -62px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
  align-items: stretch;
}

.quick-search,
.quick-cats {
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search h2,
.quick-cats h2,
.section-title h2,
.page-hero h1,
.content-card h2,
.player-card h2 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.quick-search h2,
.quick-cats h2,
.section-title h2,
.content-card h2,
.player-card h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.quick-search p,
.quick-cats p,
.section-title p,
.page-hero p,
.content-card p,
.detail-lead {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 18px;
}

.quick-search .search-input {
  border-radius: 18px;
  padding: 14px 18px;
}

.quick-search .btn {
  border-radius: 18px;
}

.category-chips,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 13px;
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  font-weight: 800;
}

.section {
  padding: 58px 0;
}

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

.section-title p {
  max-width: 620px;
  margin: 8px 0 0;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(219, 234, 254, 0.9);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #99f6e4;
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

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

.movie-type {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.movie-info {
  padding: 15px;
}

.movie-title {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.movie-title a:hover {
  color: var(--teal);
}

.card-meta,
.rank-meta {
  font-size: 13px;
  margin-bottom: 10px;
}

.movie-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  display: block;
  min-height: 200px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid #dbeafe;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.95), rgba(239, 246, 255, 0.96)),
    #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.category-link {
  color: #0f766e;
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 94px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

.rank-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 950;
}

.rank-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  padding: 64px 0 34px;
}

.page-hero-inner {
  padding: 34px;
  border: 1px solid #dbeafe;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 26rem),
    linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: #0f766e;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 24px 0 30px;
}

.filter-select {
  padding: 12px 16px;
  border-radius: 18px;
}

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

.player-card,
.content-card,
.side-card {
  border: 1px solid #dbeafe;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-card {
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  background: #020617;
}

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

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

.play-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.35);
}

.play-button span {
  display: block;
  margin-left: 7px;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.player-shell.is-ready .player-poster,
.player-shell.is-ready .play-button {
  display: none;
}

.player-heading,
.content-body,
.side-card {
  padding: 24px;
}

.detail-title {
  color: #0f172a;
  font-size: clamp(32px, 4.2vw, 54px);
}

.detail-meta {
  margin: 0 0 20px;
}

.detail-lead {
  margin: 0;
  font-size: 18px;
}

.content-body p {
  color: #334155;
  font-size: 16px;
  line-height: 1.95;
}

.side-cover {
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  margin-bottom: 18px;
}

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

.side-card h2,
.side-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

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

.related-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
}

.related-item:hover {
  background: #f0fdfa;
}

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

.related-title {
  font-weight: 900;
  line-height: 1.35;
}

.related-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.search-page-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.empty-state {
  padding: 36px;
  border: 1px solid #dbeafe;
  border-radius: 28px;
  background: #ffffff;
  color: var(--muted);
}

.site-footer {
  margin-top: 28px;
  padding: 36px 0;
  border-top: 1px solid #dbeafe;
  background: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--teal);
}

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

  .menu-button {
    display: block;
  }

  .search-box {
    width: min(360px, 46vw);
  }

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

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

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

  .side-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 22px;
  }

  .side-cover {
    margin-bottom: 0;
  }
}

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

  .header-actions .search-box {
    display: none;
  }

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

  .quick-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 580px) {
  .container,
  .header-inner,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .hero {
    border-radius: 0 0 28px 28px;
  }

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

  .hero-content {
    padding: 48px 0 78px;
  }

  .hero-actions,
  .detail-actions,
  .quick-search form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-search,
  .quick-cats,
  .page-hero-inner,
  .player-heading,
  .content-body,
  .side-card {
    padding: 18px;
  }

  .movie-grid,
  .search-page-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-title {
    font-size: 15px;
    min-height: 44px;
  }

  .movie-info {
    padding: 12px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 74px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .side-card {
    display: block;
  }

  .side-cover {
    margin-bottom: 18px;
  }
}
