* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-text small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #334155;
  font-weight: 600;
  font-size: 15px;
}

.desktop-nav a:hover,
.nav-dropdown:hover > a {
  color: #2563eb;
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-menu {
  position: absolute;
  top: 58px;
  left: 0;
  width: 230px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
}

.dropdown-menu a:hover {
  background: #eff6ff;
  color: #2563eb;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.header-search input,
.mobile-search input {
  width: 240px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-input-large:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  background: #ffffff;
}

.header-search button,
.mobile-search button {
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

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

.mobile-links {
  display: grid;
  gap: 12px;
  padding: 16px 0 20px;
}

.mobile-links a {
  font-weight: 600;
  color: #334155;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  width: 100%;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.65) 46%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #60a5fa;
  font-size: 15px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 640px;
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.section {
  padding: 70px 0;
}

.section-white {
  background: #ffffff;
}

.section-muted {
  background: #f8fafc;
}

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

.section-dark {
  background: #0f172a;
  color: #ffffff;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.section-title p {
  margin: 8px 0 0;
  max-width: 640px;
  color: #64748b;
  line-height: 1.8;
}

.section-dark .section-title p {
  color: #cbd5e1;
}

.section-link {
  flex-shrink: 0;
  color: #2563eb;
  font-weight: 700;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 16px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: 0.25s ease;
}

.movie-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
  opacity: 0;
  transition: 0.25s ease;
}

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

.movie-category,
.movie-type {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.movie-category {
  top: 10px;
  left: 10px;
  background: rgba(37, 99, 235, 0.92);
}

.movie-type {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.75);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card:hover h3,
.rank-info a:hover,
.category-panel a:hover h2 {
  color: #2563eb;
}

.movie-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f1f5f9;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.tag-row-large span {
  padding: 8px 12px;
  font-size: 14px;
}

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

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

.category-tile,
.category-panel {
  display: block;
  min-height: 210px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: 0.25s ease;
}

.category-tile:hover,
.category-panel:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.category-tile strong,
.category-panel h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.category-tile p,
.category-panel p {
  margin: 0 0 18px;
  color: #64748b;
  line-height: 1.7;
}

.category-tile div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tile span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.category-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #475569;
}

.category-panel li a:hover {
  color: #2563eb;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 22px;
}

.movie-card-horizontal {
  grid-column: span 2;
}

.movie-card-horizontal .movie-card-link {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 18px;
  padding: 16px;
}

.movie-card-horizontal .movie-cover {
  border-radius: 12px;
}

.movie-card-horizontal .movie-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}

.dark-cta {
  text-align: center;
}

.dark-cta h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
}

.dark-cta p {
  max-width: 680px;
  margin: 0 auto 28px;
  color: #cbd5e1;
  line-height: 1.8;
}

.page-hero {
  padding: 64px 0;
  background: linear-gradient(135deg, #2563eb, #334155);
  color: #ffffff;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.045em;
}

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

.category-hero,
.ranking-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 65%, #334155 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filter-panel input,
.filter-panel select,
.search-input-large {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.filter-panel input {
  flex: 1 1 280px;
}

.filter-panel select {
  flex: 0 0 160px;
}

.empty-state {
  display: none;
  padding: 40px;
  border-radius: 16px;
  background: #ffffff;
  color: #64748b;
  text-align: center;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 190px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.rank-number {
  color: #2563eb;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

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

.rank-info p {
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.7;
}

.search-shell {
  min-height: 520px;
}

.search-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
}

.search-input-large {
  flex: 1;
}

.search-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 20px;
}

.search-result-title h2 {
  margin: 0;
  font-size: 28px;
}

.search-result-title p {
  margin: 0;
  color: #64748b;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a {
  min-width: 42px;
  padding: 10px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  text-align: center;
  font-weight: 700;
}

.pagination a:hover,
.pagination a.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.player-section {
  padding: 28px 0 42px;
  background: #020617;
}

.player-section .breadcrumb {
  color: #94a3b8;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.05));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.32);
  font-size: 34px;
  padding-left: 5px;
}

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

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

.detail-main,
.detail-side {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.detail-main {
  padding: 32px;
}

.detail-main h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.05em;
}

.detail-main h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-main p {
  color: #334155;
  line-height: 1.9;
}

.detail-main .lead {
  margin-top: 22px;
  color: #1e293b;
  font-size: 18px;
}

.detail-side {
  position: sticky;
  top: 92px;
  overflow: hidden;
  padding-bottom: 18px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0f172a;
}

.btn-block {
  width: calc(100% - 32px);
  margin: 18px 16px 0;
}

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

.site-footer {
  padding: 48px 0 24px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand-text strong {
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .hero {
    height: 520px;
  }

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

  .section {
    padding: 50px 0;
  }

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

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

  .movie-card-horizontal {
    grid-column: auto;
  }

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

  .rank-card {
    grid-template-columns: 54px 120px 1fr;
  }

  .rank-info h2 {
    font-size: 18px;
  }

  .rank-info p {
    display: none;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

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

  .hero {
    height: 500px;
  }

  .hero-meta span {
    padding: 6px 10px;
    font-size: 13px;
  }

  .hero-actions,
  .search-panel,
  .mobile-search {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .search-panel button {
    width: 100%;
  }

  .movie-grid,
  .category-grid,
  .category-grid-large,
  .editor-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-cover {
    display: none;
  }

  .detail-main {
    padding: 24px;
  }

  .player-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
