/* ============================================================
   Страница ввода кода — кинематографический стиль
   Используется на шаблоне stage_access_cinema.html
   ============================================================ */
body{
    max-width:100% !important;
    padding: 0 !important;
}



.cinema-page {
  position: relative;
  color: #f5e6c8;
  font-family: 'Indie Flower', cursive;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Мягкая виньетка — как в зале кинотеатра */
.cinema-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
              rgba(0,0,0,0) 30%,
              rgba(0,0,0,.55) 100%);
  z-index: 5;
}

/* ---------- Киноплёнки по бокам ---------- */

.film-strip {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 365px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, #0a0a0a 0%, #1a1614 50%, #0a0a0a 100%);
  box-shadow: 0 0 30px rgba(0,0,0,.7);
}

.film-strip.film-left  { left: 0; }
.film-strip.film-right { right: 0; }

/* Отверстия по краям полотна */
.film-strip::before,
.film-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
  background: repeating-linear-gradient(to bottom,
    transparent 0 14px,
    rgba(255,255,255,.85) 14px 30px,
    transparent 30px 44px);
  z-index: 3;
}
.film-strip::before { left: 0; }
.film-strip::after  { right: 0; }

/* Лента с кадрами, которая едет */
.film-inner {
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
  will-change: transform;
}

.film-left .film-inner {
  animation: film-scroll-up 40s linear infinite;
}
.film-right .film-inner {
  animation: film-scroll-down 55s linear infinite;
}

@keyframes film-scroll-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

@keyframes film-scroll-down {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}

/* Один кадр — слот под картинку из фильма */
.film-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #2a2420 0%, #3b322a 100%);
  border: 1px solid #000;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,.8);
  flex: 0 0 auto;
}

/* Плёночный «шум» — из лёгких полос */
.film-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right,
      rgba(255,255,255,.04) 0 1px,
      transparent 1px 3px),
    radial-gradient(circle at 20% 30%,
      rgba(255,220,140,.08), transparent 60%);
  pointer-events: none;
}

/* Цифра кадра — для вида */
.film-frame::after {
  content: attr(data-num);
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-family: monospace;
  font-size: 9px;
  color: rgba(255,255,255,.3);
}

/* Если у кадра задан фон через style="background-image:url(...)" */
.film-frame.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Сцена с билетом ---------- */

.ticket-scene {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 200px;
  box-sizing: border-box;
}

/* ---------- Билет ---------- */

.ticket {
  position: relative;
  display: flex;
  max-width: 620px;
  width: 100%;
  background: linear-gradient(135deg, #fff8e7 0%, #f5e9c8 100%);
  color: #2b1d0f;
  border-radius: 14px;
  box-shadow:
    0 20px 50px rgba(0,0,0,.6),
    0 0 0 1px rgba(0,0,0,.15) inset,
    0 0 60px rgba(255,200,100,.08);
  transform: rotate(-1.2deg);
  overflow: hidden;
  font-family: 'Indie Flower', cursive;
  margin: 0;
}

.ticket::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      rgba(0,0,0,.015) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

/* Основная часть */
.ticket-main {
  flex: 1 1 auto;
  padding: 28px 26px 26px;
  position: relative;
  z-index: 2;
}

/* Корешок */
.ticket-stub {
  flex: 0 0 160px;
  padding: 28px 16px 26px;
  border-left: 2px dashed #a98a55;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f3e4bc 0%, #e8d5a0 100%);
  z-index: 2;
  text-align: center;
}

/* Зубцы на линии отрыва — сверху и снизу */
.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  left: -11px;
  width: 20px;
  height: 20px;
  background: #14110f;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,.05);
}
.ticket-stub::before { top: -10px; }
.ticket-stub::after  { bottom: -10px; }

/* ---------- Контент билета ---------- */

.ticket-brand {
  font-family: 'Amatic SC', cursive;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #8a6a2b;
  margin: 0 0 4px;
  font-weight: 700;
}

.ticket-title {
  font-family: 'Amatic SC', cursive;
  font-size: 42px;
  line-height: 1;
  margin: 0 0 6px;
  color: #2b1d0f;
  letter-spacing: 1px;
  font-weight: 700;
}

.ticket-subtitle {
  font-size: 15px;
  color: #6a4f1f;
  margin: 0 0 16px;
  font-style: italic;
}

.ticket-meta {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #4a3a1f;
  border-top: 1px dashed #c4a86b;
  border-bottom: 1px dashed #c4a86b;
  padding: 10px 0;
}

.ticket-meta div {
  display: flex;
  flex-direction: column;
}

.ticket-meta .label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9b7a3a;
  font-family: system-ui, sans-serif;
}

.ticket-meta .value {
  font-family: 'Amatic SC', cursive;
  font-size: 18px;
  font-weight: 700;
  color: #2b1d0f;
}

/* Приветствие перед формой */
.ticket-welcome {
  font-size: 14px;
  line-height: 1.5;
  color: #3a2a14;
  margin: 0 0 16px;
}

/* Форма внутри билета */
.ticket-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 6px;
}

.ticket-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  font-size: 16px;
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(255,255,255,.55);
  color: #2b1d0f;
  border: 1px solid #c4a86b;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s, background .2s;
}

.ticket-form input::placeholder {
  font-family: 'Indie Flower', cursive;
  letter-spacing: 1px;
  text-transform: none;
  color: #a68a5a;
  font-weight: 400;
}

.ticket-form input:focus {
  border-color: #8a6a2b;
  background: rgba(255,255,255,.8);
}

.ticket-form button {
  padding: 12px 22px;
  font-family: 'Amatic SC', cursive;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff8e7;
  background: #b0361f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.ticket-form button:hover { background: #942b17; }
.ticket-form button:active { transform: translateY(1px); }

/* ---------- Корешок: содержимое ---------- */

.stub-label {
  font-family: system-ui, sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8a6a2b;
}

.stub-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.stub-stage {
  font-family: 'Amatic SC', cursive;
  font-size: 76px;
  font-weight: 700;
  line-height: 1;
  color: #2b1d0f;
  transform: rotate(90deg);
  transform-origin: center;
}

.stub-perf {
  font-size: 11px;
  color: #8a6a2b;
  font-family: monospace;
  letter-spacing: 1px;
}

/* Штрих-код из полосок */
.stub-barcode {
  display: flex;
  gap: 1px;
  height: 32px;
  align-items: flex-end;
  margin-top: 6px;
}
.stub-barcode span {
  display: block;
  width: 2px;
  background: #2b1d0f;
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .ticket-scene { padding: 30px 24px; }
  .ticket { flex-direction: column; transform: rotate(0); }
  .ticket-stub {
    border-left: none;
    border-top: 2px dashed #a98a55;
    flex: 0 0 auto;
    padding: 18px 20px;
    flex-direction: row;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
  }
  .ticket-stub::before,
  .ticket-stub::after {
    top: -11px;
  }
  .ticket-stub::before { left: -10px; }
  .ticket-stub::after  { right: -10px; left: auto; }
  .stub-stage { transform: none; font-size: 44px; }
  .stub-stage-wrap { flex: 0 0 auto; }
}

@media (max-width: 720px) {
  .film-strip::before,
  .film-strip::after { width: 16px; }
  .film-strip{width:170px;}
  .film-inner { left: 16px; right: 16px; }
  .ticket-title { font-size: 32px; }
  .ticket-form { flex-direction: column; }
  .ticket-form button { width: 100%; }
}