* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #212529;
  background: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 45%, #faf9f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(222, 226, 230, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #486581 0%, #334e68 100%);
  box-shadow: 0 14px 30px rgba(72, 101, 129, 0.25);
  font-weight: 800;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 22px;
  color: #212529;
}

.brand-text em {
  font-style: normal;
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  color: #343a40;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #334e68;
  border-bottom-color: #486581;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f0f4f8;
  color: #334e68;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
}

.hero {
  position: relative;
  height: min(720px, calc(100vh - 72px));
  min-height: 560px;
  overflow: hidden;
  background: #121416;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.18)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(250, 204, 21, 0.2), transparent 30%), linear-gradient(0deg, rgba(18, 20, 22, 0.72), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 88px;
  max-width: 1180px;
}

.eyebrow,
.section-head p,
.page-hero p {
  margin: 0 0 10px;
  color: #486581;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #facc15;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, #486581 0%, #334e68 100%);
  box-shadow: 0 14px 28px rgba(72, 101, 129, 0.24);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
}

.ghost-btn.light {
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(72, 101, 129, 0.28);
}

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

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(33, 37, 41, 0.12);
  border: 1px solid rgba(222, 226, 230, 0.85);
}

.search-panel h2,
.section-head h2,
.page-hero h1 {
  margin: 0;
  color: #212529;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.search-panel p {
  margin: 10px 0 0;
  color: #6c757d;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 150px 110px;
  gap: 12px;
  align-items: center;
}

.search-form input,
.search-form select,
.filter-bar input {
  width: 100%;
  height: 48px;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  color: #212529;
  outline: none;
}

.search-form input:focus,
.search-form select:focus,
.filter-bar input:focus {
  border-color: #486581;
  box-shadow: 0 0 0 4px rgba(72, 101, 129, 0.12);
}

.search-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.link-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e9ecef;
}

.link-card img {
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: #e9ecef;
}

.link-card strong,
.link-card em {
  display: block;
}

.link-card strong {
  color: #212529;
  font-size: 14px;
  line-height: 1.35;
}

.link-card em {
  margin-top: 6px;
  color: #6c757d;
  font-size: 12px;
  font-style: normal;
}

.section-block {
  padding: 72px 0 0;
}

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

.section-head a {
  color: #334e68;
  font-weight: 700;
}

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

.category-tile {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f0f4f8 0%, #faf9f7 100%);
  border: 1px solid #dee2e6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.rank-item:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(33, 37, 41, 0.12);
}

.category-tile span {
  color: #212529;
  font-size: 18px;
  font-weight: 800;
}

.category-tile strong {
  color: #486581;
  font-size: 28px;
}

.category-tile em {
  color: #6c757d;
  font-size: 13px;
  font-style: normal;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e9ecef;
  box-shadow: 0 10px 28px rgba(33, 37, 41, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e9ecef;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #212529;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #334e68;
}

.meta-line,
.card-desc {
  margin: 0;
  color: #6c757d;
  font-size: 13px;
}

.card-desc {
  margin-top: 8px;
  min-height: 42px;
}

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

.tag-row span {
  color: #334e68;
  background: #f0f4f8;
  backdrop-filter: none;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #e9ecef;
}

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

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #486581;
  font-weight: 800;
}

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #212529;
}

.rank-body p {
  margin: 0 0 12px;
  color: #6c757d;
  font-size: 14px;
}

.rank-meta span {
  color: #495057;
  background: #f0f4f8;
}

.page-main {
  padding: 28px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  color: #6c757d;
  font-size: 14px;
}

.breadcrumb a {
  color: #334e68;
  font-weight: 700;
}

.breadcrumb span::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 10px;
  color: #adb5bd;
}

.breadcrumb.dark {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb.dark a {
  color: #ffffff;
}

.page-hero {
  padding: 48px;
  border-radius: 30px;
  background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 55%, #faf9f7 100%);
  border: 1px solid #e9ecef;
  box-shadow: 0 18px 44px rgba(33, 37, 41, 0.08);
}

.slim-hero p,
.category-hero span,
.ranking-hero span {
  max-width: 760px;
  color: #6c757d;
  font-size: 17px;
}

.category-hero,
.ranking-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.ranking-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #212529 0%, #334e68 100%);
}

.ranking-hero h1,
.ranking-hero p,
.ranking-hero span {
  color: #ffffff;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.category-card {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-title {
  color: #212529;
  font-size: 24px;
  font-weight: 800;
}

.category-card p {
  color: #6c757d;
}

.category-count {
  color: #486581;
  font-weight: 800;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-links a {
  color: #334e68;
  background: #f0f4f8;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
}

.filter-bar input {
  max-width: 420px;
}

.filter-bar span {
  color: #6c757d;
}

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

.full-rank {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-main {
  padding-bottom: 72px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  color: #ffffff;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.2)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #121416 0%, rgba(18, 20, 22, 0.1) 42%, transparent 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 42px 0 74px;
}

.detail-info {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
  margin-top: 120px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  background: #343a40;
}

.detail-info h1 {
  margin: 0 0 18px;
  max-width: 840px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  margin-top: -64px;
  position: relative;
  z-index: 4;
}

.player-card,
.detail-side,
.detail-text article {
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  box-shadow: 0 18px 42px rgba(33, 37, 41, 0.1);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54));
}

.play-mask span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #212529;
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.play-mask.hidden {
  display: none;
}

.player-title {
  padding: 24px;
}

.player-title h2,
.detail-side h2,
.detail-text h2 {
  margin: 0 0 10px;
  color: #212529;
  font-size: 24px;
}

.player-title p,
.detail-text p {
  margin: 0;
  color: #495057;
}

.detail-side {
  padding: 22px;
  align-self: start;
}

.detail-side .link-card + .link-card {
  margin-top: 12px;
}

.detail-text {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.detail-text article {
  padding: 28px;
}

.detail-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-nav a,
.detail-nav span {
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  color: #334e68;
  font-weight: 700;
}

.site-footer {
  margin-top: 72px;
  padding: 34px 0;
  color: #ced4da;
  background: #212529;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-brand {
  color: #ffffff;
  font-weight: 800;
}

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

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

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

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

  .watch-layout,
  .full-rank,
  .rank-list.two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(33, 37, 41, 0.14);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 92px;
  }

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

  .search-panel,
  .search-form,
  .category-hero,
  .ranking-hero,
  .filter-bar,
  .section-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .search-panel {
    padding: 22px;
  }

  .search-form {
    display: grid;
  }

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

  .category-grid,
  .category-cards,
  .search-results {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
  }

  .detail-info {
    grid-template-columns: 1fr;
    margin-top: 58px;
  }

  .detail-cover {
    width: 210px;
  }

  .detail-hero {
    min-height: 760px;
  }
}
