:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --text: #ffffff;
  --bg: #050505;
  --panel: rgba(10, 10, 10, 0.55);
  --panel-border: rgba(255, 255, 255, 0.14);
  --accent: #ff2b55;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

.video-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.video-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

#bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(1.05) contrast(1.05);
}

.ui {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));
  pointer-events: none;
}

.cta-row {
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.cta {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 43, 85, 0.96), rgba(255, 43, 85, 0.78));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 14px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  transition: transform 120ms ease, filter 120ms ease;
}

.cta:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.cta:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.logo-bar {
  pointer-events: auto;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ticket-logo {
  appearance: none;
  min-width: 120px;
  height: 50px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 120ms ease, background 120ms ease;
  user-select: none;
  cursor: pointer;
}

.ticket-logo:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.ticket-logo:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.ticket-logo img {
  display: block;
  max-height: 100%;
  max-width: 140px;
  width: auto;
  height: auto;
  filter: brightness(0) invert(1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

body.modal-open .modal-backdrop {
  display: flex;
}

.modal {
  width: min(620px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.modal-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
}

.modal-close:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.modal-body {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-action {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-action.primary {
  background: rgba(255, 43, 85, 0.22);
  border-color: rgba(255, 43, 85, 0.55);
}

@media (max-width: 420px) {
  .cta {
    padding: 13px 16px;
  }

  .ticket-logo {
    min-width: 110px;
    height: 46px;
  }

  .modal {
    padding: 16px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bg-video {
    display: none;
  }
}
