:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #ecfeff;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(14, 165, 233, 0.16);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --sky: #38bdf8;
  --shadow: 0 18px 60px rgba(8, 145, 178, 0.14);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.28), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #ecfeff 38%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #0891b2, #2563eb, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0891b2;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: #ecfeff;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav-link {
  display: block;
  padding: 14px 24px;
  color: #334155;
  font-weight: 650;
}

.mobile-nav-link.is-active,
.mobile-nav-link:hover {
  color: #0891b2;
}

.home-hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 108px 0 64px;
}

.home-hero {
  min-height: 660px;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(58px);
  opacity: 0.68;
  pointer-events: none;
}

.hero-glow-a {
  width: 360px;
  height: 360px;
  left: 4%;
  top: 96px;
  background: rgba(103, 232, 249, 0.56);
}

.hero-glow-b {
  width: 430px;
  height: 430px;
  right: -5%;
  bottom: 12px;
  background: rgba(147, 197, 253, 0.52);
}

.hero-content,
.page-hero-inner {
  position: relative;
  z-index: 2;
}

.hero-center,
.page-hero-inner {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.home-hero h1,
.page-hero h1 {
  max-width: 960px;
  margin: 22px auto 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #0891b2, #2563eb, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

.hero-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(720px, 100%);
  margin: 38px auto 0;
  padding: 10px;
  border: 2px solid rgba(6, 182, 212, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-search span {
  padding-left: 10px;
  color: #94a3b8;
  font-size: 24px;
}

.hero-search input,
.filter-grid input,
.filter-grid select,
.card-filter {
  width: 100%;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 14px;
  outline: none;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input {
  border: 0;
  padding: 14px 8px;
  background: transparent;
}

.hero-search input:focus,
.filter-grid input:focus,
.filter-grid select:focus,
.card-filter:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.13);
}

.hero-search button,
.primary-btn,
.ghost-btn,
.button-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.hero-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.button-reset:hover {
  transform: translateY(-2px);
}

.ghost-btn,
.button-reset {
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: #0891b2;
  background: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.center-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.hero-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px auto 0;
}

.hero-categories a {
  padding: 9px 14px;
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 999px;
  color: #0e7490;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 650;
}

.hero-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 46px auto 0;
}

.hero-focus-card,
.category-mini-card,
.category-tile,
.content-card,
.rank-panel,
.search-panel,
.detail-side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.hero-focus-card {
  padding: 22px;
  text-align: left;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.hero-focus-card:hover,
.category-mini-card:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.hero-focus-card span,
.hero-focus-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.hero-focus-card strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
}

.section-block {
  margin: 72px auto;
}

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

.section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-line {
  display: inline-block;
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0 17px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  color: #0891b2;
  font-weight: 800;
}

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

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

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

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

.movie-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(6, 182, 212, 0.26);
}

.poster-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

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

.movie-card:hover .poster-box img {
  transform: scale(1.08);
}

.poster-box::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.card-chip,
.rating-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.9);
  backdrop-filter: blur(10px);
}

.card-chip {
  top: 12px;
  left: 12px;
}

.rating-pill {
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 13px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
}

.search-panel {
  padding: 30px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-grid input,
.filter-grid select,
.card-filter {
  min-height: 48px;
  padding: 0 14px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 30px;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

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

.rank-panel-head a {
  color: #0891b2;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 28px 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

.rank-row:hover {
  background: #ecfeff;
}

.rank-number,
.rank-score {
  color: #0891b2;
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 4px;
}

.category-card-grid,
.category-grid-large {
  display: grid;
  gap: 18px;
}

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

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

.category-mini-card,
.category-tile {
  display: block;
  padding: 24px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-mini-card strong,
.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

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

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.page-hero {
  padding: 86px 0 58px;
}

.page-hero h1 {
  font-size: clamp(38px, 5.6vw, 62px);
}

.category-toolbar-block {
  margin-top: 44px;
}

.category-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

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

.category-toolbar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-filter {
  width: min(320px, 100%);
}

.detail-top {
  padding: 46px 0 30px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #0891b2;
}

.detail-player-area h1 {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.video-player,
.play-cover,
.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-player {
  object-fit: contain;
}

.play-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: #000;
  z-index: 2;
}

.play-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.play-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.55));
}

.play-circle {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.36);
  font-size: 32px;
}

.player-shell.is-playing .play-cover {
  display: none;
}

.detail-side-card {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.detail-side-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.detail-score {
  display: inline-flex;
  margin: 18px 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.detail-meta-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-meta-list div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.detail-meta-list dt {
  color: #94a3b8;
}

.detail-meta-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 700;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

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

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 2;
}

.movie-card-compact .card-body h3 {
  font-size: 17px;
}

.movie-card-compact .card-body p {
  min-height: 44px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 32px;
  padding: 42px 0 30px;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
}

.footer-brand p {
  max-width: 420px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

.footer-links a:hover {
  color: #0891b2;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .tight-grid,
  .category-grid,
  .rank-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .detail-side-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .home-hero {
    min-height: auto;
    padding-top: 72px;
  }

  .hero-search {
    grid-template-columns: auto 1fr;
  }

  .hero-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero-focus-grid,
  .featured-grid,
  .category-card-grid,
  .category-grid-large,
  .detail-content,
  .footer-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .category-toolbar,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-filter {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .home-hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .home-hero p,
  .page-hero p {
    font-size: 17px;
  }

  .movie-grid,
  .tight-grid,
  .category-grid,
  .rank-card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-block {
    margin: 52px auto;
  }

  .search-panel,
  .category-toolbar,
  .content-card {
    padding: 20px;
  }

  .detail-player-area h1 {
    font-size: 34px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 26px;
  }
}
