* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.2), transparent 30rem),
    linear-gradient(135deg, #0f172a 0%, #172554 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.top-space {
  padding-top: 32px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 64, 175, 0.45);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ecfeff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
}

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

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #22d3ee;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e0f2fe;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(30, 64, 175, 0.4);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

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

.hero {
  margin-bottom: 34px;
}

.hero-stage {
  position: relative;
  height: 560px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(96, 165, 250, 0.08) inset;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.56), rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 8vw, 120px);
  bottom: clamp(58px, 10vw, 92px);
  z-index: 2;
  max-width: 760px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 12px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
}

.hero-content > span {
  display: block;
  margin-bottom: 12px;
  color: #bae6fd;
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 800;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #94a3b8;
  font-size: 14px;
}

.hero-meta span:not(:last-child)::after,
.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: #38bdf8;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
}

.small-btn {
  min-height: 36px;
  padding: 0 16px;
  color: #ecfeff;
  background: rgba(8, 145, 178, 0.26);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.small-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(8, 145, 178, 0.5);
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #22d3ee;
}

.home-tools,
.search-panel,
.ranking-strip,
.content-section,
.page-title,
.detail-hero,
.player-section,
.detail-content,
.category-card,
.ranking-row {
  border: 1px solid rgba(30, 64, 175, 0.35);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.24);
}

.home-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 24px;
  align-items: center;
  margin-bottom: 34px;
  padding: 24px;
  border-radius: 24px;
}

.home-tools h2,
.section-head h2,
.page-title h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: #f8fafc;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.home-tools h2,
.section-head h2,
.page-title h1 {
  font-size: clamp(26px, 4vw, 38px);
}

.home-tools p,
.page-title p,
.detail-content p,
.category-info p,
.ranking-info p {
  color: #aebbd0;
  line-height: 1.8;
}

.search-panel {
  padding: 10px;
  border-radius: 18px;
}

.search-panel input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 14px;
  outline: 0;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.45);
  padding: 0 16px;
}

.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.content-section,
.ranking-strip {
  margin: 34px 0;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 26px;
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.more-link {
  color: #22d3ee;
  font-weight: 800;
}

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

.wide-grid {
  margin-top: 24px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(30, 64, 175, 0.38);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.56);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 24px 56px rgba(34, 211, 238, 0.13);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 46%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  top: 10px;
  right: 10px;
  color: #422006;
  background: rgba(250, 204, 21, 0.92);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.82);
  backdrop-filter: blur(8px);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover {
  color: #22d3ee;
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.compact-card {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.compact-card img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.compact-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 36px 12px 12px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
}

.compact-card:hover img {
  transform: scale(1.08);
}

.page-shell {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #7dd3fc;
}

.page-title {
  margin-bottom: 24px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 26px;
}

.page-title > span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #22d3ee;
  font-weight: 900;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.55);
}

.category-card a {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 180px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: rgba(15, 23, 42, 0.8);
}

.category-thumbs img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}

.category-info {
  padding: 24px;
}

.category-info h2 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 24px;
}

.category-info span {
  color: #22d3ee;
  font-weight: 900;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 82px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
}

.ranking-number {
  color: #67e8f9;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.ranking-poster {
  display: block;
  width: 82px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.ranking-info h2 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 8px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  margin-bottom: 28px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.5);
}

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

.detail-intro h1 {
  margin: 18px 0 14px;
  color: #ffffff;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-intro p {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin-bottom: 8px;
}

.tag-list {
  margin: 20px 0 26px;
}

.player-section,
.detail-content {
  margin-bottom: 28px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 26px;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.34), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.32);
  font-size: 28px;
}

.detail-content p {
  margin: 0 0 22px;
  font-size: 16px;
}

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

.info-table div {
  padding: 16px;
  border: 1px solid rgba(30, 64, 175, 0.34);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
}

.info-table span {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 13px;
}

.info-table strong {
  color: #f8fafc;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(30, 64, 175, 0.36);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.75), rgba(30, 58, 138, 0.42), rgba(2, 6, 23, 0.75));
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #e0f2fe;
  font-size: 18px;
}

.footer-grid p,
.copyright {
  color: #94a3b8;
  line-height: 1.8;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid rgba(30, 64, 175, 0.26);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .desktop-nav {
    gap: 16px;
    font-size: 14px;
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

  .hero-stage {
    height: 520px;
    border-radius: 22px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 62px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .home-tools,
  .detail-hero,
  .footer-grid,
  .category-card a {
    grid-template-columns: 1fr;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 52px 70px minmax(0, 1fr);
  }

  .ranking-row .small-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-nav,
  .footer-grid,
  .copyright {
    width: min(100% - 20px, 1180px);
  }

  .brand {
    font-size: 19px;
  }

  .hero-stage {
    height: 500px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 32px;
  }

  .hero-content > span {
    font-size: 21px;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

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

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

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

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