:root {
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --teal: #0f766e;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f6fb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.top-nav {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

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

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.big-search input,
.local-search {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 220px;
  padding: 9px 14px;
}

.nav-search button,
.mobile-search button,
.big-search button,
.filter-buttons button {
  border: 0;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.filter-buttons button:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
}

input:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 20px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  font-weight: 700;
  color: #374151;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}

.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.hero-content h1,
.hero-site-name {
  margin: 0 0 8px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-tags span,
.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 5px 10px;
  color: inherit;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.ghost-dark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  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(--blue), var(--teal));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
}

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

.ghost-dark-button {
  color: var(--blue-dark);
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: #ffffff;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.42);
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 26px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.quick-cats,
.section,
.footer-grid,
.footer-bottom,
.player-page {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 4px;
}

.quick-cats a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 9px 15px;
  color: #334155;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.section {
  padding: 46px 0;
}

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

.section-heading h2,
.detail-main h2,
.related-panel h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

.light-heading,
.light-link {
  color: #ffffff;
}

.horizontal-grid,
.movie-grid,
.compact-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card,
.compact-card,
.category-card,
.rank-item,
.detail-main,
.related-panel,
.seo-panel {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.compact-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.movie-card-horizontal {
  flex-direction: row;
  min-height: 185px;
}

.movie-card-horizontal .poster-link {
  width: 42%;
  flex: 0 0 42%;
}

.poster-frame {
  position: relative;
  height: 100%;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.movie-card-horizontal .poster-frame {
  min-height: 185px;
}

.poster-frame img,
.compact-card img,
.category-thumbs img,
.rank-cover img,
.player-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-frame img,
.compact-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.play-mark,
.compact-card a span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.84);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark,
.compact-card:hover a span {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card-body h3,
.compact-card h3,
.rank-info h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card-body h3 a:hover,
.compact-card h3 a:hover,
.rank-info h3 a:hover {
  color: var(--blue);
}

.movie-card-body p,
.compact-card p,
.rank-info p,
.category-card-body p,
.seo-panel p,
.detail-main p,
.related-panel p,
.player-side p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.movie-meta span {
  color: #475569;
  background: #eef2ff;
}

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

.tag-row span,
.detail-tags a {
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.highlight-section {
  width: min(1220px, calc(100% - 24px));
  padding: 42px 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

.category-feature:nth-of-type(even) {
  width: min(1220px, calc(100% - 24px));
  padding: 42px 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.compact-card {
  padding-bottom: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.compact-card a:first-child {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.compact-card h3,
.compact-card p {
  padding: 0 12px;
}

.compact-card h3 {
  margin-top: 12px;
  font-size: 16px;
}

.compact-card p {
  font-size: 13px;
}

.rank-section {
  width: min(1220px, calc(100% - 24px));
  padding: 42px 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, #1f2937, #020617);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  align-items: stretch;
  min-height: 132px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.rank-info {
  padding: 14px;
}

.rank-info p {
  margin: 6px 0 10px;
  font-size: 14px;
}

.seo-panel {
  padding: 44px;
  text-align: center;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.seo-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 42px);
}

.seo-actions {
  justify-content: center;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.94), rgba(15, 118, 110, 0.9));
}

.small-hero {
  padding: 76px 0;
}

.small-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.small-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
}

.small-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.category-card a {
  display: grid;
  grid-template-columns: 45% 1fr;
  min-height: 220px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.category-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card-body span {
  margin-top: 18px;
  color: var(--blue);
  font-weight: 900;
}

.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

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

.filter-buttons button {
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
}

.filter-buttons button.active {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.local-search {
  width: 260px;
  padding: 10px 15px;
}

.movie-card.hidden-card {
  display: none;
}

.big-search {
  max-width: 760px;
  margin: 0 auto 30px;
}

.big-search input {
  flex: 1;
  padding: 15px 20px;
  font-size: 17px;
}

.big-search button {
  padding: 15px 26px;
}

.search-results:empty {
  display: none;
}

.player-page {
  padding: 26px 0 0;
}

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

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.overlay-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.45);
}

.player-side {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-content: start;
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow);
}

.player-side img {
  height: 210px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.player-side h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
}

.detail-meta span {
  color: #1d4ed8;
  background: #eff6ff;
}

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

.detail-main,
.related-panel {
  padding: 28px;
}

.detail-main h2,
.related-panel h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 24px;
}

.detail-main p {
  margin-bottom: 24px;
  font-size: 17px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.info-list div {
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px 14px;
}

.info-list dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.single-column {
  grid-template-columns: 1fr;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

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

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
}

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

  .horizontal-grid,
  .rank-grid,
  .category-grid,
  .footer-grid,
  .player-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .player-side {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 820px) {
  .top-nav {
    height: 64px;
  }

  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-control {
    display: none;
  }

  .section-heading,
  .filter-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .movie-card-horizontal {
    flex-direction: column;
  }

  .movie-card-horizontal .poster-link {
    width: 100%;
    flex-basis: auto;
  }

  .category-card a,
  .player-side,
  .info-list {
    grid-template-columns: 1fr;
  }

  .local-search,
  .big-search {
    width: 100%;
  }

  .big-search {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .brand {
    font-size: 19px;
  }

  .hero {
    height: 610px;
  }

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

  .rank-item {
    grid-template-columns: 44px 82px 1fr;
  }

  .poster-frame {
    min-height: 240px;
  }

  .seo-panel,
  .detail-main,
  .related-panel {
    padding: 22px;
  }
}
