* {
  box-sizing: border-box;
}

:root {
  --bg-start: #fff7ed;
  --bg-mid: #ffffff;
  --bg-end: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-start), var(--bg-mid) 36%, var(--bg-end));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1280px, 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(229, 231, 235, 0.85);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: transparent;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  font-size: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

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

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.top-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input,
.mobile-search input {
  width: 250px;
  padding: 10px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.top-search button,
.mobile-search button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  color: #ffffff;
  font-weight: 700;
  background: var(--orange);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  background: var(--orange-dark);
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.22);
  transform: translateY(-1px);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.ghost-btn.dark {
  color: var(--orange-dark);
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(255, 247, 237, 0.8);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--orange-dark);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel-logo {
  font-weight: 800;
  color: var(--orange-dark);
}

.hero-section {
  padding: 32px 0 16px;
}

.hero-card {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
  background: #111827;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 56px);
  right: clamp(24px, 6vw, 56px);
  bottom: clamp(30px, 6vw, 58px);
  max-width: 780px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  background: var(--orange);
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.28);
}

.hero-content h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-meta span {
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

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

.hero-mini-list {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 10px;
  width: min(280px, 30vw);
}

.hero-mini {
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.hero-mini img {
  width: 66px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-mini span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 700;
}

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

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

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

.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: 26px;
  line-height: 1.2;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--orange-dark);
  background: #fff7ed;
  border-radius: 12px;
}

.section-more {
  color: var(--orange-dark);
  font-weight: 700;
}

.section-more:hover {
  text-decoration: underline;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f3f4f6;
}

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-title {
  display: block;
  overflow: hidden;
  margin-bottom: 7px;
  color: #111827;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-title:hover {
  color: var(--orange-dark);
}

.movie-card-body p {
  overflow: hidden;
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.movie-meta span,
.tag-row span {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 8px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.2;
  background: #f3f4f6;
  border-radius: 999px;
}

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

.tag-row span {
  color: #c2410c;
  background: #ffedd5;
}

.rank-home {
  max-width: 960px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 12px;
}

.rank-item a {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item a:hover {
  color: var(--orange-dark);
}

.rank-item span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.cta-panel,
.page-hero,
.filter-panel,
.content-card {
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 32px auto 56px;
  padding: 30px;
}

.cta-panel h2,
.content-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.cta-panel p,
.content-card p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  margin-top: 32px;
  padding: 42px;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34%), linear-gradient(135deg, #111827, #3b2412 56%, #7c2d12);
  color: #ffffff;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 48px);
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  background: #111827;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.14));
}

.category-card div {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  overflow: hidden;
  display: -webkit-box;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
}

.secondary-btn {
  align-self: end;
  height: 44px;
  padding: 0 18px;
  color: var(--orange-dark);
  font-weight: 800;
  background: #ffedd5;
}

.secondary-btn:hover {
  background: #fed7aa;
}

.empty-state {
  margin-bottom: 16px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border-radius: 14px;
  background: #ffffff;
}

.detail-layout {
  padding: 32px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--orange-dark);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-2xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #f3f4f6;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

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

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
}

.detail-one-line {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 18px;
}

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

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

.detail-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.large-tags {
  margin-bottom: 22px;
}

.player-section {
  padding: 34px 0 0;
}

.video-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-2xl);
  background: #000000;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
}

.video-player video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.video-overlay-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: #ffffff;
  font-size: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.video-overlay-play:hover {
  background: var(--orange-dark);
}

.video-player.playing .video-overlay-play {
  opacity: 0;
  pointer-events: none;
}

.video-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  color: #ffffff;
  font-size: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
}

.video-status:not(:empty) {
  padding: 7px 12px;
}

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

.content-card {
  padding: 24px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  padding: 34px 0 56px;
}

.rank-list-large {
  align-self: start;
  position: sticky;
  top: 92px;
}

.hidden-by-filter {
  display: none !important;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 28px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 14px;
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer a:not(.site-logo) {
  display: block;
  margin: 7px 0;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--orange-dark);
}

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

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

  .filter-panel {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .rank-list-large {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-card {
    min-height: 560px;
  }

  .hero-content {
    bottom: 28px;
  }

  .hero-mini-list {
    display: none;
  }

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

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

  .detail-poster {
    max-width: 320px;
  }

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

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

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

  .site-logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
  }

  .hero-section {
    padding-top: 18px;
  }

  .hero-card {
    min-height: 500px;
    border-radius: 18px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 34px;
  }

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

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

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

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

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

  .page-hero,
  .detail-hero,
  .content-card,
  .cta-panel {
    padding: 22px;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .video-overlay-play {
    width: 62px;
    height: 62px;
  }

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