* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.28);
}

.brand-name {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.nav-link {
  color: #334155;
  font-weight: 650;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--teal);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link-soft {
  color: #64748b;
  font-weight: 600;
}

.header-search {
  width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.header-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: #0f172a;
}

.header-search button,
.wide-search button,
.search-toolbar button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.20);
}

.menu-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #334155;
}

main {
  min-height: 70vh;
}

.main-visual {
  max-width: 1240px;
  margin: 26px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.main-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.main-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.main-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.main-slide-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.10) 100%);
}

.main-slide-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  min-height: 560px;
  padding: 74px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.main-slide-content .eyebrow,
.page-hero-rank .eyebrow {
  color: #67e8f9;
}

.main-slide-content h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.08em;
}

.main-slide-content p:not(.eyebrow) {
  max-width: 560px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  background: #ccfbf1;
}

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

.hero-actions,
.detail-info .primary-button {
  margin-top: 26px;
}

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

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

.ghost-button {
  margin-left: 10px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

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

.slider-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transform: translateY(-50%);
}

.slider-prev {
  left: 18px;
}

.slider-next {
  right: 18px;
}

.slider-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

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

.slider-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.focus-rail {
  padding: 20px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.focus-rail-head,
.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.focus-rail-head span {
  font-size: 20px;
  font-weight: 850;
}

.focus-rail-head a,
.section-more,
.text-button {
  color: var(--teal);
  font-weight: 800;
}

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

.focus-mini-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: transform 0.2s ease, background 0.2s ease;
}

.focus-mini-card:hover {
  transform: translateX(3px);
  background: #ecfeff;
}

.focus-mini-card img {
  width: 72px;
  height: 54px;
  border-radius: 14px;
}

.focus-mini-card span {
  overflow: hidden;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-panel,
.content-section,
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 22px 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 16px;
}

.search-panel,
.page-hero,
.detail-hero,
.detail-content,
.watch-section,
.category-overview-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.search-panel h2,
.section-title-row h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.045em;
}

.search-panel h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.wide-search,
.inline-filter,
.search-toolbar {
  display: flex;
  gap: 10px;
}

.wide-search input,
.inline-filter input,
.search-toolbar input,
.search-toolbar select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #f8fafc;
  color: #0f172a;
}

.wide-search input,
.inline-filter input,
.search-toolbar input {
  flex: 1 1 auto;
  padding: 13px 18px;
}

.search-toolbar select {
  padding: 0 14px;
}

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

.content-section-flat {
  padding-top: 26px;
}

.section-title-row h2 {
  font-size: clamp(26px, 3vw, 38px);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(13, 148, 136, 0.32);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-card-compact .poster-link {
  aspect-ratio: 16 / 11;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.26);
}

.card-body {
  padding: 16px;
}

.movie-meta {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.28;
}

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

.card-desc {
  margin: 0 0 14px;
  min-height: 3.1em;
  color: #475569;
  font-size: 14px;
}

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

.category-tile {
  min-height: 142px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}

.category-tile span {
  color: #0f172a;
  font-size: 19px;
  font-weight: 850;
}

.category-tile p,
.category-overview-card p,
.page-hero p,
.detail-line,
.detail-content p,
.site-footer p {
  color: #64748b;
}

.page-wrap {
  padding-top: 24px;
}

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

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

.breadcrumb em {
  color: #cbd5e1;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 34px;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  top: -100px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28), rgba(20, 184, 166, 0));
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 12px 0 0;
  font-size: 17px;
}

.page-hero-rank {
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.page-hero-rank h1,
.page-hero-rank p {
  color: #ffffff;
}

.inline-filter,
.search-toolbar {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  max-width: 900px;
}

.search-toolbar {
  flex-wrap: wrap;
}

.category-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 24px;
}

.category-overview-card {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-overview-card h2 a:hover {
  color: var(--teal);
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.category-preview-links a {
  max-width: 180px;
  overflow: hidden;
  padding: 7px 12px;
  border-radius: 999px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #ccfbf1;
}

.detail-wrap {
  max-width: 1160px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  padding: 26px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

.detail-info h1 {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.06;
}

.detail-line {
  max-width: 720px;
  margin: 16px 0 20px;
  font-size: 18px;
}

.detail-tags {
  margin-top: 14px;
}

.watch-section,
.detail-content {
  margin-top: 28px;
  padding: 26px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(2, 6, 23, 0.32);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.48), rgba(15, 118, 110, 0.36));
}

.player-card.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  font-size: 30px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.22);
}

.detail-content h2 {
  margin-top: 0;
  font-size: 28px;
}

.detail-content h2 + p {
  margin-top: 10px;
}

.detail-content p {
  font-size: 17px;
}

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

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

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 22px 0;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

.copyright {
  margin-bottom: 0;
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1120px) {
  .main-visual {
    grid-template-columns: 1fr;
  }

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

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

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

  .header-search {
    display: none;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-menu {
    order: 4;
    display: none;
    flex: 1 0 100%;
    padding: 0 0 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .main-slider,
  .main-slide-content {
    min-height: 500px;
  }

  .main-slide-content {
    padding: 54px 30px;
  }

  .slider-control {
    display: none;
  }

  .slider-dots {
    left: 30px;
  }

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

  .wide-search,
  .inline-filter,
  .search-toolbar {
    flex-direction: column;
  }

  .search-toolbar select {
    min-height: 46px;
  }

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

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

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

@media (max-width: 580px) {
  .brand-name {
    font-size: 20px;
  }

  .main-visual,
  .search-panel,
  .content-section,
  .page-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .main-slider,
  .main-slide-content {
    min-height: 460px;
  }

  .main-slide-content {
    padding: 38px 22px;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .ghost-button {
    margin-left: 0;
  }

  .focus-rail-list,
  .movie-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .detail-content,
  .watch-section,
  .search-panel {
    padding: 22px;
  }

  .player-card {
    border-radius: 18px;
  }
}
