* {
  box-sizing: border-box;
}

:root {
  --brand: #0f766e;
  --brand-light: #14b8a6;
  --brand-deep: #0e7490;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --panel: #ffffff;
  --dark: #020617;
  --shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

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

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;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 40px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-light), var(--cyan));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.26);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: #475569;
  font-weight: 700;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.header-search input,
.mobile-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 11px 14px 11px 18px;
  color: var(--ink);
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.filter-button,
.player-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-button,
.player-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-light), var(--cyan));
  box-shadow: 0 14px 28px rgba(14, 116, 144, 0.22);
}

.header-search button,
.mobile-search button {
  margin-right: 4px;
  padding: 8px 16px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
}

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

.primary-button:hover,
.ghost-button:hover,
.filter-button:hover,
.player-button:hover {
  transform: translateY(-2px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #ecfeff;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--brand);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(1280px, calc(100% - 40px));
  transform: translateX(-50%);
  padding: 64px 0;
  color: #ffffff;
}

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

.eyebrow,
.section-kicker,
.page-kicker {
  margin: 0 0 10px;
  color: var(--brand-light);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.info-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-controls {
  position: absolute;
  right: max(20px, calc((100% - 1280px) / 2));
  bottom: 62px;
  z-index: 3;
  display: flex;
  gap: 12px;
}

.hero-control {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand-light);
}

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

.content-section {
  padding: 58px 0 0;
}

.section-heading,
.page-heading,
.detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-heading h1,
.detail-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--brand);
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.rank-list-item,
.detail-panel,
.player-shell,
.search-panel {
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(20, 184, 166, 0.45), transparent 36%), #0f172a;
}

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

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

.play-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-light), var(--cyan));
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 20px rgba(239, 68, 68, 0.3);
}

.movie-card-body {
  padding: 15px;
}

.movie-card-title {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card-title:hover {
  color: var(--brand);
}

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

.movie-one-line {
  min-height: 42px;
}

.tag-row {
  margin-top: 12px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 3px 3px 18px;
  scroll-snap-type: x mandatory;
}

.compact-card {
  min-width: 190px;
  scroll-snap-align: start;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.18);
}

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

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 22px;
}

.category-card p {
  position: relative;
  margin: 0 0 20px;
  color: var(--muted);
}

.category-card span {
  position: relative;
  color: var(--brand);
  font-weight: 900;
}

.page-hero {
  margin-top: 34px;
  padding: 42px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at 12% 10%, rgba(45, 212, 191, 0.4), transparent 34%), linear-gradient(135deg, #0f172a, #0f766e 55%, #0e7490);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-bar,
.search-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0;
  padding: 14px;
}

.filter-bar input,
.search-panel input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 13px 16px;
  color: var(--ink);
  background: #ffffff;
}

.filter-button {
  flex: 0 0 auto;
  padding: 13px 18px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  background: #020617;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  min-width: 118px;
  padding: 14px 24px;
  font-size: 18px;
}

.detail-panel {
  padding: 24px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.detail-title {
  margin: 20px 0 10px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.info-list p {
  margin: 0;
  color: var(--muted);
}

.info-list strong {
  color: var(--ink);
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 26px;
}

.article-block p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

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

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

.rank-list-item {
  display: grid;
  grid-template-columns: 74px 105px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #ffffff;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.rank-cover img {
  width: 105px;
  height: 142px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
}

.rank-action {
  color: var(--brand);
  font-weight: 900;
}

.empty-result {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-result.show {
  display: block;
}

.site-footer {
  margin-top: 76px;
  padding: 38px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

.footer-inner p {
  margin: 0;
}

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

  .desktop-nav {
    gap: 16px;
  }

  .header-search input {
    width: 170px;
  }
}

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

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

  .hero {
    height: 72vh;
    min-height: 520px;
  }

  .hero-content {
    padding: 42px 0 70px;
  }

  .hero-controls {
    right: 20px;
    bottom: 24px;
  }

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

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

  .detail-panel {
    order: -1;
  }

  .detail-cover {
    max-width: 280px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .header-inner,
  main,
  .page-main,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 28px, 1280px);
  }

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

  .hero {
    min-height: 520px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .filter-bar,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    padding: 30px 22px;
  }

  .section-heading,
  .page-heading,
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .rank-list-item {
    grid-template-columns: 46px 78px 1fr;
  }

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

  .rank-cover img {
    width: 78px;
    height: 108px;
  }

  .rank-action {
    grid-column: 2 / 4;
  }
}
