:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --dark: #0b1220;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  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(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #eef6ff 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 15px;
  color: #334155;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.45), transparent 34%), linear-gradient(135deg, #1d4ed8 0%, #0891b2 48%, #0f172a 100%);
}

.hero-glow {
  position: absolute;
  inset: auto -12% -24% auto;
  width: 520px;
  height: 520px;
  background: rgba(255, 255, 255, 0.11);
  filter: blur(12px);
  border-radius: 999px;
}

.hero-shell {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: center;
  padding: 54px 0 64px;
}

.hero-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-copy h1 {
  max-width: 820px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.footer-links,
.section-heading,
.detail-meta,
.hero-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  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(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.26);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.compact-card:hover,
.category-card-large:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  height: 530px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  font-size: 13px;
}

.tag-row span {
  color: #2563eb;
  background: #eff6ff;
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

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

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search h2,
.section-heading h2,
.detail-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.025em;
}

.quick-search p,
.page-hero p,
.detail-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.section-heading {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading a {
  color: var(--primary);
  font-weight: 800;
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile span,
.category-card-large h2 {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 900;
}

.category-tile small,
.category-card-large p {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.78);
}

.category-tile img,
.category-card-large img {
  position: absolute;
  right: -20px;
  bottom: -24px;
  width: 145px;
  height: 200px;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0.32;
  transform: rotate(8deg);
}

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster img {
  transform: scale(1.06);
}

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
}

.poster-play {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  margin-bottom: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease;
}

.compact-card img {
  grid-row: span 2;
  width: 74px;
  height: 92px;
  object-fit: cover;
  border-radius: 13px;
}

.compact-card span {
  overflow: hidden;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card small {
  color: var(--muted);
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: radial-gradient(circle at 82% 18%, rgba(125, 211, 252, 0.28), transparent 30%), linear-gradient(135deg, #1d4ed8 0%, #0891b2 55%, #0f172a 100%);
}

.page-hero-small {
  padding: 48px 0;
}

.page-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-card-large {
  min-height: 240px;
  display: flex;
  align-items: flex-end;
}

.category-card-large img {
  width: 220px;
  height: 300px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 13px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.empty-state {
  display: none;
  padding: 40px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

.rank-list {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: #f8fafc;
}

.rank-num {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.rank-name {
  overflow: hidden;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.watch-hero {
  padding: 34px 0 52px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.25), transparent 30%), linear-gradient(135deg, #0b1220 0%, #111827 58%, #172554 100%);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.64));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.35);
  font-size: 34px;
}

.watch-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
}

.watch-info h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.watch-info p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
}

.detail-meta span {
  padding: 7px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.detail-content {
  padding-top: 46px;
}

.detail-panel {
  margin-bottom: 22px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.detail-panel p {
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.related-block {
  padding-top: 26px;
}

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

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  color: #cbd5e1;
  background: #0b1220;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 700;
}

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

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

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

  .hero-slide,
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 380px;
    height: 470px;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 62px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    border-radius: 12px;
  }

  .hero-section,
  .hero-shell {
    min-height: auto;
  }

  .hero-shell {
    padding: 38px 0 72px;
  }

  .hero-slide {
    gap: 28px;
  }

  .hero-poster {
    width: min(100%, 320px);
    height: 430px;
  }

  .hero-controls {
    bottom: 28px;
  }

  .quick-search,
  .footer-grid,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }

  .watch-info {
    padding: 22px;
  }
}

@media (max-width: 460px) {
  .container,
  .nav-wrap {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .category-grid,
  .rank-grid,
  .category-large-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

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

  .hero-copy h1 {
    font-size: 40px;
  }
}
