:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 16px 30px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), #ffffff 420px);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: white;
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-text small {
  margin-top: -4px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.logo-footer .logo-text small {
  color: var(--gray-400);
}

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

.nav-link {
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.quick-search input,
.mobile-search input,
.search-panel input,
.filter-row input,
.filter-row select {
  min-width: 0;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: white;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input {
  width: 210px;
  padding: 9px 14px;
}

.quick-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.quick-search button,
.mobile-search button,
.search-panel button,
.player-overlay,
.primary-button,
.outline-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.quick-search button,
.mobile-search button,
.search-panel button,
.primary-button {
  color: white;
  background: var(--emerald-600);
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.20);
}

.quick-search button {
  padding: 9px 16px;
}

.quick-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.player-overlay:hover,
.primary-button:hover {
  background: var(--emerald-700);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--gray-700);
  background: transparent;
  cursor: pointer;
}

.menu-button:hover {
  background: var(--gray-100);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 10px 12px;
  color: var(--gray-700);
  border-radius: 10px;
  font-weight: 650;
}

.mobile-link:hover {
  color: var(--emerald-600);
  background: var(--gray-100);
}

.mobile-search input {
  flex: 1;
  padding: 10px 14px;
}

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

.hero {
  position: relative;
  width: 100%;
  min-height: 68vh;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: 68vh;
  margin: 0 auto;
}

.hero-copy {
  width: min(680px, 100%);
  color: white;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 12px;
  color: white;
  background: var(--emerald-600);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2.4vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 30px;
  color: white;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.outline-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

.outline-button:hover {
  background: rgba(255, 255, 255, 0.23);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.30);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

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

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

.main-shell {
  padding: 42px 0 70px;
}

.page-shell {
  padding: 48px 0 76px;
}

.content-section {
  margin-top: 64px;
}

.content-section:first-child {
  margin-top: 0;
}

.section-head,
.page-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head a {
  flex-shrink: 0;
  color: var(--emerald-600);
  font-size: 15px;
  font-weight: 750;
}

.section-head a:hover {
  color: var(--emerald-700);
}

.page-title {
  margin-bottom: 32px;
}

.page-title p,
.category-intro,
.detail-title p {
  max-width: 780px;
  color: var(--gray-600);
  font-size: 17px;
}

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

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

.movie-card {
  overflow: hidden;
  background: white;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.cover-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-200);
}

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

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

.cover-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82));
  opacity: 0.86;
}

.type-badge,
.score-badge,
.cover-meta {
  position: absolute;
  z-index: 2;
  color: white;
}

.type-badge {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  background: var(--emerald-600);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.score-badge {
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.cover-meta {
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
}

.card-body {
  padding: 14px;
}

.card-body h3,
.horizontal-info h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.horizontal-info a:hover h3 {
  color: var(--emerald-600);
}

.card-body p,
.horizontal-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: flex;
  min-height: 160px;
  padding: 24px;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  background: linear-gradient(135deg, var(--emerald-600), var(--gray-900));
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(5, 150, 105, 0.24);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.category-card span {
  margin-top: 20px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: white;
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800));
  border-radius: 14px;
  font-weight: 900;
}

.rank-cover {
  width: 92px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-200);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: var(--gray-500);
  font-size: 13px;
}

.rank-score {
  color: var(--emerald-600);
  font-size: 24px;
  font-weight: 900;
}

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

.breadcrumb a:hover {
  color: var(--emerald-600);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050505;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: white;
  background: radial-gradient(circle at center, rgba(5, 150, 105, 0.35), rgba(0, 0, 0, 0.62));
  border-radius: 24px;
  font-size: 18px;
}

.player-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  color: white;
  background: var(--emerald-600);
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.30);
  font-size: 30px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  color: white;
  background: rgba(127, 29, 29, 0.92);
  border-radius: 12px;
  font-size: 14px;
}

.player-error.visible {
  display: block;
}

.poster-panel {
  overflow: hidden;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

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

.poster-panel-body {
  padding: 18px;
}

.poster-panel-body h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-title {
  margin: 28px 0 18px;
}

.detail-meta span {
  color: var(--gray-700);
  background: white;
  border: 1px solid var(--gray-200);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  margin-top: 34px;
}

.article-box {
  padding: 26px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.article-box + .article-box {
  margin-top: 20px;
}

.article-box h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-box p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.85;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

.horizontal-card {
  display: flex;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
}

.horizontal-cover {
  width: 120px;
  flex-shrink: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--gray-200);
  border-radius: 12px;
}

.horizontal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horizontal-info {
  min-width: 0;
  padding: 4px 4px 4px 0;
}

.horizontal-info h3 {
  font-size: 15px;
  -webkit-line-clamp: 1;
}

.card-meta {
  margin-top: 9px;
  color: var(--gray-500);
  font-size: 12px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.search-panel input {
  width: 100%;
  padding: 13px 16px;
}

.search-panel button {
  padding: 0 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--gray-500);
  background: white;
  border: 1px dashed var(--gray-300);
  border-radius: 20px;
}

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

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

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

.footer-brand p {
  max-width: 520px;
  color: var(--gray-400);
  font-size: 14px;
  line-height: 1.8;
}

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

.footer-links h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 16px;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--emerald-500);
}

.footer-bottom {
  padding: 20px 16px;
  color: var(--gray-400);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 60px;
  }

  .logo-text small {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 90px;
  }

  .hero-image::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.86));
  }

  .hero-arrow {
    display: none;
  }

  .main-shell,
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .section-head,
  .page-title-row {
    align-items: start;
    flex-direction: column;
  }

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

  .category-grid,
  .footer-shell,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 82px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    font-size: 18px;
  }

  .poster-panel {
    display: none;
  }

  .article-box {
    padding: 20px;
  }

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

@media (max-width: 430px) {
  .movie-grid,
  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 14px;
  }

  .category-card {
    min-height: 140px;
  }
}
