:root {
  --logo-top: 5%;
  --logo-width: 30%;
  --logo-max-width: 240px;

  --button-bottom: 8%;
  --button-width: 82%;
  --button-max-width: 320px;

  --form-field-gap: 6px;
  --form-upload-gap: 20px;
  --form-consent-gap: 20px;

  --thankyou-top: 20%;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.modal-open {
  padding-right: 0 !important;
  overflow: hidden !important;
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.7);
}

.phone-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../Design/BackgroundMain.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.logo-img {
  position: absolute;
  top: var(--logo-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--logo-width);
  max-width: var(--logo-max-width);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

.btn-start {
  position: absolute;
  bottom: var(--button-bottom);
  left: 50%;
  transform: translateX(-50%);
  width: var(--button-width);
  max-width: var(--button-max-width);
  border: none;
  border-radius: 0;
  padding: 16px 0;
  background-color: #7a0019;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-start:hover {
  background-color: #93001f;
}

.btn-start:active {
  transform: translateX(-50%) scale(0.97);
  background-color: #5c0013;
}

/* ============ Form page (form.html) ============ */

.phone-frame--form {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}


.phone-frame--form {
  background-image: url('../Design/BackgroundForm.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.phone-frame--form::before {
  content: none;
}

.form-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 55% 24px 40px;
}

.form-title {
  color: #ffffff;
  font-size: 1.15rem;
  text-align: center;
  margin: 0 0 24px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.form-field {
  width: 100%;
  max-width: 360px;
  border: none;
  background-color: rgba(245, 245, 245, 0.95);
  color: #000000;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
  padding: 16px 12px;
  margin-bottom: var(--form-field-gap);
  font-size: 0.95rem;
}

.form-field::placeholder {
  color: #000000;
  opacity: 1;
  font-weight: 700;
  text-align: center;
}

.upload-field {
  position: relative;
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(245, 245, 245, 0.95);
  margin-bottom: var(--form-upload-gap);
  padding: 16px 12px;
  cursor: pointer;
}

.upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-field__grid {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.upload-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.upload-field__grid span {
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.consent-row {
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 var(--form-consent-gap);
}

.consent-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #7a0019;
}

.consent-row label {
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.terms-link {
  color: #ffffff;
  font-size: 0.9rem;
  text-decoration: underline;
  margin-bottom: 32px;
}

.btn-start--inline {
  position: static;
  transform: none;
  margin: 0 0 20px;
}

.btn-start--inline:active {
  transform: scale(0.97);
}

/* ============ Terms and Conditions popup ============ */

.terms-modal .modal-dialog {
  max-width: 320px;
  margin: 1.5rem auto;
}

.terms-modal-content {
  position: relative;
  background-color: #ffffff;
  border: none;
  border-radius: 18px;
  padding: 30px 20px 20px;
}

.terms-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 700;
  color: #000000;
  padding: 0;
}

.terms-modal-body {
  max-height: 65vh;
  overflow-y: auto;
  padding: 0 4px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.terms-heading {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  margin: 0 0 10px;
}

.terms-modal-body ul {
  padding-left: 18px;
  margin-bottom: 18px;
}

.terms-modal-body li {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #1a1a1a;
  margin-bottom: 8px;
}

/* ============ Last scene page (lastscene.html) ============ */

.phone-frame--ended::before {
  background-image: url('../Design/BackgroundEnded.jpg');
}

.thankyou-text {
  position: absolute;
  top: var(--thankyou-top);
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 320px;
  margin: 0;
  color: #ffffff;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ============ Scene transition animations ============ */

@keyframes sceneFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes sceneFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translate(-50%, -18px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate(-50%, 18px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bgZoomIn {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1);
  }
}

@keyframes bgZoomOut {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}

body.page-entering .phone-frame {
  animation: sceneFadeIn 0.5s ease-out both;
}

body.page-entering .phone-frame::before {
  animation: bgZoomIn 0.9s ease-out both;
}

body.page-entering .logo-img {
  animation: dropIn 0.55s ease-out 0.1s backwards;
}

body.page-entering .form-title {
  animation: fadeUpIn 0.55s ease-out 0.2s backwards;
}

body.page-entering .thankyou-text {
  animation: dropIn 0.55s ease-out 0.2s backwards;
}

body.page-entering .btn-start:not(.btn-start--inline) {
  animation: riseIn 0.55s ease-out 0.3s backwards;
}

body.page-entering .btn-start--inline {
  animation: fadeUpIn 0.55s ease-out 0.3s backwards;
}

body.page-leaving .phone-frame {
  animation: sceneFadeOut 0.35s ease-in both;
}

body.page-leaving .phone-frame::before {
  animation: bgZoomOut 0.35s ease-in both;
}