:root {
  --color-ocean-dark: #0a2540;
  --color-ocean-primary: #1a4d7a;
  --color-ocean-light: #2e6ba8;
  --color-sea-foam: #4fb3bf;
  --color-sand: #f4e8d0;
  --color-coral: #ff6b6b;
  --color-sunset: #ff9f43;
  --color-sky: #74b9ff;
  --color-ink: #eef8ff;
  --color-muted: rgba(255, 255, 255, 0.68);
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-ink);
  background: linear-gradient(180deg, var(--color-ocean-dark), var(--color-ocean-primary) 46%, var(--color-ocean-dark));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 12% 18%, rgba(79, 179, 191, 0.22), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(255, 159, 67, 0.18), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(116, 185, 255, 0.18), transparent 40%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  height: 74px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky));
  box-shadow: 0 12px 32px rgba(79, 179, 191, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a,
.mobile-links a {
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-links a:hover,
.mobile-links a.active {
  color: #fff;
  background: rgba(79, 179, 191, 0.18);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: #fff;
  border-radius: 14px;
  background: var(--glass);
}

.mobile-links {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-links.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
  transform: scale(1.04);
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(10, 37, 64, 0.96), rgba(10, 37, 64, 0.66) 46%, rgba(10, 37, 64, 0.24)), linear-gradient(180deg, rgba(10, 37, 64, 0.08), rgba(10, 37, 64, 0.88));
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  margin: 0 auto;
  padding: 92px 24px 118px;
}

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

.hero-kicker,
.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 900px;
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.hero-title-accent,
.gradient-text {
  background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky), var(--color-sunset));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.tag,
.movie-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-sea-foam), #3a9aa5);
}

.btn-primary:hover {
  box-shadow: 0 16px 34px rgba(79, 179, 191, 0.32);
}

.btn-warm {
  background: linear-gradient(135deg, var(--color-coral), var(--color-sunset));
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 36px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--color-sea-foam);
}

.main-section {
  padding: 78px 24px;
}

.main-section.alt {
  background: linear-gradient(180deg, rgba(26, 77, 122, 0.54), rgba(10, 37, 64, 0.18));
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.section-head p,
.lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--color-muted);
  line-height: 1.85;
}

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

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.info-card:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 179, 191, 0.52);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(79, 179, 191, 0.18), rgba(255, 159, 67, 0.12));
}

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

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

.poster::after,
.category-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.9);
}

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

.movie-card h3,
.category-card h3,
.rank-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.featured-card {
  position: relative;
  min-height: 520px;
}

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

.featured-card .movie-card-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

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

.category-card {
  position: relative;
  min-height: 230px;
}

.category-cover {
  position: absolute;
  inset: 0;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  outline: none;
  background: rgba(10, 37, 64, 0.74);
}

.filter-panel input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--color-muted);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--color-coral), var(--color-sunset));
}

.rank-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
}

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

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(10, 37, 64, 0.18), rgba(10, 37, 64, 0.52));
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky));
  box-shadow: 0 18px 42px rgba(79, 179, 191, 0.38);
}

.play-circle span {
  margin-left: 5px;
  font-size: 38px;
}

.player-message {
  display: none;
  padding: 14px 18px;
  color: #fff;
  background: rgba(255, 107, 107, 0.22);
}

.detail-title {
  margin: 28px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.article-block {
  padding: 26px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

.side-cover {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
}

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

.side-cover-body {
  padding: 18px;
}

.site-footer {
  padding: 42px 24px;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 37, 64, 0.55);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

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

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

  .side-cover {
    max-width: 420px;
  }
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .hero {
    min-height: 86vh;
  }

  .hero-content {
    padding-top: 76px;
  }

  .hero-controls {
    right: auto;
    left: 24px;
  }

  .section-head,
  .footer-wrap {
    display: block;
  }

  .grid-featured,
  .grid-cards,
  .category-grid,
  .grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-card a {
    grid-template-columns: 48px 72px minmax(0, 1fr);
  }

  .rank-extra {
    display: none;
  }
}

@media (max-width: 520px) {
  .nav-wrap {
    height: 66px;
    padding: 0 16px;
  }

  .mobile-links {
    padding-right: 16px;
    padding-left: 16px;
  }

  .logo span:last-child {
    font-size: 17px;
  }

  .main-section {
    padding: 54px 16px;
  }

  .hero-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .grid-featured,
  .grid-cards,
  .category-grid,
  .grid-wide {
    gap: 12px;
  }

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

  .movie-card h3,
  .category-card h3,
  .rank-card h3 {
    font-size: 15px;
  }

  .featured-card {
    min-height: 420px;
  }
}
