* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e5f5f9;
  background: #07121f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.24), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(20, 184, 166, 0.22), transparent 28%),
    linear-gradient(135deg, #06111d 0%, #0f172a 48%, #042f2e 100%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
}

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

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

button,
input {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, rgba(17, 94, 89, 0.96), rgba(22, 78, 99, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(103, 232, 249, 0.18);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #22d3ee, #14b8a6);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.36);
}

.brand-name {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #a5f3fc, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.nav-link {
  color: #d9fbff;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #67e8f9;
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
}

.nav-search input,
.mobile-search input,
.large-search input,
.filter-search input {
  min-width: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}

.nav-search input {
  width: 160px;
  padding: 10px 0 10px 16px;
}

.nav-search button,
.mobile-search button,
.large-search button {
  color: #02131d;
  cursor: pointer;
  background: linear-gradient(90deg, #67e8f9, #2dd4bf);
  border: 0;
  transition: filter 0.2s ease, transform 0.2s ease;
}

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

.nav-search button:hover,
.mobile-search button:hover,
.large-search button:hover {
  filter: brightness(1.1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 12px;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: #cffafe;
  border-radius: 99px;
}

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

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

.mobile-link {
  padding: 8px 0;
  color: #d9fbff;
  border-bottom: 1px solid rgba(103, 232, 249, 0.12);
}

.mobile-search input {
  flex: 1;
  padding: 12px 16px;
}

.mobile-search button {
  padding: 12px 18px;
}

.hero-carousel {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  height: min(700px, 72vh);
  min-height: 520px;
  margin: 24px auto 0;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.16)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 48%);
}

.hero-content {
  position: absolute;
  right: 8%;
  bottom: 10%;
  left: 7%;
  max-width: 720px;
}

.hero-tags,
.hero-labels,
.card-meta,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-tags span,
.hero-labels span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  color: #dffcff;
  background: rgba(8, 145, 178, 0.72);
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 20px;
  color: #d1d5db;
  font-size: clamp(16px, 2.2vw, 20px);
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #02131d;
  background: linear-gradient(90deg, #67e8f9, #2dd4bf);
  box-shadow: 0 14px 36px rgba(45, 212, 191, 0.34);
}

.ghost-button {
  color: #e0faff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transform: translateY(-50%);
}

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

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

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

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 46px;
  background: #67e8f9;
}

.content-section,
.search-page-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 64px auto;
}

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-link,
.text-button {
  color: #001018;
  background: #67e8f9;
}

.movie-grid,
.wide-grid,
.ranking-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 26px 60px rgba(8, 145, 178, 0.2);
  transform: translateY(-6px);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

.movie-card:hover .card-poster img {
  filter: saturate(1.15) contrast(1.08);
  transform: scale(1.07);
}

.card-poster::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #05232d;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #67e8f9, #2dd4bf);
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.32);
}

.card-body {
  padding: 18px;
}

.card-meta {
  margin-bottom: 10px;
  color: #67e8f9;
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.24);
  content: "•";
}

.card-body h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #67e8f9;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #a8b7c7;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  padding: 3px 8px;
  color: #c9fbff;
  font-size: 12px;
  background: rgba(8, 145, 178, 0.22);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 178px;
}

.movie-card.compact .card-poster {
  height: 100%;
  aspect-ratio: auto;
}

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.2));
}

.category-tile span,
.category-tile b {
  position: absolute;
  left: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 48px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.category-tile b {
  right: 18px;
  bottom: 18px;
  color: #a5f3fc;
  font-size: 13px;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 54px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(20, 184, 166, 0.26), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.72));
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #b6c9d5;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #9bdce7;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

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

.category-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 22px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 24px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

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

.category-card h2 {
  margin: 4px 0 10px;
  color: white;
}

.category-card p {
  color: #a8b7c7;
}

.filter-panel {
  display: grid;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 22px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-row span {
  min-width: 48px;
  color: #a5f3fc;
  font-weight: 800;
}

.filter-row button {
  padding: 7px 13px;
  color: #d9fbff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
}

.filter-row button.active,
.filter-row button:hover {
  color: #02131d;
  background: #67e8f9;
}

.filter-search input {
  width: min(420px, 100%);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
}

.empty-state {
  display: none;
  padding: 32px;
  color: #a5f3fc;
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 20px;
}

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

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

.search-page-panel {
  padding: 30px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 24px;
}

.large-search {
  max-width: 720px;
  margin: 0 auto 28px;
}

.large-search input {
  flex: 1;
  padding: 16px 20px;
}

.large-search button {
  padding: 16px 26px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 64px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-header {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
  margin: 10px 0 14px;
  color: white;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.detail-info p {
  color: #b7c8d8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 12px;
  color: #dffcff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
}

.player-card,
.article-card,
.side-card {
  margin-top: 26px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.player-shell {
  position: relative;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.42);
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.48) saturate(1.12);
}

.player-button {
  position: relative;
  z-index: 3;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  color: #02131d;
  font-size: 34px;
  cursor: pointer;
  background: linear-gradient(135deg, #67e8f9, #2dd4bf);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(45, 212, 191, 0.42);
}

.player-title {
  padding: 18px 22px;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.article-card {
  padding: 28px;
}

.article-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: white;
}

.article-card p {
  margin: 0 0 18px;
  color: #b7c8d8;
}

.side-card {
  padding: 18px;
}

.related-list {
  display: grid;
  gap: 16px;
}

.related-list .movie-card.compact {
  grid-template-columns: 96px 1fr;
  min-height: 144px;
  background: rgba(2, 6, 23, 0.28);
}

.site-footer {
  margin-top: 80px;
  color: #b7c8d8;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), #020617);
  border-top: 1px solid rgba(103, 232, 249, 0.14);
}

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

.footer-brand p {
  max-width: 440px;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

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

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(103, 232, 249, 0.1);
}

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

  .menu-button {
    display: block;
  }

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

  .wide-grid,
  .ranking-grid,
  .ranking-list,
  .category-list,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .brand-name {
    font-size: 17px;
  }

  .hero-carousel {
    height: 620px;
    min-height: 620px;
    border-radius: 20px;
  }

  .hero-content {
    right: 20px;
    bottom: 74px;
    left: 20px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    right: auto;
    left: 20px;
  }

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

  .wide-grid,
  .ranking-grid,
  .ranking-list,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 24px;
  }

  .category-card,
  .detail-header {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

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

  .nav-inner,
  .content-section,
  .search-page-panel,
  .page-hero,
  .filter-panel,
  .detail-layout {
    width: min(100% - 24px, 1180px);
  }
}
