:root {
  --color-blue: #2563eb;
  --color-cyan: #06b6d4;
  --color-deep: #0f172a;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --color-line: #e5e7eb;
  --color-soft: #f8fafc;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 15px 35px rgba(15, 23, 42, 0.14);
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand {
  font-size: clamp(18px, 3vw, 26px);
  white-space: nowrap;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0ea5e9;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.22);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 650;
}

.desktop-nav a,
.nav-dropdown > a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > a:hover {
  color: #cffafe;
}

.nav-dropdown {
  position: relative;
  padding: 20px 0;
}

.dropdown-panel {
  position: absolute;
  top: 58px;
  left: -18px;
  width: 190px;
  padding: 8px;
  color: #334155;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  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;
}

.dropdown-panel a:hover {
  color: var(--color-blue);
  background: #eff6ff;
}

.header-search {
  position: relative;
  width: min(280px, 30vw);
}

.header-search input,
.mobile-search input,
.page-search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.header-search input {
  height: 40px;
  padding: 0 44px 0 16px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 14px 16px 18px;
  background: #1d4ed8;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-weight: 650;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mobile-search input {
  height: 40px;
  padding: 0 14px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  cursor: pointer;
}

.mobile-search button {
  padding: 0 16px;
}

.mobile-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  color: #dbeafe;
}

.hero-carousel {
  position: relative;
  min-height: 540px;
  height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 100%;
}

.hero-copy {
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.25);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.category-overview-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 52px;
  padding: 0 30px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 32px rgba(6, 182, 212, 0.26);
}

.primary-btn:hover,
.category-overview-head a:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  min-height: 52px;
  padding: 0 26px;
  color: #ffffff;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #ffffff;
}

.content-section {
  padding: 58px 0;
}

.soft-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.soft-orange {
  background: linear-gradient(135deg, #fff7ed, #fefce8);
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #1f2937;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-heading h2 span {
  color: #f97316;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.section-link,
.category-overview-head a {
  flex: 0 0 auto;
  color: var(--color-cyan);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbeafe;
}

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

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 38px;
  background: rgba(15, 23, 42, 0.36);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.year-badge,
.rank-badge,
.side-rank {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(8px);
}

.year-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info h3 {
  color: var(--color-cyan);
}

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

.movie-meta span {
  padding: 4px 8px;
  color: #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 750;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 34px;
}

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

.side-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.side-card a {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
}

.side-thumb {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  background: #dbeafe;
}

.side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-rank {
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 13px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.side-info {
  min-width: 0;
  padding: 12px 12px 12px 0;
}

.side-info h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: #1f2937;
  font-size: 16px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-info p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-info span {
  color: var(--color-cyan);
  font-weight: 800;
  font-size: 13px;
}

.category-panel {
  align-self: start;
  padding: 28px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: var(--shadow-card);
}

.category-panel h2,
.category-panel p {
  margin-top: 0;
}

.category-chip-grid,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip-grid a,
.category-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.category-chip-grid a {
  padding: 9px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.category-preview + .category-preview {
  margin-top: 48px;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.7), transparent 36%), linear-gradient(135deg, #1e40af, #0891b2);
}

.compact-hero {
  padding: 76px 0 70px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.category-overview {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.category-overview-head p {
  margin: 0;
  color: var(--color-muted);
}

.category-tabs {
  margin-bottom: 28px;
}

.category-tabs a {
  padding: 9px 14px;
  color: #334155;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-tabs a.is-current {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 42px;
  flex-wrap: wrap;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 42px;
  padding: 9px 12px;
  text-align: center;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.pagination strong {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.rankings-page {
  display: grid;
  gap: 58px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 24px;
}

.detail-wrap {
  padding: 40px 0 64px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(330px, 0.8fr);
  gap: 32px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000000;
  cursor: pointer;
}

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

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

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
}

.player-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
  transform: translate(-50%, -50%);
  font-size: 36px;
}

.detail-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.breadcrumb a {
  color: var(--color-cyan);
  font-weight: 800;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
}

.detail-card h2 {
  margin: 20px 0 10px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  color: #475569;
}

.lead-text {
  font-weight: 800;
  color: #334155 !important;
}

.detail-meta {
  margin-bottom: 22px;
}

.detail-meta span {
  color: #2563eb;
  background: #eff6ff;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag-cloud span {
  padding: 8px 12px;
  border-radius: 12px;
  color: #475569;
  background: #f1f5f9;
  font-weight: 750;
}

.detail-aside h2 {
  margin: 0 0 18px;
}

.sticky-side {
  position: sticky;
  top: 88px;
}

.page-search {
  display: flex;
  gap: 12px;
  width: min(680px, 100%);
  margin-top: 26px;
}

.page-search input {
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
}

.page-search button {
  min-width: 110px;
  padding: 0 24px;
  font-weight: 800;
}

.search-summary {
  margin-bottom: 22px;
  color: var(--color-muted);
  font-weight: 750;
}

.site-footer {
  padding: 48px 0 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
}

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

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

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

.footer-bottom {
  margin-top: 36px;
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

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

  .compact-grid,
  .two-column-section,
  .ranking-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero-carousel {
    min-height: 560px;
    height: 76vh;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.36));
  }

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

  .section-heading,
  .category-overview-head {
    align-items: start;
    flex-direction: column;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    min-height: 44px;
    font-size: 15px;
  }

  .movie-info p {
    min-height: 38px;
    font-size: 12px;
  }

  .side-card a {
    grid-template-columns: 122px minmax(0, 1fr);
  }

  .side-thumb {
    min-height: 100px;
  }

  .content-section {
    padding: 42px 0;
  }

  .compact-hero {
    padding: 54px 0;
  }

  .page-search {
    flex-direction: column;
  }

  .page-search button {
    min-height: 48px;
  }

  .player-play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

@media (max-width: 460px) {
  .brand span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .movie-grid,
  .large-grid,
  .compact-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
