:root {
  --bg: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --emerald: #10b981;
  --slate: #0f172a;
  --slate-deep: #020617;
  --white: #ffffff;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 54px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, rgba(236, 254, 255, 0.72) 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #115e59 0%, #164e63 50%, #1e293b 100%);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.24);
}

.nav-bar {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee 0%, #14b8a6 100%);
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(90deg, #67e8f9, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  font-weight: 650;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #67e8f9;
}

.site-search {
  position: relative;
  margin-left: auto;
  width: min(320px, 30vw);
}

.site-search input {
  width: 100%;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 14px;
  padding: 10px 14px;
  color: #ffffff;
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search input::placeholder {
  color: rgba(207, 250, 254, 0.7);
}

.site-search input:focus {
  border-color: rgba(103, 232, 249, 0.8);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 420px;
  overflow: auto;
  display: none;
  color: var(--ink);
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.search-panel.open {
  display: block;
}

.search-panel a,
.search-empty {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid #eef2f7;
}

.search-panel a:hover {
  background: #ecfeff;
}

.search-panel strong {
  display: block;
  color: #0f172a;
}

.search-panel small,
.search-empty {
  color: var(--muted);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.88);
}

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

.hero {
  position: relative;
  width: min(1320px, calc(100% - 32px));
  height: 70vh;
  min-height: 520px;
  margin: 26px auto 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: #020617;
  box-shadow: var(--shadow-lg);
}

.hero-track,
.hero-slide {
  height: 100%;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-copy {
  position: absolute;
  left: clamp(28px, 6vw, 76px);
  right: clamp(24px, 8vw, 120px);
  bottom: clamp(34px, 8vh, 86px);
  max-width: 760px;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-kicker span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  font-weight: 700;
  font-size: 14px;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(16px, 2.1vw, 21px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #14b8a6);
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 26px;
  background: #22d3ee;
}

.section {
  margin: 56px 0;
}

.section.soft {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 52px max(16px, calc((100vw - 1280px) / 2));
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(236, 254, 255, 0.85));
}

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

.section-title {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1f2937;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-title span {
  width: 7px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #06b6d4, #14b8a6);
}

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

.section-intro {
  max-width: 820px;
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 17px;
}

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card-link:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .card-cover {
  aspect-ratio: 3 / 4;
}

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

.card-link:hover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.04));
  transition: opacity 0.3s ease;
}

.card-link:hover .card-cover::after {
  opacity: 1;
}

.year-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.year-badge {
  top: 12px;
  right: 12px;
}

.type-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(6, 182, 212, 0.9);
}

.rank-badge {
  top: 12px;
  left: 12px;
  background: rgba(16, 185, 129, 0.92);
}

.play-badge {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  opacity: 0;
  border-radius: 50%;
  color: #ffffff;
  background: #06b6d4;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: #0891b2;
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-row .movie-card {
  flex: 0 0 286px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2, #14b8a6);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
}

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

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

.ranking-item a {
  display: grid;
  grid-template-columns: 54px 126px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.ranking-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  font-weight: 900;
}

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

.ranking-copy strong,
.ranking-copy em,
.ranking-copy small {
  display: block;
}

.ranking-copy strong {
  margin-bottom: 4px;
  font-size: 18px;
}

.ranking-copy em {
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.ranking-copy small {
  margin-top: 4px;
  color: #64748b;
  font-size: 14px;
}

.page-hero {
  margin: 32px 0 26px;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid rgba(165, 243, 252, 0.7);
  border-radius: 28px;
  background: linear-gradient(135deg, #ecfeff, #ffffff 48%, #f0fdfa);
  box-shadow: var(--shadow-sm);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 18px;
  color: #64748b;
  font-size: 14px;
}

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

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #dff7fb;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.filter-input,
.filter-select {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.filter-input {
  flex: 1 1 320px;
}

.filter-input input,
.filter-select select {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 9px 13px;
  color: #0f172a;
  outline: none;
  background: #ffffff;
}

.filter-input input:focus,
.filter-select select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

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

.detail-main {
  min-width: 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

.player-start span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #14b8a6);
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.35);
  font-size: 38px;
  transition: transform 0.22s ease;
}

.player-start:hover span {
  transform: scale(1.08);
}

.player-start.is-hidden {
  display: none;
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  background: linear-gradient(90deg, #ecfeff, #f0fdfa);
  font-size: 13px;
  font-weight: 750;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

.detail-card .lead {
  color: #374151;
  font-size: 19px;
  font-style: italic;
}

.detail-card p {
  margin: 0 0 16px;
  color: #374151;
}

.review-box {
  padding: 20px;
  border: 1px solid #cffafe;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, rgba(236, 254, 255, 0.62));
}

.side-card {
  position: sticky;
  top: 92px;
  margin-top: 0;
}

.side-card h2 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.side-card h2::before {
  content: "";
  width: 5px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #06b6d4, #14b8a6);
}

.mini-list {
  display: grid;
  gap: 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
}

.mini-card img {
  width: 108px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  color: #1f2937;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.mini-card:hover strong {
  color: #0891b2;
}

.mini-card em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.no-result {
  display: none;
  padding: 36px;
  color: #64748b;
  text-align: center;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-brand p {
  max-width: 420px;
  margin: 18px 0 0;
  color: #94a3b8;
}

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

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

.footer-links a:hover {
  color: #22d3ee;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  font-size: 14px;
}

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

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

  .side-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .mobile-menu.open {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 520px;
  }

  .hero-slide img {
    position: absolute;
    inset: 0;
  }

  .hero-copy {
    top: 50%;
    bottom: auto;
    transform: translateY(-42%);
  }

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

  .ranking-item a {
    grid-template-columns: 46px 96px 1fr;
    gap: 12px;
  }

  .ranking-item img {
    width: 96px;
    height: 68px;
  }

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

@media (max-width: 560px) {
  .nav-bar,
  .main-shell,
  .footer-inner,
  .footer-bottom,
  .mobile-menu {
    width: min(100% - 24px, 1280px);
  }

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

  .hero {
    width: min(100% - 24px, 1320px);
    border-radius: 20px;
  }

  .hero-control {
    display: none;
  }

  .hero-copy {
    left: 20px;
    right: 20px;
  }

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

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

  .scroll-row .movie-card {
    flex-basis: 250px;
  }

  .page-toolbar {
    display: grid;
  }

  .mini-card {
    grid-template-columns: 96px 1fr;
  }

  .mini-card img {
    width: 96px;
    height: 64px;
  }

  .player-start span {
    width: 74px;
    height: 74px;
    font-size: 30px;
  }
}
