* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: #1f2937;
  background: #f8fafc;
}

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);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.header-inner {
  width: min(100% - 32px, 1280px);
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0 10%, transparent 10% 22%, rgba(255, 255, 255, 0.75) 22% 32%, transparent 32% 44%, rgba(255, 255, 255, 0.75) 44% 54%, transparent 54% 66%, rgba(255, 255, 255, 0.75) 66% 76%, transparent 76%),
    linear-gradient(135deg, #d97706, #ea580c);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #d97706, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
  color: #374151;
}

.desktop-nav > a,
.nav-dropdown > a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown > a.is-active {
  color: #d97706;
}

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

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 192px;
  padding: 8px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #4b5563;
}

.dropdown-panel a:hover {
  background: #fffbeb;
  color: #d97706;
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
}

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

.top-search input {
  height: 40px;
  padding: 0 44px 0 18px;
  border-radius: 999px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.top-search button {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.top-search button:hover {
  color: #d97706;
  background: #fffbeb;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  background: #ffffff;
}

.mobile-panel a {
  display: block;
  padding: 10px 4px;
  color: #374151;
  font-weight: 600;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.mobile-category-links a {
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 8px;
}

.mobile-search input {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

.mobile-search button,
.btn,
.filter-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-search button,
.btn-primary {
  color: #ffffff;
  background: #f59e0b;
}

.mobile-search button {
  padding: 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

.btn-soft {
  color: #92400e;
  background: #fffbeb;
}

.hero {
  position: relative;
  min-height: 500px;
  height: 58vh;
  max-height: 640px;
  overflow: hidden;
  background: #111827;
}

.hero-media {
  position: absolute;
  inset: 0;
}

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

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.12));
}

.hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: #f59e0b;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 30px;
  max-width: 680px;
  color: #e5e7eb;
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.7;
}

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

.main-wrap {
  padding: 48px 0 64px;
}

.section {
  margin-bottom: 64px;
}

.section-soft {
  padding: clamp(28px, 4vw, 48px);
  border-radius: 32px;
  background: linear-gradient(90deg, #fff7ed, #fef3c7, #fefce8);
}

.section-cool {
  padding: clamp(28px, 4vw, 48px);
  border-radius: 32px;
  background: linear-gradient(135deg, #f0fdfa, #ecfeff, #eff6ff);
}

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

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

.section-title .icon {
  font-size: 28px;
}

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #1f2937;
}

.section-title h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-more {
  color: #d97706;
  font-weight: 700;
}

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

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  height: 232px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #78350f);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
  pointer-events: none;
}

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

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

.cover-badge,
.duration-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.cover-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: #f59e0b;
}

.duration-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-body {
  padding: 18px;
}

.movie-body h3 {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a {
  transition: color 0.2s ease;
}

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

.movie-body p {
  margin: 0 0 16px;
  min-height: 44px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta span:first-child {
  color: #d97706;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
}

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

.movie-card-horizontal .movie-cover {
  height: 100%;
  min-height: 190px;
}

.movie-card-large .large-cover {
  height: 320px;
}

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

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

.category-icon {
  font-size: 42px;
  transition: transform 0.25s ease;
}

.category-tile:hover .category-icon {
  transform: scale(1.12);
}

.category-name {
  color: #374151;
  font-weight: 800;
}

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

.rank-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.13);
}

.rank-num {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-size: 20px;
  font-weight: 800;
}

.rank-copy h3 {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 18px;
}

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

.rank-copy .movie-meta {
  justify-content: flex-start;
}

.page-hero {
  padding: 48px 0;
  color: #ffffff;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.page-hero.cool {
  background: linear-gradient(90deg, #14b8a6, #0891b2);
}

.page-hero.dark {
  background: linear-gradient(90deg, #111827, #78350f);
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.04em;
}

.page-title p {
  max-width: 820px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.7;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar-card {
  position: sticky;
  top: 88px;
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.sidebar-card h2,
.sidebar-card h3 {
  margin: 0 0 16px;
  color: #1f2937;
}

.sidebar-card h2 {
  font-size: 20px;
}

.sidebar-card h3 {
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
}

.filter-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-input,
.filter-select {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
}

.filter-button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  background: #f9fafb;
  color: #4b5563;
  text-align: left;
}

.filter-button:hover,
.filter-button.is-active {
  background: #fef3c7;
  color: #b45309;
}

.category-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill-row a,
.category-pill-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
}

.category-pill-row a:hover {
  background: #fef3c7;
  color: #b45309;
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  color: #4b5563;
}

.view-switch {
  display: flex;
  gap: 8px;
}

.view-switch button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #e5e7eb;
  color: #4b5563;
  cursor: pointer;
}

.view-switch button.is-active {
  background: #fef3c7;
  color: #d97706;
}

.movie-list.is-list {
  display: grid;
  grid-template-columns: 1fr;
}

.movie-list.is-list .movie-card {
  display: grid;
  grid-template-columns: 230px 1fr;
}

.movie-list.is-list .movie-cover {
  height: 100%;
  min-height: 180px;
}

.search-panel {
  padding: 26px;
  margin-bottom: 30px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.search-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-panel input {
  min-height: 50px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
}

.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: #14b8a6;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

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

.player-card {
  overflow: hidden;
  border-radius: 16px;
  background: #050505;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

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

.player-shell video {
  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(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-button {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 36px;
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  transform: translateX(3px);
}

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

.detail-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.detail-title h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: #6b7280;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
}

.detail-section {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.85;
}

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

.side-link {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 86px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.side-link h3 {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.35;
}

.side-link p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #d97706;
}

.hidden-card {
  display: none !important;
}

.empty-state {
  padding: 54px 24px;
  border-radius: 18px;
  background: #ffffff;
  color: #6b7280;
  text-align: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(180deg, #1f2937, #111827);
}

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

.site-footer h3 {
  margin: 0 0 16px;
  color: #fbbf24;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.75;
}

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

.footer-links a {
  color: #d1d5db;
  font-size: 14px;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

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

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

  .hero {
    min-height: 560px;
  }

  .hero-media::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.84));
  }

  .hero-inner {
    align-items: flex-end;
    padding-bottom: 48px;
  }

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

  .sidebar-card {
    position: static;
  }

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

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

  .card-grid.two,
  .card-grid.three,
  .card-grid.four,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card-horizontal .movie-cover,
  .movie-list.is-list .movie-cover {
    height: 220px;
  }

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

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

  .search-panel button {
    min-height: 46px;
  }

  .player-button {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
