*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #080818;
  --card-bg:      rgba(255, 255, 255, 0.03);
  --card-border:  rgba(255, 255, 255, 0.08);
  --poster-bg:    #04040e;
  --input-bg:     rgba(255, 255, 255, 0.07);
  --input-border: rgba(255, 255, 255, 0.13);
  --accent-1:     #b833e8;
  --accent-2:     #e0337a;
  --text:         #e8e8f0;
  --text-muted:   rgba(255, 255, 255, 0.48);
}

/* ── Страница: центрируем карточку ───────────────────────────── */
html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.5;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* ── Карточка ─────────────────────────────────────────────────── */
.page {
  display: flex;
  width: 100%;
  max-width: 900px;

  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

/* ── Левая: постер ────────────────────────────────────────────── */
.poster-side {
  flex: 0 0 392px;
  background: linear-gradient(90deg, #0e0719 0%, #0d051a 100%);
  border-right: 1px solid var(--card-border);

  /* Растягиваем img на всю высоту колонки */
  display: flex;
  align-items: stretch;
}

.poster-side img {
  width: 100%;
  height: 100%;               /* заполняем всю высоту карточки */
  object-fit: contain;        /* показывает постер целиком, без обрезки */
  object-position: center;
  display: block;
}

/* ── Правая: форма ────────────────────────────────────────────── */
.form-side {
  flex: 1;
  padding: 48px 44px;
  overflow-y: auto;
}

.form-wrap {
  width: 100%;
  max-width: 480px;
}

/* ── Шапка мероприятия ────────────────────────────────────────── */
.event-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 10px;
}

.event-title {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 55%, rgba(255,255,255,.5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.event-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 30px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Поля формы ───────────────────────────────────────────────── */
.field {
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row .field {
  margin-bottom: 14px;
}

.field-guests input {
  max-width: 110px;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.req {
  color: var(--accent-2);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 10px 13px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.93rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

input:focus {
  border-color: var(--accent-1);
  background: rgba(255, 255, 255, 0.095);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

/* ── Чекбокс согласия ─────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 20px;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 2px;
  accent-color: var(--accent-1);
  cursor: pointer;
}

.pd-link {
  color: var(--accent-1);
  text-decoration: none;
}
.pd-link:hover { text-decoration: underline; }

/* ── Кнопка ───────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.97rem;
  font-weight: 700;
  font-family: inherit;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  transition: opacity 0.18s, transform 0.13s;
  text-decoration: none;
}

.btn:hover    { opacity: 0.87; }
.btn:active   { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.submit-btn {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
}

/* ── Ошибка формы ─────────────────────────────────────────────── */
.form-error {
  background: rgba(255, 70, 70, 0.1);
  border: 1px solid rgba(255, 70, 70, 0.28);
  color: #ff9090;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ── Модалка успеха ───────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
  padding: 20px;
}

.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #10102a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 40px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  transform: translateY(18px);
  transition: transform 0.22s;
}

.modal.open .modal-box {
  transform: translateY(0);
}

.modal-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 18px;
  color: #fff;
}

.modal-box h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.modal-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
  line-height: 1.6;
}

/* ── Адаптив ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .poster-side {
    flex: 0 0 320px;
  }
  .form-side {
    padding: 36px 28px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
    align-items: flex-start;
  }

  .page {
    flex-direction: column;
    border-radius: 0;
    border: none;
    min-height: 100vh;
  }

  .poster-side {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
  }

  .poster-side img {
    max-height: 100vw;
    min-height: 180px;
  }

  .form-side {
    padding: 28px 20px 48px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
