@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #141414;
  --surface: #1c1c1c;
  --surface-raised: #242424;
  --line: #343434;
  --muted: #a2a2a2;
  --white: #f5f5f5;
  --red: #e50914;
  --red-hover: #f21a24;
  --content: 1240px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; font-size: 16px; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--white);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; }
.site-header {
  position: relative;
  z-index: 20;
  background: #111;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cinema-nav {
  width: min(calc(100% - 56px), var(--content));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 46px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-family: Manrope, sans-serif; font-size: 17px; font-weight: 700; letter-spacing: .055em; white-space: nowrap; }
.brand b { color: var(--red); font-weight: 800; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 20px; font-weight: 800; line-height: 1; }
.cinema-nav-content { display: flex; align-items: center; justify-content: space-between; flex: 1; }
.primary-links { display: flex; flex-direction: row; align-items: center; gap: 28px; }
.primary-links .nav-link, .account-link { padding: 9px 0; color: #d0d0d0; font-size: 13px; font-weight: 500; transition: color .2s ease; }
.primary-links .nav-link:hover, .account-link:hover { color: #fff; }
.nav-account { display: flex; align-items: center; gap: 20px; }
.logout-form { margin: 0; }
.logout-form button { border: 0; background: transparent; }
.account-register { padding: 9px 15px; border: 1px solid #6e6e6e; color: #fff; font-size: 12px; font-weight: 600; transition: border-color .2s ease, background .2s ease; }
.account-register:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.cart-nav-link { display: inline-flex; align-items: center; gap: 8px; color: #eee; font-size: 13px; }
.cart-nav-link b { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 5px; border-radius: 50%; background: var(--red); color: white; font-size: 11px; }
.nav-toggle { display: none; border: 0; padding: 8px; background: transparent; }
.nav-toggle span { width: 22px; height: 2px; display: block; margin: 4px 0; background: #fff; }
.site-main { width: 100%; flex: 1; }
.cinema-page { width: min(calc(100% - 56px), var(--content)); margin: 0 auto; }
.hero-banner { position: relative; min-height: 500px; display: flex; align-items: center; overflow: hidden; margin: 26px 0 72px; background: #202020; }
.hero-art { position: absolute; inset: 0 0 0 38%; overflow: hidden; }
.hero-art::after { position: absolute; inset: 0; content: ''; background: linear-gradient(90deg, #202020 0%, rgba(32,32,32,.9) 8%, rgba(20,20,20,.16) 72%, rgba(20,20,20,.32) 100%), linear-gradient(0deg, rgba(20,20,20,.45), transparent 52%); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; opacity: .76; }
.hero-copy { position: relative; z-index: 1; width: min(58%, 620px); padding: 66px 0 66px 7.5%; }
.eyebrow { margin: 0 0 13px; color: #b5b5b5; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.live-dot { width: 7px; height: 7px; display: inline-block; margin: 0 7px 1px 0; border-radius: 50%; background: var(--red); }
h1, h2, h3 { color: var(--white); font-family: Manrope, 'DM Sans', sans-serif; font-weight: 700; letter-spacing: -.035em; }
.hero-copy h1 { max-width: 650px; margin: 0 0 16px; font-size: clamp(36px, 5.2vw, 66px); line-height: 1.04; }
.hero-meta, .detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: #d1d1d1; font-size: 12px; }
.rating { color: #f4c542; font-weight: 700; }
.hero-summary { max-width: 470px; margin: 20px 0 24px; color: #d0d0d0; font-size: 14px; line-height: 1.8; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 28px; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 19px; border: 1px solid transparent; border-radius: 2px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .015em; line-height: 1; cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { color: #fff; transform: translateY(-1px); }
.button-primary { background: var(--red); }
.button-primary:hover { background: var(--red-hover); }
.button-quiet { border-color: #777; background: rgba(40,40,40,.72); }
.button-quiet:hover { border-color: #ddd; background: rgba(70,70,70,.8); }
.hero-index { position: absolute; right: 25px; bottom: 24px; z-index: 2; color: white; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.hero-index i, .step-label i { color: #aaa; font-style: normal; font-weight: 400; }
.catalog-section { padding-bottom: 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2, .section-heading h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.text-link, .back-link { color: #d2d2d2; font-size: 12px; font-weight: 600; transition: color .2s ease; }
.text-link span { margin-left: 7px; color: var(--red); }
.text-link:hover, .back-link:hover { color: #fff; }
.movie-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.movie-card { min-width: 0; }
.poster-link { position: relative; display: block; overflow: hidden; aspect-ratio: 2 / 2.85; background: #292929; }
.movie-poster { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
.movie-card:hover .movie-poster { transform: scale(1.045); filter: brightness(.78); }
.poster-rating { position: absolute; top: 11px; left: 11px; padding: 5px 8px; background: rgba(17,17,17,.8); color: #f4c542; font-size: 11px; font-weight: 700; }
.poster-open { position: absolute; right: 13px; bottom: 13px; left: 13px; display: flex; align-items: center; justify-content: space-between; color: #fff; font-size: 12px; font-weight: 700; opacity: 0; transform: translateY(5px); transition: opacity .2s ease, transform .2s ease; }
.movie-card:hover .poster-open, .poster-link:focus-visible .poster-open { opacity: 1; transform: translateY(0); }
.movie-card-info { padding: 12px 1px 0; }
.movie-title-row { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.movie-title-row h3 { min-width: 0; margin: 0; font-size: 14px; line-height: 1.4; }
.movie-title-row h3 a:hover { color: #ddd; }
.movie-price { flex: 0 0 auto; color: #f2f2f2; font-size: 11px; font-weight: 700; }
.movie-meta { margin: 5px 0 12px; color: var(--muted); font-size: 11px; }
.movie-meta span { padding: 0 5px; color: #777; }
.button-buy { width: 100%; min-height: 37px; }
.management-links { display: flex; gap: 14px; padding-top: 9px; }
.management-links a, .detail-admin a { color: #929292; font-size: 10px; }
.management-links a:hover, .detail-admin a:hover { color: #fff; }
.catalog-admin { margin-top: 24px; text-align: right; }
.empty-state { padding: 65px 25px; border: 1px solid var(--line); text-align: center; }
.empty-state h2, .empty-state h3 { margin-bottom: 8px; font-size: 22px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }
.detail-page { padding-top: 36px; padding-bottom: 88px; }
.back-link { display: inline-block; margin-bottom: 24px; }
.detail-layout { display: grid; grid-template-columns: minmax(230px, 370px) minmax(0, 1fr); align-items: center; gap: clamp(36px, 7vw, 92px); max-width: 1050px; margin: 0 auto; }
.detail-poster-wrap { background: #222; }
.detail-poster { width: 100%; display: block; aspect-ratio: 2 / 2.85; object-fit: cover; }
.detail-copy h1 { margin: 0 0 15px; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; }
.detail-summary { max-width: 600px; margin: 26px 0; color: #c5c5c5; font-size: 14px; line-height: 1.85; white-space: pre-line; }
.detail-price-label { color: var(--muted); font-size: 11px; }
.detail-price { margin-top: 2px; font-family: Manrope, sans-serif; font-size: 27px; font-weight: 700; }
.detail-price small { color: #aaa; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 400; }
.detail-admin { display: flex; gap: 18px; margin-top: 26px; }
.commerce-page { min-height: 62vh; padding-top: 58px; padding-bottom: 90px; }
.commerce-heading { align-items: center; margin-bottom: 30px; }
.commerce-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); }
.cart-panel, .checkout-panel { border: 1px solid var(--line); background: #191919; }
.cinema-table { margin: 0; color: #eee; --bs-table-bg: transparent; --bs-table-color: #eee; --bs-table-border-color: #333; }
.cinema-table th { padding: 16px 18px; border-bottom-width: 1px; color: #aaa; font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.cinema-table td { padding: 17px 18px; border-color: #303030; vertical-align: middle; font-size: 13px; }
.cart-movie-link { font-weight: 600; }
.remove-link { color: #b6b6b6; font-size: 12px; }
.remove-link:hover { color: #ff626a; }
.cart-total { display: flex; justify-content: end; align-items: center; gap: 32px; padding: 20px 22px; border-top: 1px solid #333; color: #b8b8b8; font-size: 12px; }
.cart-total strong { color: #fff; font-size: 18px; }
.cart-actions { display: flex; justify-content: space-between; gap: 12px; padding: 0 22px 22px; }
.checkout-page { max-width: var(--content); }
.step-label { color: #eee; font-size: 12px; font-weight: 700; }
.checkout-panel { max-width: 780px; margin: 0 auto; }
.checkout-intro { padding: 25px 30px 18px; border-bottom: 1px solid #333; }
.checkout-intro h2 { margin: 0 0 5px; font-size: 20px; }
.checkout-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 20px; padding: 26px 30px 30px; }
.form-field { min-width: 0; }
.form-field:nth-of-type(4) { grid-column: 1 / -1; }
.form-label { margin-bottom: 7px; color: #d5d5d5; font-size: 11px; font-weight: 600; }
.form-control { min-height: 43px; border: 1px solid #414141; border-radius: 2px; background: #111; color: white; font-size: 13px; }
.form-control::placeholder { color: #777; }
.form-control:focus { border-color: #aaa; background: #111; color: white; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.form-control:focus::placeholder { color: #777; }
.field-error, .validation-summary { color: #ff747a; font-size: 11px; }
.validation-summary:empty { display: none; }
.validation-summary { grid-column: 1 / -1; }
.checkout-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 8px; }
.confirmation-page { min-height: 66vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 70px; padding-bottom: 90px; text-align: center; }
.confirmation-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 23px; border: 1px solid var(--red); color: var(--red); font-size: 28px; }
.confirmation-page h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); }
.confirmation-copy { max-width: 500px; margin: 13px auto 24px; color: #b5b5b5; font-size: 13px; }
.site-footer { padding: 22px 28px; border-top: 1px solid #303030; color: #929292; font-size: 11px; text-align: center; }

@media (max-width: 900px) {
  .cinema-nav { width: min(calc(100% - 40px), var(--content)); gap: 25px; }
  .cinema-page { width: min(calc(100% - 40px), var(--content)); }
  .hero-banner { min-height: 440px; }
  .hero-copy { width: 65%; padding-left: 6%; }
  .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 16px; }
  .nav-account { gap: 13px; }
}
@media (max-width: 767.98px) {
  .cinema-nav { min-height: 66px; flex-wrap: wrap; justify-content: space-between; gap: 0; }
  .nav-toggle { display: block; }
  .cinema-nav-content { flex-basis: 100%; align-items: stretch; padding: 4px 0 17px; }
  .primary-links { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-links .nav-link { padding: 9px 0; }
  .nav-account { flex-wrap: wrap; justify-content: flex-start; gap: 16px; padding-top: 10px; border-top: 1px solid #333; }
  .hero-banner { min-height: 510px; align-items: end; margin: 16px 0 52px; }
  .hero-art { inset: 0; }
  .hero-art::after { background: linear-gradient(0deg, #171717 0%, rgba(20,20,20,.92) 12%, rgba(20,20,20,.45) 56%, rgba(20,20,20,.06) 100%); }
  .hero-art img { object-position: center 25%; }
  .hero-copy { width: 100%; padding: 190px 24px 45px; }
  .hero-copy h1 { font-size: clamp(35px, 9vw, 54px); }
  .hero-summary { margin: 14px 0 18px; font-size: 12px; }
  .hero-actions { margin-top: 20px; }
  .catalog-section { padding-bottom: 55px; }
  .section-heading { align-items: start; }
  .section-heading > .text-link { margin-top: 8px; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 13px; }
  .movie-title-row { display: block; }
  .movie-price { display: block; margin-top: 5px; }
  .poster-open { opacity: 1; transform: none; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 27px; max-width: 520px; }
  .detail-poster-wrap { max-width: 300px; }
  .detail-copy h1 { font-size: 36px; }
  .commerce-page { padding-top: 37px; padding-bottom: 60px; }
  .commerce-heading { align-items: start; }
  .checkout-form { grid-template-columns: 1fr; padding: 21px; }
  .checkout-intro { padding: 21px; }
  .form-field:nth-of-type(4), .validation-summary, .checkout-actions { grid-column: auto; }
}
@media (max-width: 440px) {
  .cinema-nav, .cinema-page { width: calc(100% - 30px); }
  .brand { font-size: 15px; }
  .hero-banner { min-height: 475px; }
  .hero-copy { padding: 175px 19px 38px; }
  .section-heading { display: block; }
  .section-heading > .text-link { display: inline-block; margin-top: 10px; }
  .movie-grid { gap: 21px 11px; }
  .movie-title-row h3 { font-size: 12px; }
  .movie-price { font-size: 10px; }
  .movie-meta { font-size: 10px; }
  .button { min-height: 41px; padding: 0 14px; }
  .cart-actions, .checkout-actions { align-items: stretch; flex-direction: column-reverse; }
  .cart-actions .button, .checkout-actions .button { width: 100%; }
  .cart-total { gap: 18px; padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Keep scaffolded genre and movie management screens in the same visual system. */
.site-main .container { max-width: var(--content); padding-top: 32px; padding-bottom: 55px; }
.site-main .container > h1, .site-main .container > h2 { margin-bottom: 22px; }
.site-main .table { --bs-table-bg: transparent; --bs-table-color: #eee; --bs-table-border-color: #353535; }
.site-main .table th { color: #aaa; font-size: 11px; font-weight: 600; }
.site-main .table td, .site-main .table th { padding: 12px; }
.site-main .table a:not(.btn) { color: #eee; text-decoration: underline; text-decoration-color: #777; text-underline-offset: 3px; }
.site-main .table a:not(.btn):hover { color: #fff; text-decoration-color: var(--red); }
.site-main .btn-primary { border-color: var(--red); border-radius: 2px; background: var(--red); }
.site-main .btn-primary:hover, .site-main .btn-primary:focus { border-color: var(--red-hover); background: var(--red-hover); }
.site-main .btn-secondary, .site-main .btn-outline-primary { border-radius: 2px; }
.site-main .form-group, .site-main .mb-3 { margin-bottom: 16px; }
.site-main label { color: #d6d6d6; }
.site-main .text-danger { color: #ff747a !important; }
