:root {
  --ink: #f4f1e8;
  --muted: #b9b3a5;
  --line: rgba(201, 189, 157, 0.3);
  --gold: #d7b56d;
  --gold-soft: #c89f4a;
  --panel: rgba(19, 21, 22, 0.9);
  --ok: #69d5ab;
  --err: #ff9a86;
  --free: #f5f5f5;
  --selected: #59c781;
  --busy: #7f7267;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  background: radial-gradient(circle at 10% 10%, #2d3c3f 0, transparent 32%),
    radial-gradient(circle at 88% 22%, #4a3328 0, transparent 26%),
    linear-gradient(180deg, #090b0c 0%, #0d0f10 100%);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
  z-index: 2;
}

.hero {
  min-height: 86vh;
  padding: 24px 6vw 50px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(7, 8, 9, 0.9), rgba(24, 29, 30, 0.58)),
    url('https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, #0a0b0c 98%);
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(20px, 2.2vw, 34px);
  letter-spacing: 0.06em;
}

.to-booking,
.cta,
.pick-btn {
  text-decoration: none;
  color: #16120c;
  background: linear-gradient(120deg, var(--gold), #f1d08a);
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.to-booking:hover,
.cta:hover,
.pick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(210, 173, 102, 0.28);
}

.hero-content {
  margin-top: 12vh;
  max-width: 820px;
  animation: rise 900ms cubic-bezier(0.2, 0.65, 0.22, 1) both;
}

.badge {
  display: inline-block;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  backdrop-filter: blur(6px);
}

h1,
h2,
h3 {
  font-family: 'Russo One', sans-serif;
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: clamp(38px, 8vw, 84px);
  text-transform: uppercase;
}

.lead {
  margin: 18px 0 14px;
  max-width: 650px;
  font-size: clamp(18px, 2vw, 28px);
  color: #ece3cf;
}

.vip-note {
  margin: 0 0 28px;
  color: #d8ccb1;
}

.address {
  margin: 0 0 20px;
  color: #d7cfbd;
}

.text-link {
  border: none;
  background: transparent;
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: radial-gradient(140% 100% at 50% 100%, #090b0c 40%, transparent 42%);
  transform: translateY(45px);
}

main {
  width: min(1220px, 100% - 40px);
  margin: 0 auto 40px;
  position: relative;
  z-index: 3;
}

.catalog,
.booking {
  margin-bottom: 34px;
}

.catalog {
  padding-top: 18px;
}

.booking {
  padding-top: 14px;
}

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

.section-head h2 {
  font-size: clamp(24px, 4vw, 42px);
}

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

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

.movie-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transform: translateY(14px);
  opacity: 0;
  animation: card-in 620ms ease forwards;
}

.movie-card:nth-child(2) {
  animation-delay: 110ms;
}

.movie-card:nth-child(3) {
  animation-delay: 220ms;
}

.poster {
  height: 480px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px;
}

.card-meta {
  color: var(--muted);
  margin: 8px 0;
}

.single-date {
  margin: 0 0 6px;
  color: #f2dec0;
  font-weight: 700;
}

.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.panel h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.showtime-list {
  display: grid;
  gap: 8px;
}

.showtime-card {
  border: 1px solid var(--line);
  background: #161a1b;
  border-radius: 10px;
  padding: 9px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.showtime-card:hover {
  transform: translateY(-2px);
}

.showtime-card.active {
  border-color: var(--gold-soft);
  background: #202728;
}

.meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.seat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.dot.free {
  background: var(--free);
}

.dot.selected {
  background: var(--selected);
}

.dot.occupied {
  background: var(--busy);
}

.seat-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(5, 54px);
  gap: 12px 8px;
  padding: 14px;
  border-left: 1px dashed var(--line);
  border-right: 1px dashed var(--line);
}

.seat {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #1b1b1b;
  position: relative;
}

.seat::before,
.seat::after {
  content: '';
  position: absolute;
  top: 4px;
  width: 20px;
  height: 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
}

.seat::before {
  left: 6px;
}

.seat::after {
  right: 6px;
}

.seat.free {
  background: linear-gradient(180deg, #ffffff 0%, var(--free) 100%);
}

.seat.free:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.22);
}

.seat.occupied {
  background: linear-gradient(180deg, #b6957b 0%, var(--busy) 100%);
  color: #f2e6db;
  cursor: not-allowed;
}

.seat.selected {
  background: linear-gradient(180deg, #7be4a1 0%, var(--selected) 100%);
}

.screen-wrap {
  padding-top: 14px;
}

.screen {
  text-align: center;
  color: #f2ddba;
  font-size: 22px;
  border-top: 2px solid rgba(215, 181, 109, 0.5);
  border-radius: 100% 100% 0 0;
  padding-top: 12px;
}

.summary {
  min-height: 104px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  white-space: pre-line;
  padding: 10px;
  margin-bottom: 10px;
}

.payment-link-box {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  color: var(--muted);
}

.pay-link-btn {
  display: inline-block;
  text-decoration: none;
  color: #17140e;
  background: linear-gradient(110deg, var(--gold-soft), #f6d89a);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}

.checkout-form {
  display: grid;
  gap: 8px;
}

.checkout-form input,
.checkout-form button {
  border-radius: 10px;
  font: inherit;
  padding: 11px;
}

.checkout-form input {
  border: 1px solid var(--line);
  background: #151718;
  color: var(--ink);
}

.checkout-form button {
  border: none;
  background: linear-gradient(110deg, var(--gold-soft), #f6d89a);
  color: #17140e;
  font-weight: 800;
  cursor: pointer;
}

.acquiring-note {
  margin: 2px 2px 0;
  color: #ff6868;
  font-size: 13px;
}

.result {
  min-height: 20px;
  margin-top: 10px;
}

.result.ok {
  color: var(--ok);
}

.result.err {
  color: var(--err);
}

.legal-footer {
  width: min(1220px, 100% - 40px);
  margin: 0 auto 24px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 3;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  width: min(980px, calc(100% - 24px));
  max-height: 88vh;
  overflow: auto;
  margin: 6vh auto 0;
  background: #141718;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.hall-gallery {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hall-gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

  .booking-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .movie-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .movie-card {
    scroll-snap-align: start;
  }

  .hero {
    min-height: 76vh;
    padding: 18px 16px 34px;
  }

  main {
    width: calc(100% - 24px);
  }

  .poster {
    height: 410px;
  }

  .seat-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(5, 46px);
    gap: 8px 6px;
    padding: 10px;
  }

  .seat {
    font-size: 11px;
    border-radius: 10px;
  }

  .seat::before,
  .seat::after {
    width: 14px;
    height: 5px;
  }

  .seat::before {
    left: 4px;
  }

  .seat::after {
    right: 4px;
  }

  .hall-gallery {
    grid-template-columns: 1fr;
  }

  .legal-footer {
    width: calc(100% - 24px);
  }
}
