:root {
  --color-bg: #f9fafb;
  --color-panel: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-blue: #2563eb;
  --color-blue-dark: #1d4ed8;
  --color-red: #dc2626;
  --color-yellow: #f59e0b;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 8px 20px rgba(15, 23, 42, 0.10);
  --radius-card: 18px;
}

* {
  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: var(--color-bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--color-blue);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #374151;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--color-line);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #374151;
  font-weight: 600;
}

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

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

.narrow-container {
  width: min(860px, calc(100% - 32px));
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #111827);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.18)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.24));
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  right: 16px;
  bottom: 70px;
  max-width: 760px;
  color: #ffffff;
}

.hero-tags,
.hero-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  background: var(--color-red);
}

.hero-tags span + span {
  background: var(--color-blue);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 19px;
}

.hero-meta {
  margin-bottom: 26px;
  color: #d1d5db;
  font-size: 15px;
}

.hero-meta span {
  padding: 5px 0;
}

.primary-button,
.ghost-button,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--color-blue);
}

.primary-button:hover {
  background: var(--color-blue-dark);
  transform: translateY(-1px);
}

.ghost-button,
.ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button:hover,
.ghost-action:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.search-band {
  background: #ffffff;
  border-bottom: 1px solid var(--color-line);
}

.search-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 0;
}

.search-band h2,
.search-band p {
  margin: 0;
}

.search-band p {
  margin-top: 4px;
  color: var(--color-muted);
}

.quick-search {
  width: min(480px, 100%);
  display: flex;
  gap: 10px;
}

.quick-search input,
.search-controls input,
.search-controls select,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 14px;
  background: #ffffff;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-search input:focus,
.search-controls input:focus,
.search-controls select:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-search button {
  min-width: 88px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--color-blue);
  font-weight: 800;
  cursor: pointer;
}

.home-sections {
  padding: 56px 0 72px;
}

.home-sections > section,
.related-section {
  margin-top: 64px;
}

.home-sections > section:first-child {
  margin-top: 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
}

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

.section-more,
.text-link {
  color: var(--color-blue);
  font-weight: 800;
}

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

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

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #111827);
}

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

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

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
  opacity: 1;
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: var(--color-red);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-info h3 a:hover {
  color: var(--color-blue);
}

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

.movie-meta,
.movie-tags,
.movie-stats,
.detail-meta,
.category-overview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta {
  margin-bottom: 12px;
  font-size: 13px;
}

.movie-meta a,
.category-pill {
  color: #1d4ed8;
  background: #dbeafe;
}

.movie-meta a,
.movie-meta span,
.tag,
.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span,
.tag {
  color: #4b5563;
  background: #f3f4f6;
}

.movie-tags {
  min-height: 26px;
}

.movie-stats {
  justify-content: space-between;
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 13px;
}

.category-section {
  margin-inline: -24px;
  padding: 42px 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-card {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.category-card:hover {
  color: #ffffff;
  background: var(--color-blue);
  transform: translateY(-4px);
}

.category-card strong {
  font-size: 20px;
}

.category-card span {
  color: var(--color-muted);
  font-size: 14px;
}

.category-card:hover span,
.category-card:hover em {
  color: rgba(255, 255, 255, 0.86);
}

.category-card em {
  color: var(--color-blue);
  font-style: normal;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
}

.ranking-list,
.compact-list {
  margin: 0;
  padding: 0;
}

.ranking-list {
  list-style: none;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-list li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-line);
}

.ranking-list li:last-child {
  border-bottom: 0;
}

.rank-number {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: var(--color-blue);
  font-weight: 900;
}

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

.movie-card-small {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.movie-card-small .movie-cover {
  aspect-ratio: 16 / 9;
  height: 100%;
}

.page-shell {
  padding: 34px 0 72px;
}

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

.breadcrumb a {
  color: var(--color-blue);
  font-weight: 700;
}

.breadcrumb span::before {
  content: "/";
  margin-right: 8px;
  color: #cbd5e1;
}

.page-hero-card,
.article-card,
.detail-card,
.side-card,
.player-card,
.toolbar,
.search-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.page-hero-card {
  margin-bottom: 28px;
  padding: 34px;
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(135deg, #ffffff, #eff6ff);
}

.page-hero-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero-card p {
  max-width: 820px;
  margin: 0;
  color: var(--color-muted);
  font-size: 17px;
}

.eyebrow,
.category-index {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 900;
}

.toolbar,
.search-panel {
  margin-bottom: 28px;
  padding: 20px;
}

.toolbar,
.search-controls {
  display: grid;
  grid-template-columns: 1.2fr 220px 180px;
  gap: 16px;
  align-items: end;
}

.toolbar-wide {
  grid-template-columns: 1fr 200px 190px 130px;
}

.toolbar label,
.search-controls label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.toolbar-count,
.search-count {
  color: var(--color-muted);
  font-weight: 800;
}

.search-count {
  margin: 18px 0 0;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-visual {
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e3a8a, #111827);
}

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

.category-overview-card h2 {
  margin: 12px 0 8px;
  font-size: 24px;
}

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

.category-overview-meta {
  margin-bottom: 12px;
}

.category-overview-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 132px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-large {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #111827;
}

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

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--color-muted);
}

.rank-score {
  min-width: 130px;
  text-align: right;
}

.rank-score strong {
  display: block;
  color: var(--color-yellow);
  font-size: 28px;
  line-height: 1;
}

.rank-score span {
  color: var(--color-muted);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
  background: #050505;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #050505;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-blue);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.38);
  font-size: 30px;
}

.player-start strong {
  font-size: 24px;
}

.player-start em {
  color: #e5e7eb;
  font-style: normal;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}

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

.detail-meta span {
  padding: 5px 11px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.detail-actions .ghost-action {
  border: 1px solid #d1d5db;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
}

.detail-card section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
}

.detail-card section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.detail-card h2,
.side-card h2,
.article-card h2 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 900;
}

.detail-card p,
.article-card p {
  margin: 0 0 12px;
  color: #374151;
}

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

.detail-aside {
  min-width: 0;
}

.sticky-card {
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-line);
}

.info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list dt {
  color: var(--color-muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
}

.article-card {
  margin-top: 22px;
  padding: 28px;
}

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

.feature-grid div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
}

.feature-grid strong {
  color: #111827;
}

.feature-grid span {
  color: var(--color-muted);
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 30px;
}

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

.footer-grid p {
  margin: 0;
  color: #9ca3af;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #1f2937;
  text-align: center;
  color: #9ca3af;
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .split-section,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    order: -1;
  }

  .sticky-card {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    bottom: 58px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band-inner,
  .quick-search {
    display: grid;
  }

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

  .toolbar,
  .toolbar-wide,
  .search-controls {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-score {
    text-align: left;
  }
}

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

  .hero {
    height: 480px;
  }

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

  .hero-tags,
  .hero-meta,
  .hero-actions {
    gap: 8px;
  }

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

  .movie-card-small {
    grid-template-columns: 130px 1fr;
  }

  .movie-card-small .movie-info {
    padding: 12px;
  }

  .page-hero-card,
  .detail-card,
  .article-card {
    padding: 22px;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
