* {
  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", sans-serif;
  color: #1f2937;
  background: #f9fafb;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316 0%, #ef4444 52%, #ec4899 100%);
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.24);
}

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

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

.brand-text {
  font-size: 24px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #f97316;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.04);
}

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

.nav-link {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fed7aa;
  opacity: 1;
}

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.large-search input {
  width: 240px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 10px 44px 10px 16px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.header-search button {
  position: absolute;
  right: 12px;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

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

.mobile-search {
  gap: 10px;
  margin: 16px auto;
  width: min(1180px, 100%);
}

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

.mobile-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  color: #f97316;
  background: #ffffff;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-nav {
  display: grid;
  gap: 10px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.mobile-link {
  padding: 8px 0;
  font-weight: 700;
}

.hero {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #000000;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.62) 44%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 76px;
}

.hero-copy {
  width: min(760px, 100%);
  color: #ffffff;
}

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

.hero-kicker span {
  display: inline-flex;
  border-radius: 999px;
  background: #dc2626;
  padding: 6px 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.hero-kicker em {
  color: #fdba74;
  font-size: 14px;
  font-style: normal;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1;
  letter-spacing: -0.05em;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
  border-radius: 999px;
  color: #ea580c;
  background: #fff7ed;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: #ffffff;
  background: #ea580c;
  box-shadow: 0 12px 25px rgba(234, 88, 12, 0.32);
}

.btn-primary:hover,
.more-link:hover {
  transform: translateY(-2px);
  background: #c2410c;
  box-shadow: 0 18px 35px rgba(234, 88, 12, 0.36);
}

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

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: #f97316;
}

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

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #1f2937;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading h2 span {
  color: #ef4444;
}

.section-heading p {
  margin: 8px 0 0;
  color: #6b7280;
  line-height: 1.7;
}

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile span,
.category-tile p {
  position: absolute;
  left: 18px;
  right: 18px;
  color: #ffffff;
}

.category-tile span {
  bottom: 54px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p {
  bottom: 16px;
  margin: 0;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.45;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid #f3f4f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.14);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

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

.movie-year,
.movie-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.movie-year {
  top: 10px;
  left: 10px;
  background: #ea580c;
  padding: 5px 9px;
  font-size: 12px;
}

.movie-play {
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: rgba(234, 88, 12, 0.92);
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-play {
  opacity: 1;
  transform: scale(1);
}

.movie-body {
  padding: 14px;
}

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

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 12px;
}

.movie-line {
  min-height: 40px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.movie-tags {
  margin-bottom: 10px;
}

.category-mini {
  display: inline-flex;
  color: #ea580c;
  font-size: 12px;
  font-weight: 800;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.recommend-panel,
.detail-article,
.detail-side {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 44px 56px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: #fff7ed;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  transform: translateY(-2px);
  background: #ffedd5;
}

.rank-item strong {
  color: #dc2626;
  font-size: 22px;
}

.rank-item img {
  width: 56px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.rank-item em,
.rank-item small {
  display: block;
  font-style: normal;
}

.rank-item em {
  color: #111827;
  font-weight: 900;
}

.rank-item small {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.more-link {
  margin-top: 18px;
  color: #ffffff;
  background: #ea580c;
}

.inner-hero {
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.44), transparent 28%), linear-gradient(120deg, #111827 0%, #7f1d1d 55%, #be185d 100%);
  padding: 78px 0;
}

.inner-hero span {
  color: #fdba74;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.inner-hero p {
  max-width: 720px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.7;
}

.large-search {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 28px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  padding: 16px;
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  outline: none;
  background: #fff7ed;
  padding: 0 16px;
}

.filter-bar input {
  flex: 1 1 260px;
}

.filter-empty {
  border-radius: 18px;
  color: #9a3412;
  background: #ffedd5;
  padding: 18px;
  font-weight: 800;
}

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

.breadcrumb em {
  color: rgba(255, 255, 255, 0.5);
  font-style: normal;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(127, 29, 29, 0.6), rgba(0, 0, 0, 0.72));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 38px;
  align-items: center;
  padding: 62px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.7;
}

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

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

.detail-meta div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 14px;
}

.detail-meta dt {
  color: #fdba74;
  font-size: 12px;
  font-weight: 900;
}

.detail-meta dd {
  margin: 6px 0 0;
  color: #ffffff;
  font-weight: 800;
}

.watch-section {
  padding: 42px 0 12px;
}

.watch-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  aspect-ratio: 16 / 9;
}

.watch-video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.watch-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.watch-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.38);
  font-size: 34px;
}

.watch-box.playing .watch-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 30px 0 16px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  background: #fff7ed;
  padding: 10px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.side-list a:hover {
  transform: translateY(-2px);
  background: #ffedd5;
}

.side-list img {
  width: 64px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.side-list strong,
.side-list small {
  display: block;
}

.side-list strong {
  margin-bottom: 6px;
  color: #111827;
}

.side-list small {
  color: #6b7280;
}

.site-footer {
  margin-top: 42px;
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-brand .brand-mark {
  color: #ffffff;
  background: #f97316;
}

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

.site-footer p,
.site-footer li {
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.7;
}

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

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

.footer-bottom {
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  padding: 20px 16px;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
  cursor: pointer;
}

.back-top.show {
  display: block;
}

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

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

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

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

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

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

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

  .brand-text {
    font-size: 20px;
  }

  .hero {
    height: 520px;
  }

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

  .hero p,
  .inner-hero p,
  .detail-line {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn-primary,
  .btn-ghost,
  .more-link {
    min-height: 42px;
    padding: 0 16px;
  }

  .hero-dots {
    right: 16px;
    bottom: 24px;
  }

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

  .movie-body {
    padding: 12px;
  }

  .movie-line {
    display: none;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 0;
  }

  .detail-poster {
    width: min(220px, 70vw);
  }

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

  .watch-section {
    padding-top: 24px;
  }

  .watch-box {
    border-radius: 18px;
  }

  .watch-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

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

  .large-search,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .large-search input,
  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .category-grid.compact,
  .movie-grid,
  .movie-grid.slim,
  .rank-list.wide {
    grid-template-columns: 1fr;
  }

  .rank-item a {
    grid-template-columns: 36px 52px 1fr;
  }

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