:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --cyan: #06b6d4;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6f8 45%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  display: block;
  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.8);
  backdrop-filter: blur(18px);
}

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

.nav-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.main-nav a,
.mobile-panel a {
  padding: 10px 14px;
  color: #334155;
  border-radius: 999px;
  transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--teal-dark);
  background: #ccfbf1;
}

.quick-search,
.mobile-panel form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-search input,
.mobile-panel input,
.filter-box input,
.filter-box select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 16px;
  transition: 0.25s ease;
}

.quick-search input:focus,
.mobile-panel input:focus,
.filter-box input:focus,
.filter-box select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.quick-search button,
.mobile-panel button,
.btn,
.filter-box button {
  height: 42px;
  padding: 0 18px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(13, 148, 136, 0.2);
  transition: 0.25s ease;
}

.quick-search button:hover,
.mobile-panel button:hover,
.btn:hover,
.filter-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(13, 148, 136, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #ecfeff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--teal-dark);
  border-radius: 99px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 96px 0;
  color: #ffffff;
}

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

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

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.hero-tags,
.tag-row,
.movie-meta,
.detail-meta,
.category-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.78);
  backdrop-filter: blur(8px);
}

.hero-actions {
  margin-top: 28px;
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.hero-btn,
.hero-dot {
  position: absolute;
  z-index: 3;
}

.hero-btn {
  top: 50%;
  width: 48px;
  height: 48px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  transition: 0.25s ease;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  position: static;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.25s ease;
}

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

main {
  display: block;
}

.page-hero,
.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero {
  padding: 68px 0 36px;
}

.page-hero-card {
  overflow: hidden;
  position: relative;
  padding: clamp(28px, 6vw, 64px);
  color: #ffffff;
  background: radial-gradient(circle at 15% 10%, rgba(45, 212, 191, 0.45), transparent 30%), linear-gradient(135deg, #0f172a 0%, #164e63 50%, #0f766e 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.page-hero-card p {
  max-width: 760px;
  margin: 0;
  color: #cffafe;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-dark);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: var(--shadow);
}

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

.movie-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  background: rgba(20, 184, 166, 0.88);
}

.rank-badge {
  left: 14px;
  top: 14px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-body {
  padding: 18px;
}

.movie-meta {
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  background: #94a3b8;
  border-radius: 999px;
}

.movie-body h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.movie-body h3 a:hover,
.rank-info h3 a:hover {
  color: var(--teal-dark);
}

.movie-body p {
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.panel-section {
  padding: clamp(24px, 4vw, 36px);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tint-section {
  background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
}

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

.category-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.filter-box {
  position: sticky;
  top: 92px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(130px, 0.45fr)) auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.empty-state {
  display: none;
  padding: 42px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border-radius: 22px;
  border: 1px dashed var(--line);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  border-radius: 18px;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  border-radius: 16px;
}

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.player-top {
  background: #020617;
  padding: 24px 0 42px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #ccfbf1;
  font-weight: 700;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.32));
}

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

.play-center {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 22px 42px rgba(13, 148, 136, 0.35);
}

.play-title {
  font-size: 18px;
  font-weight: 800;
}

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

.detail-card,
.side-card {
  padding: clamp(22px, 4vw, 34px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 14px;
  font-size: 26px;
}

.detail-card p,
.side-card p {
  color: #334155;
  line-height: 1.9;
}

.detail-lead {
  font-size: 18px;
  color: #0f172a !important;
}

.detail-meta {
  margin-bottom: 22px;
}

.poster-side {
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.poster-side img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.side-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 16px;
  transition: 0.25s ease;
}

.side-link:hover {
  background: #ecfeff;
}

.side-link img {
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  margin-bottom: 6px;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer nav a {
  padding: 7px 12px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.12);
  border-radius: 999px;
}

.copyright {
  color: #94a3b8;
  white-space: nowrap;
}

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

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

  .quick-search {
    display: none;
  }
}

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

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

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

  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 78px 0;
  }

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

  .filter-box {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 620px) {
  .nav-inner,
  .footer-inner,
  .container,
  .page-hero,
  .content-section,
  .hero-content {
    width: min(100% - 24px, 1240px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-slider,
  .hero-content {
    min-height: 520px;
  }

  .hero-btn {
    display: none;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn {
    display: inline-flex;
    justify-content: center;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-box {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 72px minmax(0, 1fr);
    gap: 12px;
  }

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

  .rank-info p {
    display: none;
  }

  .player-top {
    padding-top: 14px;
  }

  .play-ring {
    width: 70px;
    height: 70px;
  }
}
