* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e2e8f0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.26);
  transition: transform 0.22s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.1);
}

.brand-icon.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-name,
.footer-brand span:last-child {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #e2e8f0;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.site-search {
  display: flex;
  align-items: center;
}

.search-box {
  position: relative;
  display: block;
}

.search-box input {
  width: 260px;
  height: 40px;
  padding: 0 18px 0 42px;
  color: #ffffff;
  background: #334155;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, width 0.2s ease;
}

.search-box input:focus {
  width: 300px;
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.search-mark {
  position: absolute;
  left: 15px;
  top: 50%;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.mobile-toggle {
  display: none;
  color: #ffffff;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 24px;
  padding: 8px 10px;
  cursor: pointer;
}

.mobile-toggle:hover {
  background: #334155;
}

.mobile-panel {
  display: none;
  padding: 12px 20px 18px;
  background: #1e293b;
  border-top: 1px solid #334155;
}

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

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  position: absolute;
  inset: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  padding: 0 0 64px;
  transform: translateX(-50%);
}

.hero-badge,
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  color: #ffffff;
  background: #06b6d4;
  border-radius: 999px;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.hero-title {
  max-width: 780px;
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.28);
}

.secondary-btn {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

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

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

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

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.58);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.active {
  width: 32px;
  background: #22d3ee;
}

.main-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 88px;
}

.main-wrap.compact {
  padding-top: 44px;
}

.content-section {
  margin: 0 0 80px;
}

.section-panel {
  padding: 32px;
  background: rgba(30, 41, 59, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(10px);
}

.panel-gradient {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.58), rgba(51, 65, 85, 0.45));
}

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

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(25px, 3vw, 36px);
}

.section-title h2 span {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22d3ee, #2563eb);
}

.section-title a {
  color: #22d3ee;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.scroll-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.scroll-row .poster-card {
  flex: 0 0 256px;
  scroll-snap-align: start;
}

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 18px;
  transition: transform 0.26s ease, box-shadow 0.26s ease, background 0.26s ease;
}

.movie-card:hover {
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  transform: translateY(-5px);
}

.large-card:hover {
  transform: scale(1.02);
}

.cover-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1e293b;
}

.poster-cover {
  aspect-ratio: 3 / 4;
}

.wide {
  aspect-ratio: 16 / 9;
}

.horizontal-cover {
  width: 188px;
  min-height: 148px;
  flex: 0 0 188px;
}

.cover-frame img {
  transition: transform 0.45s ease;
}

.movie-card:hover .cover-frame img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 64%);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.overlay-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 22px;
}

.card-body strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: #22d3ee;
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  color: #64748b;
  font-size: 13px;
}

.horizontal-card {
  display: flex;
  min-height: 148px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.24), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b 55%, #0f172a);
}

.page-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.crumbs a {
  color: #22d3ee;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.category-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 24px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 22px;
  transition: transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  background: rgba(51, 65, 85, 0.82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.category-card strong {
  color: #ffffff;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.65;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 18px;
}

.filter-bar input {
  flex: 1 1 260px;
  height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 999px;
  outline: none;
}

.filter-bar input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tags button {
  padding: 9px 14px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  cursor: pointer;
}

.filter-tags button:hover,
.filter-tags button.active {
  color: #ffffff;
  background: #06b6d4;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.85) 45%, rgba(15, 23, 42, 0.36) 100%), linear-gradient(0deg, #0f172a 0%, transparent 45%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  padding: 54px 0 64px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-info p {
  max-width: 830px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

.detail-tags span {
  padding: 7px 12px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  font-size: 14px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.28);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: 0;
  border-radius: 999px;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.36);
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.detail-article {
  margin-top: 28px;
  padding: 30px;
  background: rgba(30, 41, 59, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 22px;
}

.detail-article h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 1.88;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.info-panel {
  padding: 24px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 22px;
}

.info-panel h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  color: #cbd5e1;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding-bottom: 12px;
}

.info-list span:first-child {
  color: #94a3b8;
}

.search-results-note {
  margin: 0 0 22px;
  color: #94a3b8;
}

.empty-state {
  padding: 52px 24px;
  color: #94a3b8;
  text-align: center;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 22px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  border-top: 1px solid rgba(51, 65, 85, 0.9);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}

.footer-grid p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.75;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 10px 0;
  color: #94a3b8;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding-top: 24px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
}

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

@media (max-width: 1080px) {
  .desktop-nav,
  .site-search:not(.mobile-search) {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

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

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

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

@media (max-width: 820px) {
  .hero-carousel {
    height: 72vh;
    min-height: 520px;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .horizontal-card {
    display: block;
  }

  .horizontal-cover {
    width: 100%;
    min-height: auto;
    aspect-ratio: 3 / 4;
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }

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

@media (max-width: 560px) {
  .header-inner,
  .main-wrap,
  .page-hero-inner,
  .detail-hero-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1280px);
  }

  .brand-name {
    font-size: 18px;
  }

  .grid.large-grid,
  .grid.poster-grid,
  .grid.category-grid,
  .grid.horizontal-grid {
    grid-template-columns: 1fr;
  }

  .section-panel,
  .detail-article,
  .info-panel {
    padding: 20px;
  }

  .scroll-row .poster-card {
    flex-basis: 220px;
  }
}
