:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --orange: #f97316;
  --red: #ef4444;
  --slate: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.26);
  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  background: linear-gradient(180deg, #eff6ff 0%, #ecfeff 45%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(105deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.25);
}

.header-main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px 22px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark,
.footer-brand span {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
  margin-top: 2px;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: 300px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.header-search input,
.mobile-panel input,
.hero-search input,
.filter-panel input,
.search-box-main input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 14px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
}

.header-search input {
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.header-search button,
.mobile-panel button,
.hero-search button,
.search-box-main button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--blue);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 22px;
  cursor: pointer;
}

.header-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 28px;
  pointer-events: none;
}

.header-wave path {
  fill: #eff6ff;
}

.mobile-panel {
  display: none;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px 30px;
}

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

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.mobile-panel nav,
.mobile-cats {
  display: grid;
  gap: 8px;
}

.mobile-cats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.mobile-panel a,
.mobile-cats a {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.08));
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
}

.hero-content h1 {
  max-width: 720px;
  margin: 22px 0 14px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 34px;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions,
.detail-copy .primary-btn {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  padding: 13px 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.rank-item:hover {
  transform: translateY(-4px);
}

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

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

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

.section-wrap,
.page-hero,
.breadcrumb,
.detail-hero {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.section-wrap {
  padding-top: 66px;
  padding-bottom: 66px;
}

.soft-block {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1220px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1220px) / 2 + 22px));
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-title p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.section-icon.hot {
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.section-icon.cyan {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
}

.section-icon.teal {
  background: linear-gradient(135deg, #2dd4bf, #0891b2);
}

.text-link {
  margin-left: auto;
  padding: 10px 18px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.22);
}

.poster-box {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.poster-badge,
.poster-year {
  position: absolute;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 12px;
  top: 12px;
  background: rgba(37, 99, 235, 0.86);
}

.poster-year {
  right: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.card-info {
  display: block;
  padding: 16px;
}

.card-info strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.compact-card .card-info strong {
  font-size: 16px;
}

.card-info em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 9px;
}

.card-desc {
  display: block;
  min-height: 42px;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags a {
  padding: 5px 9px;
  border-radius: 999px;
  color: #2563eb;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-copy {
  min-width: 0;
  flex: 1;
}

.rank-copy strong {
  display: block;
  font-size: 17px;
  margin-bottom: 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
}

.rank-item img {
  width: 116px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
}

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

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

.category-tile {
  min-height: 168px;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #0891b2, #14b8a6, #22c55e);
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 20px;
  opacity: 0.82;
  font-size: 14px;
  font-weight: 900;
}

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

.category-tile em {
  display: block;
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  margin-top: 38px;
  padding-top: 60px;
  padding-bottom: 60px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.42), transparent 28%), linear-gradient(135deg, #0f172a, #2563eb 52%, #06b6d4);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 20px 0 12px;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-group button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #1e40af;
  background: #dbeafe;
  font-weight: 800;
  cursor: pointer;
}

.filter-group button.is-active,
.filter-group button:hover {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 36px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 38px;
  padding-top: 38px;
  padding-bottom: 60px;
}

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

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

.detail-copy {
  align-self: center;
}

.detail-copy h1 {
  margin: 22px 0 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.12;
}

.detail-line {
  color: #334155;
  font-size: 19px;
  line-height: 1.85;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 25px 0;
}

.meta-grid span {
  padding: 15px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.meta-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.player-section {
  padding-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.4);
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.player-start span {
  margin-left: 5px;
  font-size: 36px;
}

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

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 14px;
  pointer-events: none;
}

.article-section {
  line-height: 1.9;
  color: #334155;
}

.article-section h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 28px;
}

.article-section p {
  margin: 0 0 28px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.next-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.next-links a {
  padding: 18px 22px;
  border-radius: 20px;
  color: #1e40af;
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.library-group {
  margin-bottom: 32px;
}

.library-group h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

.library-links a {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.library-links strong {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-links em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.site-footer {
  position: relative;
  margin-top: 70px;
  padding: 76px 22px 28px;
  color: #ffffff;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-wave {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 52px;
}

.footer-wave path {
  fill: #ffffff;
}

.footer-grid {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 34px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #cbd5e1;
}

.footer-grid h3 {
  margin: 0 0 16px;
  color: #67e8f9;
}

.footer-grid a {
  display: block;
  margin-bottom: 9px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.footer-bottom {
  max-width: 1220px;
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(203, 213, 225, 0.16);
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

  .compact-grid,
  .rank-page-grid,
  .category-grid,
  .wide-category-grid,
  .library-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .header-main {
    padding-bottom: 24px;
  }

  .hero-slider {
    height: 560px;
  }

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

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

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

  .text-link {
    margin-left: 0;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-movie-grid,
  .all-movie-grid,
  .rank-grid,
  .rank-page-grid,
  .category-grid,
  .wide-category-grid,
  .library-links,
  .footer-grid,
  .next-links {
    grid-template-columns: 1fr;
  }

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

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

  .hero-search,
  .mobile-panel form {
    flex-direction: column;
    border-radius: 24px;
  }

  .rank-item img {
    width: 96px;
    height: 70px;
  }

  .player-start {
    width: 70px;
    height: 70px;
  }

  .player-start span {
    font-size: 28px;
  }
}
