:root {
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --emerald-50: #ecfdf5;
  --gray-950: #020617;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.22);
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: #f8fafc;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.96), rgba(16, 185, 129, 0.96));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green-700);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.25);
}

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

.desktop-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.header-search button {
  padding: 10px 16px;
  color: var(--green-800);
  font-weight: 800;
  background: #ffffff;
  border: 0;
  cursor: pointer;
}

.menu-button {
  display: none;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  color: #ffffff;
  background: radial-gradient(circle at top left, #34d399 0, #047857 34%, #111827 100%);
}

.hero-track {
  position: relative;
  min-height: 660px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 52px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 86px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  filter: blur(3px);
}

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

.hero-content {
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--green-700);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content .eyebrow,
.hero-content .section-kicker,
.page-hero .section-kicker,
.detail-info .section-kicker {
  color: #a7f3d0;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.tag-filter-row button {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 700;
  background: #d1fae5;
  border-radius: 999px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.watch-link,
.big-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 900;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.watch-link,
.big-search button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--green-600), var(--green-500));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.watch-link:hover,
.big-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.34);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 520px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.hero-poster::after,
.poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.56));
  pointer-events: none;
}

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

.hero-poster:hover img,
.movie-card:hover .poster-image {
  transform: scale(1.04);
}

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

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

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

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

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -52px;
  padding: 28px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-card h2 {
  margin: 0;
  color: var(--gray-900);
  line-height: 1.16;
}

.quick-search-panel p,
.section-heading p {
  margin: 6px 0 0;
  color: var(--gray-600);
}

.big-search {
  display: flex;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 999px;
}

.big-search input {
  width: 100%;
  min-width: 0;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  outline: 0;
}

.big-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.section-heading > a {
  color: var(--green-700);
  font-weight: 900;
}

.section-heading.centered {
  justify-content: center;
  text-align: center;
}

.section-heading.compact h2 {
  font-size: 28px;
}

.category-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-tile,
.category-overview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-name,
.category-overview-head h2 {
  color: var(--gray-900);
  font-size: 20px;
  font-weight: 900;
}

.category-count {
  color: var(--green-700);
  font-weight: 900;
}

.category-desc,
.category-overview-card p {
  color: var(--gray-600);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-700), var(--gray-900));
}

.poster-fallback {
  position: absolute;
  inset: auto 14px 14px;
  z-index: 2;
  display: none;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.46);
}

.image-missing .poster-fallback {
  display: block;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-meta-line a {
  color: var(--green-700);
  font-weight: 900;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-actions {
  justify-content: space-between;
  margin-top: 14px;
  color: var(--gray-500);
  font-size: 13px;
}

.watch-link {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 28px;
}

.hot-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.hot-list,
.ranking-list {
  display: grid;
  gap: 14px;
}

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

.movie-card-horizontal .poster {
  aspect-ratio: 3 / 4;
  height: 100%;
}

.movie-card-horizontal .movie-card-body {
  min-width: 0;
}

.movie-card-horizontal h3 {
  min-height: auto;
  font-size: 16px;
}

.movie-card-horizontal p {
  min-height: auto;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.recommend-section {
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer a {
  display: block;
  margin: 6px 0;
  color: #d1fae5;
}

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

.page-hero {
  padding: 76px 0;
  color: #ffffff;
}

.green-hero,
.ranking-hero,
.search-hero {
  background: radial-gradient(circle at 18% 10%, rgba(167, 243, 208, 0.45), transparent 32%), linear-gradient(135deg, var(--green-800), var(--gray-900));
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 7vw, 64px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-overview-head span {
  color: #ffffff;
  padding: 5px 10px;
  font-weight: 900;
  background: var(--green-600);
  border-radius: 999px;
}

.category-overview-card ul {
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
}

.category-overview-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px dashed #d1d5db;
}

.category-overview-card li a {
  color: var(--gray-900);
  font-weight: 800;
}

.category-overview-card li span {
  color: var(--gray-500);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px;
  gap: 16px;
  margin-bottom: 26px;
  padding: 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  outline-color: var(--green-500);
}

.tag-filter-row {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-filter-row button {
  border: 0;
  cursor: pointer;
}

.tag-filter-row button.is-active {
  color: #ffffff;
  background: var(--green-600);
}

.detail-hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  filter: blur(4px);
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #111827 10%, rgba(17, 24, 39, 0.72), #111827 90%);
}

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

.detail-hero-content {
  position: relative;
  padding: 42px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a {
  color: #a7f3d0;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  min-height: 450px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(34px, 6vw, 64px);
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.info-list div {
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
}

.info-list dt {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 900;
}

.info-list dd {
  margin: 2px 0 0;
  color: #ffffff;
  font-weight: 800;
}

.big-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.player-section {
  padding: 54px 0 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
  border: 0;
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding-left: 5px;
  color: var(--green-700);
  font-size: 34px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

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

.video-shell.is-playing .play-overlay {
  display: none;
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 30px 0;
}

.text-card {
  padding: 28px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.text-card h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.text-card p {
  margin: 0;
  color: var(--gray-700);
}

.search-result-head {
  margin-bottom: 22px;
}

.search-result-head h2 {
  margin: 0;
  font-size: 30px;
}

.search-result-head p {
  margin: 6px 0 0;
  color: var(--gray-600);
}

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

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

  .header-search {
    margin-left: auto;
  }

  .menu-button {
    display: inline-flex;
  }

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

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

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

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

  .hot-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

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

  .header-search {
    display: none;
  }

  .hero-carousel,
  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 54px 0 84px;
  }

  .hero-poster {
    min-height: 380px;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-top: -30px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .movie-grid.three,
  .footer-grid,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    width: min(100%, 320px);
    min-height: auto;
  }

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

@media (max-width: 540px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .big-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .big-search button {
    width: 100%;
  }

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

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