:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --cyan: #0891b2;
  --blue: #2563eb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

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

.brand-name {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  color: #475569;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: #ccfbf1;
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 8px 10px;
  background: transparent;
}

.nav-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.25);
}

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

.primary-btn.small,
.ghost-btn.small {
  padding: 9px 16px;
  font-size: 14px;
}

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

.ghost-btn.dark {
  color: var(--primary-dark);
  border-color: #99f6e4;
  background: #f0fdfa;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
}

.hero {
  min-height: 600px;
  background: #0f172a;
}

.hero-stage {
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 600px;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 35%, rgba(20, 184, 166, 0.34), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.32));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 116px 24px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 999px;
  background: #ccfbf1;
}

.hero-content .eyebrow {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.55);
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  color: #ffffff;
  font-size: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.quick-search,
.section-block,
.page-main,
.category-grid,
.filter-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.wide-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-size: 17px;
  background: transparent;
}

.wide-search button {
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  cursor: pointer;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a,
.tags-panel a,
.detail-tags a,
.category-links a {
  display: inline-flex;
  padding: 8px 12px;
  color: var(--primary-dark);
  border-radius: 999px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  font-weight: 700;
}

.section-block {
  padding-top: 72px;
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-head p,
.page-hero p,
.rank-copy p,
.category-info p,
.detail-one-line,
.detail-content p {
  color: var(--muted);
  line-height: 1.8;
}

.section-head a {
  color: var(--primary-dark);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #99f6e4;
  box-shadow: 0 22px 42px rgba(13, 148, 136, 0.14);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

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

.movie-card:hover .movie-poster img,
.category-card:hover .category-poster img,
.horizontal-card:hover .horizontal-poster img {
  transform: scale(1.06);
}

.year-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

.year-badge {
  left: 10px;
  top: 10px;
}

.type-badge {
  right: 10px;
  bottom: 10px;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.4;
}

.movie-info h3 a:hover,
.horizontal-info h3 a:hover,
.category-info h2 a:hover {
  color: var(--primary-dark);
}

.movie-info p {
  min-height: 44px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta span {
  font-size: 12px;
  padding: 5px 8px;
}

.rank-feature {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 30px;
  align-items: start;
}

.rank-copy {
  position: sticky;
  top: 100px;
  padding: 36px;
  color: #ffffff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.35), transparent 32%),
    linear-gradient(135deg, #0f766e, #155e75, #1d4ed8);
  box-shadow: var(--shadow);
}

.rank-copy .section-kicker {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.rank-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.12;
}

.rank-copy p {
  color: #dbeafe;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.horizontal-card:hover {
  transform: translateX(4px);
  border-color: #99f6e4;
}

.horizontal-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.horizontal-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.horizontal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.horizontal-info h3 {
  margin: 0;
  font-size: 18px;
}

.horizontal-info p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-rank {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  border-radius: 11px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.tags-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
}

.page-main {
  padding-top: 48px;
  padding-bottom: 78px;
}

.page-hero {
  padding: 48px;
  margin-bottom: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.26), transparent 34%),
    linear-gradient(135deg, #ffffff, #ecfeff 55%, #eff6ff);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

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

.page-hero p {
  max-width: 780px;
  font-size: 18px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.category-poster {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
}

.category-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-info span {
  color: var(--primary-dark);
  font-weight: 800;
}

.category-info h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.category-info p {
  margin: 0 0 14px;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-links a {
  font-size: 13px;
}

.filter-panel {
  display: grid;
  gap: 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.filter-row.expanded {
  grid-template-columns: 1fr 160px 160px 180px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 13px 14px;
  color: #0f172a;
  background: #f8fafc;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

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

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 16%, rgba(8, 145, 178, 0.18), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 4 / 5.4;
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-one-line {
  font-size: 19px;
}

.detail-meta {
  margin: 22px 0 14px;
}

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

.player-section,
.detail-content {
  margin-top: 36px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.45));
  cursor: pointer;
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 16px 44px rgba(20, 184, 166, 0.38);
  font-size: 34px;
}

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

.detail-content h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 36px;
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 36px;
}

.footer-brand {
  display: inline-block;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid,
  .movie-grid.four-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid,
  .rank-feature,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-copy {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-content {
    padding-top: 96px;
  }

  .hero-arrow {
    display: none;
  }

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

  .filter-row,
  .filter-row.expanded {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-poster {
    max-width: 340px;
  }

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

@media (max-width: 640px) {
  .nav-shell {
    height: 64px;
    padding: 0 16px;
  }

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

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

  .hero h1 {
    font-size: 40px;
  }

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .quick-search,
  .section-block,
  .page-main,
  .category-grid,
  .filter-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wide-search,
  .section-head,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .wide-search button {
    padding: 14px 18px;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .movie-info p {
    font-size: 13px;
  }

  .horizontal-card,
  .category-card {
    grid-template-columns: 112px 1fr;
    gap: 12px;
  }

  .horizontal-poster {
    aspect-ratio: 4 / 4.5;
  }

  .category-info h2 {
    font-size: 20px;
  }

  .category-links a:nth-child(n+4) {
    display: none;
  }

  .filter-row,
  .filter-row.expanded {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .player-section,
  .detail-content {
    padding: 22px;
    border-radius: 24px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

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