:root {
  --primary-900: #102a43;
  --primary-800: #243b53;
  --primary-700: #334e68;
  --primary-600: #486581;
  --primary-50: #f0f4f8;
  --accent-500: #ffc107;
  --accent-300: #ffd54f;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 20px -2px rgba(0, 0, 0, 0.10), 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  --shadow-hard: 0 10px 40px -5px rgba(0, 0, 0, 0.20), 0 20px 50px -10px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-soft);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  color: var(--slate-900);
  letter-spacing: -0.04em;
}

.brand-text em {
  color: var(--slate-500);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: var(--primary-800);
  background: var(--primary-50);
}

.top-search,
.inline-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.inline-search input,
.mobile-search input,
.page-search-box input {
  width: 240px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
}

.top-search input:focus,
.inline-search input:focus,
.mobile-search input:focus,
.page-search-box input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(72, 101, 129, 0.18);
}

.top-search button,
.inline-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--slate-900);
  background: var(--accent-500);
  font-weight: 800;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--slate-700);
  background: var(--slate-100);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 16px;
  border-top: 1px solid var(--slate-200);
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.hero-section {
  background: var(--slate-900);
}

.hero-stage {
  position: relative;
  height: 600px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 193, 7, 0.20), transparent 28%), linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(36, 59, 83, 0.80), rgba(15, 23, 42, 0.88));
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  color: var(--white);
}

.hero-kicker {
  width: fit-content;
  margin-bottom: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--accent-300);
  background: rgba(255, 193, 7, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 740px;
  margin: 0 0 32px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.hero-meta,
.quick-links,
.card-meta,
.detail-meta,
.tag-row,
.rank-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-button,
.glass-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  padding: 14px 26px;
  color: var(--slate-900);
  background: var(--accent-500);
  box-shadow: var(--shadow-hard);
}

.primary-button:hover,
.glass-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.glass-button {
  padding: 13px 22px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.11);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent-500);
}

.quick-search-panel {
  padding: 28px 16px 0;
}

.quick-search-inner {
  width: min(1180px, 100%);
  margin: -38px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.quick-search-inner h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

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

.quick-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-800);
  font-size: 13px;
  font-weight: 700;
}

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

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(90deg, var(--primary-50), var(--slate-50));
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 0;
  color: var(--slate-600);
}

.section-link {
  color: var(--primary-700);
  font-size: 15px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-200);
}

.card-cover img,
.mini-card img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card:hover .card-cover img,
.mini-card:hover img {
  transform: scale(1.06);
}

.card-cover img,
.mini-card img {
  transition: transform 0.35s ease;
}

.card-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--primary-700);
}

.card-body p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta span,
.detail-meta span,
.tag-row span,
.rank-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 700;
}

.card-meta {
  justify-content: space-between;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 20px;
  scrollbar-width: thin;
}

.mini-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.mini-card img {
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  background: var(--slate-200);
}

.mini-card strong {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card em {
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
}

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

.category-tile a {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--slate-900);
  background: var(--accent-500);
  font-weight: 900;
}

.category-tile h2 {
  margin: 18px 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0 0 16px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.7;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.category-samples a {
  min-height: auto;
  display: block;
  padding: 0;
  color: var(--primary-700);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--primary-800));
}

.compact-hero {
  padding: 70px max(16px, calc((100% - 1180px) / 2));
}

.compact-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.06em;
}

.compact-hero p {
  max-width: 780px;
  margin: 0;
  color: #e2e8f0;
  line-height: 1.8;
}

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

.breadcrumb a:hover {
  color: var(--accent-300);
}

.page-search-box {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.page-search-box input {
  width: min(520px, 100%);
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 20px;
  padding: 14px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 16px;
  background: var(--slate-200);
}

.rank-cover b {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--slate-900);
  background: var(--accent-500);
  box-shadow: var(--shadow-soft);
}

.rank-content h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 14px;
  color: var(--slate-600);
  line-height: 1.65;
}

.detail-hero {
  padding: 32px max(16px, calc((100% - 1180px) / 2)) 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  margin-top: 34px;
}

.detail-poster {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 24px;
  background: var(--slate-200);
  box-shadow: var(--shadow-hard);
}

.detail-kicker {
  margin-bottom: 14px;
  color: var(--accent-300);
  font-weight: 800;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-info .primary-button {
  margin-top: 26px;
}

.player-section {
  padding: 52px max(16px, calc((100% - 1180px) / 2));
  background: #08111f;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-hard);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(15, 23, 42, 0.28), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-900);
  background: var(--accent-500);
  font-size: 30px;
  box-shadow: var(--shadow-hard);
}

.play-overlay strong {
  font-size: 20px;
}

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

.detail-content {
  padding-bottom: 0;
}

.movie-article {
  border-radius: 24px;
  padding: clamp(24px, 5vw, 42px);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.movie-article h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.movie-article h2:not(:first-child) {
  margin-top: 34px;
}

.movie-article p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 1.95;
}

.empty-state {
  display: none;
  margin-top: 30px;
  padding: 24px;
  border-radius: 18px;
  color: var(--slate-600);
  background: var(--slate-100);
  text-align: center;
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 14px;
}

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

.footer-links h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

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

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

.footer-links a:hover {
  color: var(--accent-300);
}

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

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

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

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

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

  .brand-text strong {
    font-size: 18px;
  }

  .hero-stage {
    height: 580px;
  }

  .hero-content {
    width: min(100% - 28px, 1180px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .glass-button {
    width: 100%;
  }

  .quick-search-panel {
    padding-top: 16px;
  }

  .quick-search-inner {
    margin-top: 0;
    border-radius: 20px;
  }

  .inline-search,
  .mobile-search,
  .page-search-box,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .top-search input,
  .inline-search input,
  .mobile-search input,
  .page-search-box input {
    width: 100%;
  }

  .content-section {
    width: min(100% - 28px, 1180px);
    padding: 50px 0;
  }

  .soft-section {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

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

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

  .horizontal-row {
    grid-auto-columns: 280px;
  }

  .rank-item {
    grid-template-columns: 108px 1fr;
    gap: 14px;
  }

  .rank-content p,
  .rank-tags {
    display: none;
  }

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

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

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