@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

:root {
  --bg:           #fafafa;
  --bg-elevated:  #ffffff;
  --text:         #1a1a1a;
  --text-muted:   #666666;
  --accent:       #1e40af;
  --accent-soft:  rgba(30, 64, 175, 0.08);
  --border:       #e5e7eb;

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;

  --radius-sm:    4px;
  --radius:       6px;
  --radius-lg:    10px;

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow:       0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.12);

  --transition:      150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { min-height: 100vh; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1, h2 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; color: var(--text); }
h3, h4, h5, h6 { font-family: var(--font-sans); font-weight: 600; line-height: 1.3; color: var(--text); }

a { color: var(--accent); transition: color var(--transition); }
a:hover { color: var(--text); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
  justify-self: start;
}
.brand:hover { color: var(--text); }
.brand-text { line-height: 1; }
.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 5px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  justify-content: center;
  justify-self: center;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 12px;
  position: relative;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active {
  color: var(--accent);
  font-weight: 600;
}
.nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 4px 0 14px;
  height: 36px;
  width: 100%;
  max-width: 160px;
  justify-self: end;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-form input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
  padding: 0;
  min-width: 0;
  font-family: inherit;
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: transparent;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 2px;
  transition: color var(--transition), background var(--transition);
}
.search-form button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

@media (min-width: 720px) {
  .header-inner {
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    min-height: 76px;
  }
  .brand { font-size: 30px; }
  .nav-link { padding: 12px 16px; font-size: 14px; }
  .nav-link.is-active::after { left: 16px; right: 16px; bottom: 6px; }
  .search-form {
    max-width: 300px;
    height: 44px;
    padding: 0 6px 0 18px;
  }
  .search-form input { font-size: 16px; }
  .search-form button { width: 34px; height: 34px; }
}

@media (min-width: 720px) and (max-width: 1023px) {
  .header-inner {
    gap: 18px;
    min-height: 64px;
  }
  .brand { font-size: 24px; }
  .nav-link { padding: 10px 10px; font-size: 13px; }
  .nav-link.is-active::after { left: 10px; right: 10px; }
  .search-form { max-width: 200px; height: 40px; }
  .search-form button { width: 30px; height: 30px; }
}

.hero {
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  padding: 80px 0 56px;
  text-align: center;
}
.hero-title {
  font-size: clamp(26px, 4.5vw, 48px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.15;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: clamp(15px, 1.8vw, 19px);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
  text-wrap: balance;
}

.main-content { padding-bottom: 80px; }

.page-title {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  margin: 24px 0 16px;
}
.page-intro {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 760px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

.card-section { margin: 0 0 56px; }
.card-section:last-child { margin-bottom: 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-title {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.01em;
}
.section-more {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.section-more:hover { opacity: 0.75; color: var(--accent); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px 20px;
}

.card {
  display: block;
  cursor: pointer;
  transition: transform var(--transition);
}
.card:hover { transform: translateY(-2px); }
.card:hover .card-poster-wrapper { box-shadow: var(--shadow-lg); }

.card-poster-wrapper {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-slow);
}
.card-poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.card-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.card-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-year {
  font-size: 12px;
  color: var(--text-muted);
}

.load-more-wrap {
  text-align: center;
  margin-top: 40px;
}
.load-more {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 32px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  transition: all var(--transition);
}
.load-more:hover:not([disabled]) {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.load-more[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--text);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-seo-text {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-bottom: 40px;
  max-width: 900px;
}
.footer-seo-text h2 {
  font-size: 24px;
  margin-bottom: 16px;
}
.footer-seo-text h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text);
}
.footer-seo-text p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 1023px) {
  .container { padding: 0 24px; }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-col-about { grid-column: 1 / -1; }
}

@media (max-width: 719px) {
  .container { padding: 0 20px; }

  .hero { padding: 40px 0 28px; }
  .hero-title { font-size: clamp(22px, 6vw, 30px); margin-bottom: 10px; line-height: 1.2; }
  .hero-subtitle { font-size: 14.5px; max-width: 320px; line-height: 1.45; }

  .breadcrumb { padding-top: 20px; }

  .page-title { margin: 14px 0 12px; }
  .page-intro { margin-bottom: 32px; font-size: 15px; }

  .section-header { margin-bottom: 16px; }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 24px 16px;
  }
  .card-title { font-size: 13px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-col-about { grid-column: auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .header-inner { gap: 8px; min-height: 52px; }
  .brand { font-size: 19px; }
  .nav-link { padding: 8px 9px; font-size: 12.5px; }
  .nav-link.is-active::after { left: 9px; right: 9px; bottom: 3px; }
  .search-form { max-width: 130px; height: 34px; padding: 0 3px 0 12px; }
  .search-form input { font-size: 13.5px; }
  .search-form button { width: 26px; height: 26px; }

  .hero { padding: 32px 0 24px; }
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 13.5px; max-width: 280px; }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
  }
  .card-title { font-size: 12.5px; }

  .footer-seo-text h2 { font-size: 22px; }
}

@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .header-inner { gap: 6px; }
  .brand { font-size: 17px; }
  .main-nav { gap: 0; }
  .nav-link { padding: 7px 6px; font-size: 12px; }
  .nav-link.is-active::after { left: 6px; right: 6px; bottom: 2px; }
  .search-form { max-width: 110px; height: 32px; padding: 0 2px 0 10px; }
  .search-form input { font-size: 13px; }
  .search-form button { width: 24px; height: 24px; }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px);
  transition: transform 200ms ease;
}
.modal.is-open .modal-dialog { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  z-index: 2;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--accent-soft); color: var(--accent); }

.modal-body { padding: 0; }

.modal-content {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 28px;
}
.modal-poster {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--border);
}
.modal-poster img { width: 100%; height: 100%; object-fit: cover; }

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 32px;
}
.modal-info-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  align-self: flex-start;
}
.modal-info-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.modal-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.modal-info-meta strong {
  color: var(--text);
  font-weight: 600;
}
.modal-info-rating {
  color: var(--accent);
  font-weight: 600;
}
.modal-info-tagline {
  font-style: italic;
  color: var(--text-muted);
  font-size: 14px;
}
.modal-info-overview {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.modal-info-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.modal-info-genre {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.modal-loading,
.modal-error {
  padding: 60px 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.modal-loading::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  margin-right: 12px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .modal { padding: 12px; }
  .modal-content {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }
  .modal-poster {
    max-width: 180px;
    margin: 0 auto;
  }
  .modal-info { padding-right: 0; }
  .modal-info-title { font-size: 22px; }
}

.load-more.is-loading {
  pointer-events: none;
  opacity: 0.6;
}
.load-more.is-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
  margin-right: 8px;
  vertical-align: -2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
}
