
* {
  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", Arial, sans-serif;
  color: #111827;
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 42%, #fffbeb 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.25);
}

.header-main,
.sub-nav,
.footer-wrap,
.container,
.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-main {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.logo-text strong {
  font-size: 21px;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #fb923c 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text em {
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: #9ca3af;
}

.header-search {
  position: relative;
  display: flex;
  flex: 1;
  max-width: 460px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-search input {
  height: 40px;
  padding: 0 92px 0 18px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #cbd5e1;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus,
.search-page-form input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  position: absolute;
  right: 4px;
  top: 4px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.main-nav a,
.sub-nav a,
.mobile-panel a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.sub-nav a:hover,
.mobile-panel a:hover {
  color: #fb923c;
}

.sub-nav {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.sub-nav a {
  white-space: nowrap;
  font-size: 14px;
  color: #e5e7eb;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  background: rgba(51, 65, 85, 0.85);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.mobile-search {
  position: relative;
  display: flex;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 34%, rgba(2, 6, 23, 0.22) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(2, 6, 23, 0.26) 58%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 88px;
  color: #ffffff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span,
.category-badges span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  background: #ffedd5;
}

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

.primary-btn,
.ghost-btn,
.rank-link,
.category-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.rank-link {
  color: #ffffff;
  background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.rank-link:hover,
.category-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  right: min(56px, 6vw);
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.container {
  padding: 56px 0;
}

.section-block {
  margin-bottom: 64px;
}

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

.section-head div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
}

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
}

.section-head a {
  color: #ea580c;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .movie-poster img,
.side-card:hover img,
.rank-row:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.72) 100%);
}

.movie-score {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
}

.rank-index {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.movie-card-body {
  padding: 18px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #ea580c;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
}

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

.movie-meta span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 42% 58%;
}

.movie-card-horizontal .movie-poster {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-horizontal .movie-card-body {
  padding: 18px 18px 16px;
}

.dark-feature {
  border-radius: 28px;
  padding: 34px;
  color: #ffffff;
  background: linear-gradient(120deg, #0f172a 0%, #1e293b 60%, #020617 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.dark-feature .section-head h2,
.dark-feature .section-head a {
  color: #ffffff;
}

.dark-feature .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

.category-hero,
.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 10% 20%, rgba(249, 115, 22, 0.38), transparent 24%), linear-gradient(90deg, #0f172a 0%, #1e293b 58%, #020617 100%);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  border-radius: 22px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.filter-input,
.filter-select {
  height: 44px;
  padding: 0 16px;
  color: #111827;
  background: #f8fafc;
}

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

.category-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 28px;
  padding: 26px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 45%, #0f172a 120%);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 55%, #0f172a 120%);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #111827 0%, #f97316 100%);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.category-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.category-link {
  align-self: flex-start;
  color: #111827;
  background: #ffffff;
}

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

.player-card,
.detail-card,
.side-panel,
.rank-row,
.search-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.player-card {
  overflow: hidden;
  background: #020617;
}

.cinema-player {
  position: relative;
  width: 100%;
  background: #000000;
}

.cinema-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.1));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding-left: 5px;
  color: #ffffff;
  font-size: 34px;
  cursor: pointer;
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
  box-shadow: 0 20px 48px rgba(249, 115, 22, 0.38);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

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

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

.detail-card h1 {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-meta {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-tags {
  margin-bottom: 24px;
}

.content-box {
  margin-top: 26px;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
}

.content-box h2 {
  margin: 0 0 12px;
  font-size: 23px;
}

.content-box p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
}

.side-panel {
  position: sticky;
  top: 102px;
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.side-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  transition: background 0.2s ease;
}

.side-card:hover {
  background: #f8fafc;
}

.side-card img {
  width: 118px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.side-card strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  line-height: 1.35;
}

.side-card em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 86px 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.rank-row .rank-number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.rank-row img {
  width: 180px;
  height: 108px;
  border-radius: 18px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.rank-row p {
  margin: 0 0 10px;
  color: #4b5563;
  line-height: 1.7;
}

.search-panel {
  padding: 26px;
  margin-bottom: 28px;
}

.search-page-form {
  position: relative;
  display: flex;
}

.search-page-form input {
  height: 50px;
  padding: 0 114px 0 18px;
  font-size: 16px;
  background: #f8fafc;
}

.search-page-form button {
  height: 42px;
}

.empty-state {
  display: none;
  border-radius: 24px;
  padding: 60px 24px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 44px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.footer-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0 34px;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.footer-links ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fb923c;
}

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

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

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

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

  .side-panel {
    position: static;
  }

  .rank-row {
    grid-template-columns: 58px 140px minmax(0, 1fr);
  }

  .rank-link {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 780px) {
  .header-search,
  .main-nav,
  .sub-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    height: 74vh;
    min-height: 540px;
  }

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

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

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 28px;
  }

  .container {
    padding: 38px 0;
  }

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

  .movie-grid,
  .movie-grid.three,
  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 48px 110px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-row img {
    width: 110px;
    height: 74px;
  }

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

  .rank-row p {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-main,
  .sub-nav,
  .footer-wrap,
  .container,
  .hero-content,
  .page-hero-inner,
  .mobile-panel {
    width: min(100% - 24px, 1180px);
  }

  .logo-text strong {
    font-size: 19px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .movie-grid,
  .movie-grid.three,
  .category-list {
    grid-template-columns: 1fr;
  }

  .dark-feature {
    padding: 22px;
  }

  .detail-card,
  .content-box,
  .side-panel {
    padding: 18px;
  }

  .side-card {
    grid-template-columns: 100px 1fr;
  }

  .side-card img {
    width: 100px;
    height: 68px;
  }
}
