* {
  box-sizing: border-box;
}

:root {
  --bg: #0a0e1a;
  --bg-soft: #111827;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(245, 158, 11, 0.22);
  --border-soft: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #f97316;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.14), transparent 28rem),
    linear-gradient(180deg, #0a0e1a 0%, #0d1322 45%, #0a0e1a 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.glass {
  border: 1px solid var(--border-soft);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #111827;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.28);
}

.logo-text {
  background: linear-gradient(90deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #e5e7eb;
  font-weight: 600;
}

.nav a,
.nav button {
  border: 0;
  color: inherit;
  background: transparent;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav button:hover,
.nav .active {
  color: var(--amber);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: 100%;
  width: 220px;
  padding: 8px;
  margin-top: 14px;
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #e5e7eb;
}

.dropdown-panel a:hover {
  background: rgba(255, 255, 255, 0.10);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

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

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu a:hover,
.mobile-menu .active {
  color: var(--amber);
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #0a0e1a 0%, rgba(10, 14, 26, 0.76) 42%, rgba(10, 14, 26, 0.25) 100%),
    linear-gradient(90deg, rgba(10, 14, 26, 0.82) 0%, rgba(10, 14, 26, 0.35) 52%, rgba(10, 14, 26, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 76px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  font-size: 0.85rem;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  line-height: 1.02;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 640px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 1.12rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.22);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  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);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--amber);
}

.section {
  padding: 64px 0 0;
}

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.section-heading p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--amber);
  font-weight: 800;
  white-space: nowrap;
}

.more-link:hover {
  color: var(--amber-light);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster img,
.large-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 48%);
}

.year-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  color: #f9fafb;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.70);
  font-size: 0.78rem;
  font-weight: 700;
}

.type-badge {
  left: 10px;
  right: auto;
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(10, 14, 26, 0.74);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1.08rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.large-card:hover h3,
.rank-item:hover h3 {
  color: var(--amber);
}

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

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.large-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
}

.large-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--radius);
}

.large-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.large-card:first-child {
  grid-row: span 2;
  min-height: 666px;
}

.large-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.20));
}

.large-info {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
}

.large-info h3 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
}

.large-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #d1d5db;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  display: block;
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.40);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-item {
  display: flex;
  gap: 16px;
  padding: 14px;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.rank-thumb {
  position: relative;
  flex: 0 0 148px;
  height: 92px;
  overflow: hidden;
  border-radius: 12px;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-badge {
  left: 8px;
  right: auto;
  top: 8px;
  color: #111827;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.rank-content h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 1.03rem;
}

.rank-content p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.88rem;
}

.page-title {
  padding: 58px 0 22px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px 190px;
  gap: 12px;
  padding: 16px;
  margin: 22px 0 28px;
  border-radius: var(--radius);
}

.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.filter-panel select option {
  color: #111827;
}

.empty-state {
  display: none;
  padding: 34px;
  color: var(--muted);
  text-align: center;
  border-radius: var(--radius);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 530px;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(0.95);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #0a0e1a 0%, rgba(10, 14, 26, 0.78) 46%, rgba(10, 14, 26, 0.32) 100%),
    linear-gradient(90deg, #0a0e1a 0%, rgba(10, 14, 26, 0.58) 60%, rgba(10, 14, 26, 0.30) 100%);
}

.detail-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  min-height: 530px;
  padding: 80px 0 58px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.05;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.4);
}

.detail-intro {
  max-width: 820px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #d1d5db;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 40px;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: 24px;
}

.player-card {
  padding: 18px;
}

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

.player-title h2 {
  margin: 0;
  font-size: 1.38rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.70), rgba(10, 14, 26, 0.24));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 38px rgba(245, 158, 11, 0.28);
  font-size: 2rem;
}

.content-card {
  padding: 28px;
  margin-top: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 18px;
  color: var(--amber-light);
  font-size: 1.35rem;
}

.content-card p {
  margin: 0 0 18px;
  color: #d1d5db;
  line-height: 1.85;
}

.side-card {
  padding: 18px;
  position: sticky;
  top: 90px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.side-item:hover h3 {
  color: var(--amber);
}

.side-item img {
  width: 108px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
}

.side-item h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.96rem;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted-2);
  font-size: 0.8rem;
}

.search-box {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin: 28px 0;
  border-radius: var(--radius);
}

.search-box .btn {
  flex: 0 0 auto;
}

.search-results {
  min-height: 260px;
}

.site-footer {
  margin-top: 78px;
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.82);
}

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

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 14px;
  color: var(--amber);
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
}

.footer-grid a {
  display: block;
  margin: 9px 0;
}

.footer-grid a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.9rem;
}

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

  .movie-grid.three,
  .large-grid,
  .detail-main {
    grid-template-columns: 1fr;
  }

  .large-card:first-child {
    min-height: 360px;
  }

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

  .detail-content {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .side-card {
    position: static;
  }
}

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

  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .mobile-menu.is-open {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 84px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding-top: 46px;
  }

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

  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-thumb {
    flex-basis: 128px;
    height: 82px;
  }

  .filter-panel,
  .search-box {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .detail-content {
    grid-template-columns: 1fr;
    align-items: end;
    padding-top: 54px;
  }

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

  .detail-main {
    padding-top: 22px;
  }

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