:root {
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-soft: #f1f5f9;
  --color-line: #e2e8f0;
  --color-blue: #2563eb;
  --color-cyan: #06b6d4;
  --color-orange: #f97316;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 12px 30px rgba(37, 99, 235, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  width: min(1600px, calc(100% - 32px));
  margin: 0 auto;
}

.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.8);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text strong,
.footer-brand strong {
  display: block;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small,
.footer-brand small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #334155;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  color: #334155;
  background: #f1f5f9;
  cursor: pointer;
}

.hero-section {
  position: relative;
  min-height: 85vh;
  overflow: hidden;
}

.hero-grid {
  height: 85vh;
  min-height: 560px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #ffffff;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-card:hover img {
  transform: scale(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.46) 46%, rgba(2, 6, 23, 0.92) 100%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: clamp(24px, 4vw, 48px);
  display: grid;
  gap: 14px;
}

.hero-content em {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.38);
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
}

.hero-content strong {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content span {
  color: #e2e8f0;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-content b,
.primary-button {
  width: fit-content;
  padding: 12px 20px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.26);
}

.hero-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-card:hover .hero-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(255, 255, 255, 0.28);
}

.hero-banner {
  position: relative;
  z-index: 3;
  margin-top: -140px;
  margin-bottom: 70px;
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(6, 182, 212, 0.9));
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.hero-banner p,
.section-heading p,
.page-hero p,
.quick-search p,
.detail-copy p:first-child {
  margin: 0 0 8px;
  color: var(--color-cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-banner p,
.hero-banner span {
  color: #dbeafe;
}

.hero-banner h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.hero-actions a,
.quick-search a,
.section-heading a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--color-blue);
  background: #ffffff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 60px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.quick-search h2,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 50px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--color-text);
  background: #ffffff;
  outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section-block {
  margin: 70px auto;
}

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

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.page-grid {
  margin-top: 32px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-poster::after {
  opacity: 1;
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.poster-year {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: var(--color-orange);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-info h2 a,
.ranking-item h2 a {
  color: inherit;
  text-decoration: none;
}

.movie-card:hover .movie-info h2 a,
.ranking-item h2 a:hover {
  color: var(--color-blue);
}

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

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.category-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.category-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-card span:last-child {
  color: var(--color-muted);
  line-height: 1.7;
}

.rank-preview {
  padding-bottom: 50px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.rank-row span:first-child {
  color: var(--color-orange);
  font-weight: 900;
  font-size: 18px;
}

.rank-row img {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row strong {
  line-height: 1.35;
}

.rank-row em {
  color: var(--color-muted);
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
}

.site-footer {
  margin-top: 90px;
  padding: 64px 0 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}

.site-footer h2 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p,
.site-footer li,
.site-footer a,
.footer-bottom {
  color: #bfdbfe;
  line-height: 1.8;
}

.site-footer a {
  text-decoration: none;
}

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

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

.footer-bottom {
  margin-top: 52px;
  padding: 22px 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
  border-top: 1px solid rgba(191, 219, 254, 0.22);
}

.page-main {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--color-muted);
  font-size: 14px;
}

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

.page-hero {
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(224, 242, 254, 0.9));
  box-shadow: var(--shadow-soft);
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 14px;
  color: var(--color-muted);
  line-height: 1.8;
}

.filter-panel {
  position: relative;
  margin-top: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: block;
  margin: 0 0 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding: 18px;
  border-radius: 14px;
  color: var(--color-muted);
  text-align: center;
  background: #f8fafc;
}

.ranking-board {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  text-decoration: none;
}

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

.ranking-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-orange);
  font-weight: 900;
}

.ranking-item h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.ranking-item p {
  margin: 0 0 12px;
  color: var(--color-muted);
  line-height: 1.8;
}

.detail-main {
  max-width: 1320px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(24px, 4vw, 50px);
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.9));
  box-shadow: var(--shadow-card);
  color: #ffffff;
}

.detail-poster img {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.32);
}

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

.detail-copy p:first-child {
  color: #67e8f9;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-line {
  max-width: 820px;
  color: #dbeafe;
  line-height: 1.9;
  font-size: 18px;
}

.detail-copy .tag-list {
  margin: 20px 0 26px;
}

.player-section,
.detail-text {
  margin-top: 34px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.video-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  z-index: 3;
}

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

.player-layer span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
}

.player-layer strong {
  font-size: 20px;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-text p {
  margin: 0 0 24px;
  color: #334155;
  line-height: 2;
  font-size: 17px;
}

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

@media (max-width: 1180px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 88px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
  }

  .site-nav.is-open {
    display: flex;
    justify-content: flex-start;
  }

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

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

  .hero-card {
    min-height: 420px;
  }

  .hero-banner,
  .quick-search,
  .filter-panel,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    margin-top: 24px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 20px, 1600px);
  }

  .header-inner {
    min-height: 68px;
  }

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

  .brand-text strong {
    font-size: 21px;
  }

  .hero-grid {
    min-height: 0;
    padding: 10px;
  }

  .hero-card {
    min-height: 360px;
    border-radius: 22px;
  }

  .hero-banner,
  .page-hero,
  .player-section,
  .detail-text {
    border-radius: 22px;
  }

  .section-heading,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h2 {
    font-size: 15px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 34px 54px 1fr;
  }

  .rank-row em {
    grid-column: 3;
  }

  .ranking-item {
    grid-template-columns: 94px 1fr;
    gap: 14px;
  }

  .ranking-item h2 {
    font-size: 19px;
  }

  .detail-copy h1 {
    font-size: 34px;
  }
}
