:root {
  --color-primary: #ea580c;
  --color-primary-dark: #c2410c;
  --color-red: #dc2626;
  --color-amber: #f59e0b;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-soft: #f9fafb;
  --color-line: #e5e7eb;
  --shadow-soft: 0 16px 40px rgba(17, 24, 39, 0.12);
  --shadow-card: 0 10px 24px rgba(17, 24, 39, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(180deg, #fff7ed 0, #f9fafb 260px, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.detail-page {
  background: #f9fafb;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--color-primary), var(--color-red));
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.site-logo {
  color: #ffffff;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.logo-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #ffffff;
}

.logo-text {
  font-size: 21px;
}

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

.site-nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: #ffedd5;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.page-search-form {
  display: flex;
  align-items: center;
}

.header-search {
  width: 285px;
  position: relative;
}

.header-search input,
.mobile-search input,
.page-search-form input {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
}

.header-search input {
  height: 38px;
  padding: 0 76px 0 18px;
}

.header-search button,
.mobile-search button,
.page-search-form button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
}

.header-search button {
  position: absolute;
  right: 4px;
  height: 30px;
  padding: 0 14px;
}

.mobile-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  padding: 6px 20px 18px;
  background: #c2410c;
}

.mobile-nav-link {
  display: block;
  padding: 12px 0;
  color: #ffffff;
  font-weight: 700;
}

.mobile-search {
  gap: 8px;
  padding-top: 8px;
}

.mobile-search input {
  height: 40px;
  padding: 0 16px;
}

.mobile-search button {
  height: 40px;
  padding: 0 18px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.18));
}

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

.hero-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  color: #ffffff;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.86);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.detail-tags span {
  color: var(--color-primary-dark);
  background: #ffedd5;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-primary), var(--color-red));
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.32);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(234, 88, 12, 0.9);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 28px;
  background: #ffffff;
}

main {
  min-height: 60vh;
}

.content-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0;
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - 1180px) / 2));
  padding-right: max(20px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--color-muted);
  line-height: 1.7;
}

.section-heading > a,
.text-link {
  color: var(--color-primary-dark);
  font-weight: 800;
}

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

.movie-card,
.movie-list-card,
.detail-card,
.side-card,
.category-overview-card,
.ranking-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .movie-cover img,
.movie-list-card:hover img,
.compact-card:hover img,
.ranking-item:hover img {
  transform: scale(1.08);
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 62%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-primary);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.movie-card h3,
.movie-list-card h2,
.ranking-copy h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.movie-list-card h2 a:hover,
.ranking-copy h2 a:hover,
.detail-info a:hover {
  color: var(--color-primary-dark);
}

.movie-card p,
.movie-list-card p,
.ranking-copy p {
  display: -webkit-box;
  margin: 9px 0 14px;
  color: var(--color-muted);
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span:first-child,
.detail-meta span:first-child {
  color: #d97706;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card img,
.category-card span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.category-card span {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.76));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 18px;
}

.category-card strong {
  margin-top: 98px;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.category-card em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
}

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

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

.ranking-item {
  position: relative;
  display: grid;
  grid-template-columns: 126px 48px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  overflow: hidden;
}

.ranking-cover {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
}

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

.ranking-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-red));
  font-weight: 900;
}

.page-hero {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 70px 20px;
  color: #ffffff;
  text-align: center;
  background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.8), transparent 30%), linear-gradient(135deg, #111827, #7c2d12 55%, #dc2626);
}

.page-hero > div {
  width: min(900px, 100%);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 16px auto 0;
  max-width: 740px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 1.8;
}

.page-hero .hero-kicker {
  margin-bottom: 16px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  padding: 18px;
  align-items: center;
}

.category-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumb-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--color-muted);
  line-height: 1.7;
}

.tag-link-cloud a {
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

.page-search-form {
  max-width: 640px;
  margin: 28px auto 0;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.page-search-form input {
  height: 50px;
  padding: 0 20px;
  background: #ffffff;
}

.page-search-form button {
  height: 50px;
  padding: 0 26px;
  margin-left: 8px;
}

.search-empty {
  padding: 28px;
  border-radius: var(--radius-md);
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
  text-align: center;
}

.search-item.is-hidden {
  display: none;
}

.detail-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--color-primary-dark);
  font-weight: 800;
}

.player-card,
.detail-card,
.side-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-red));
  box-shadow: 0 20px 46px rgba(234, 88, 12, 0.42);
  font-size: 34px;
}

.player-overlay.is-hidden {
  display: none;
}

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

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.side-card h2 {
  margin-top: 0;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-card p {
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-card .one-line {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

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

.detail-info div {
  padding: 14px;
  border-radius: 12px;
  background: #f9fafb;
}

.detail-info dt {
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}

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

.detail-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.side-card {
  padding: 20px;
}

.poster-card {
  overflow: hidden;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
  margin-bottom: 16px;
}

.poster-card .btn {
  width: 100%;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: #f9fafb;
}

.compact-card img {
  width: 88px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
  transition: transform 0.35s ease;
}

.compact-card span {
  color: #111827;
  font-weight: 800;
  line-height: 1.45;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
}

.list-cover {
  position: relative;
  overflow: hidden;
  background: #111827;
}

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

.list-body {
  padding: 20px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  font-size: 23px;
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 420px;
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-links div {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #9ca3af;
}

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

.footer-bottom {
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 1024px) {
  .header-search {
    display: none;
  }

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

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

  .home-ranking,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .ranking-item {
    grid-template-columns: 110px 42px 1fr;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .logo-text {
    font-size: 18px;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content {
    width: calc(100% - 32px);
  }

  .hero-content p {
    font-size: 15px;
  }

  .content-section,
  .detail-layout,
  .footer-inner {
    width: calc(100% - 28px);
  }

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

  .ranking-item {
    grid-template-columns: 96px 38px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .ranking-copy p,
  .ranking-copy .movie-meta span:nth-child(3) {
    display: none;
  }

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

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

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