@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;900&display=swap");

:root {
  --primary-50: #fef8f2;
  --primary-100: #fdeee0;
  --primary-400: #f29d5b;
  --primary-500: #ee7f38;
  --primary-600: #e0642d;
  --primary-700: #ba4d27;
  --accent-50: #fefce8;
  --accent-100: #fef9c3;
  --accent-500: #eab308;
  --accent-700: #a16207;
  --warm-50: #fdf8f6;
  --warm-100: #f2e8e5;
  --warm-200: #eaddd7;
  --warm-300: #e0cec7;
  --warm-800: #846358;
  --secondary-50: #f5f5f4;
  --secondary-100: #e7e6e3;
  --secondary-500: #736d5f;
  --secondary-600: #5d5951;
  --secondary-700: #4d4944;
  --secondary-800: #433f3c;
  --shadow-sm: 0 8px 20px rgba(67, 63, 60, 0.08);
  --shadow-md: 0 14px 36px rgba(67, 63, 60, 0.14);
  --shadow-lg: 0 24px 60px rgba(67, 63, 60, 0.2);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--warm-50);
  color: var(--secondary-800);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--secondary-800);
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 10px 24px rgba(238, 127, 56, 0.3);
}

.logo-text {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--secondary-600);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.nav-search input {
  width: 160px;
  border: 0;
  outline: 0;
  padding: 8px 4px 8px 12px;
  color: var(--secondary-700);
  background: transparent;
}

.nav-search button,
.primary-button,
.secondary-button,
.filter-panel button {
  border: 0;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 12px 28px rgba(238, 127, 56, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
  padding: 8px 15px;
}

.nav-search button:hover,
.primary-button:hover,
.filter-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(238, 127, 56, 0.32);
}

.secondary-button {
  color: var(--primary-700);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--secondary-700);
  background: #fff;
}

.hero {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, var(--primary-500), var(--primary-400) 48%, var(--accent-500));
  color: #fff;
  padding: 70px 0 78px;
  overflow: hidden;
}

.hero-shell,
.page-shell,
.section-shell,
.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  max-width: 860px;
  margin: 20px auto 14px;
  text-align: center;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--primary-50);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 30px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
}

.hero-search {
  max-width: 700px;
  margin: 0 auto 34px;
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-lg);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--secondary-700);
  background: transparent;
  padding: 12px 18px;
}

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

.section-shell {
  padding: 54px 0;
}

.section-white {
  background: #fff;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  font-weight: 800;
  color: var(--secondary-800);
  white-space: nowrap;
}

.section-line {
  height: 4px;
  min-width: 80px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-500), transparent);
}

.section-line.accent {
  background: linear-gradient(90deg, var(--accent-500), transparent);
}

.section-link {
  color: var(--primary-700);
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary-800);
}

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

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

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  color: #fff;
  background: rgba(238, 127, 56, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.hover-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-size: 28px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease;
}

.hover-play::before {
  content: "";
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.hover-play {
  text-indent: 4px;
}

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

.hover-play {
  isolation: isolate;
}

.hover-play::before {
  z-index: -1;
}

.card-body {
  padding: 18px;
}

.card-body h3,
.large-card-content h3,
.compact-info h3 {
  margin: 0;
  font-weight: 800;
  color: var(--secondary-800);
}

.card-body h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.card-body p,
.large-card-content p,
.compact-info p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.card-body p {
  min-height: 44px;
  margin: 9px 0 14px;
  color: var(--secondary-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
}

.card-meta,
.compact-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--secondary-500);
  font-size: 13px;
}

.card-meta span,
.compact-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
}

.card-meta span:not(:last-child)::after,
.compact-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--warm-300);
}

.movie-card-large {
  min-height: 260px;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.movie-card-large .poster-wrap {
  height: 100%;
  min-height: 260px;
  aspect-ratio: auto;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.22), transparent);
}

.large-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 26px;
}

.large-card-content h3 {
  color: #fff;
  font-size: 25px;
}

.large-card-content p {
  margin: 8px 0 12px;
  color: var(--warm-100);
  font-size: 14px;
  -webkit-line-clamp: 2;
}

.card-meta.light {
  color: var(--warm-100);
}

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

.category-tile {
  display: block;
  min-height: 164px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, var(--primary-50));
  border: 1px solid var(--warm-200);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  font-weight: 800;
}

.category-tile h2,
.category-tile h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: var(--secondary-600);
  font-size: 14px;
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: thin;
}

.rail .movie-card {
  width: 278px;
  flex: 0 0 auto;
}

.rank-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 26px;
}

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

.compact-card {
  display: flex;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  background: var(--warm-50);
}

.compact-thumb {
  position: relative;
  width: 142px;
  height: 88px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--secondary-800);
}

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

.compact-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.compact-card:hover .compact-play {
  opacity: 1;
}

.compact-info {
  min-width: 0;
  flex: 1;
}

.compact-info h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.compact-info p {
  margin: 5px 0 8px;
  color: var(--secondary-600);
  font-size: 13px;
  -webkit-line-clamp: 2;
}

.rank-badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-500);
  font-weight: 800;
}

.page-hero {
  padding: 52px 0;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  border-bottom: 1px solid var(--warm-200);
}

.page-hero .page-shell {
  display: grid;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--secondary-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--primary-600);
}

.page-hero h1 {
  margin: 0;
  color: var(--secondary-800);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--secondary-600);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  outline: 0;
  padding: 11px 14px;
  color: var(--secondary-700);
  background: var(--warm-50);
}

.filter-panel button {
  padding: 0 20px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: var(--radius);
  text-align: center;
  color: var(--secondary-600);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

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

.is-hidden {
  display: none !important;
}

.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--secondary-600);
  font-weight: 700;
}

.back-link:hover {
  color: var(--primary-600);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.82fr);
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.related-card,
.info-panel {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: var(--primary-500);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
  transition: opacity 0.2s ease;
}

.player-cover-button span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-500);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.26);
  font-size: 32px;
  text-indent: 5px;
}

.player-cover-button.is-hidden {
  opacity: 0;
  pointer-events: none;
  display: flex !important;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  color: #fff;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--secondary-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 900;
}

.detail-meta {
  gap: 10px;
  margin-bottom: 24px;
}

.detail-meta span,
.tag-list span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--warm-100);
}

.detail-meta .primary-pill {
  color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 800;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--warm-200);
}

.detail-section h2 {
  margin: 0 0 10px;
  color: var(--secondary-800);
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--secondary-700);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  color: var(--accent-700);
  background: var(--accent-100);
  font-size: 14px;
}

.related-card {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.related-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.site-footer {
  color: var(--warm-100);
  background: var(--secondary-800);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0 34px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand p {
  max-width: 520px;
  margin: 0;
  color: var(--warm-200);
  font-size: 14px;
}

.footer-links h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

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

.footer-links a {
  color: var(--warm-200);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--secondary-700);
  color: var(--warm-300);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    margin-left: 0;
    order: 3;
    flex-wrap: wrap;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-search {
    width: 100%;
    order: 4;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-featured,
  .movie-grid,
  .category-grid,
  .rank-panel,
  .detail-grid,
  .footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 46px 0 54px;
  }

  .hero-title,
  .hero-intro {
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-search,
  .filter-panel {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-search {
    display: grid;
  }

  .hero-featured,
  .movie-grid,
  .category-grid,
  .rank-panel,
  .detail-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-line {
    width: 100%;
    min-height: 4px;
  }

  .compact-thumb {
    width: 118px;
    height: 76px;
  }

  .detail-card {
    padding: 22px;
  }

  .logo-text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
