body, html {
  margin: 0; padding: 0;
  width: 100vw; height: 100vh;
  font-family: Arial, sans-serif;
  overflow: hidden;
}
#bg {
  position: fixed;
  width: 100vw; height: 100vh;
  z-index: 1;
}
#bg img {
  width: 100vw; height: 100vh;
  object-fit: cover;
  display: block;
}
#overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.5);
}
.modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: transparent;
}
.modal-content {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  padding: 30px 24px;
  max-width: 90vw;
  width: 350px;
  text-align: center;
  position: relative;
}
h2 {
  margin-top: 0;
  font-weight: bold;
  font-size: 1.5rem;
}
p {
  font-size: 1rem;
  margin-top: 12px;
  margin-bottom: 12px;
  line-height: 1.4;
}
a {
  color: #556BFF;
  text-decoration: underline;
  cursor: pointer;
}
button {
  background-color: #6c63ff;
  border: none;
  border-radius: 10px;
  color: white;
  padding: 12px 40px;
  margin-top: 16px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}
button:hover {
  background-color: #554ff7;
}

#legalPopup {
  z-index: 1100; /* Выше, чем consentModal */
}

/* Второй попап - полноэкранный */
#legalPopup.modal {
  background: rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  justify-content: flex-end;
}
#legalPopup.visible {
  display: flex;
}
#legalPopup .modal-content {
  width: 100%;
  max-width: none;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 40px 40px 0 0;
  padding-top: 40px;
  box-sizing: border-box;
  position: relative;
}
/* Черточка для свайпа */
#dragIndicator {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 3px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  cursor: grab;
}

.legal-page, .legal-text {
  text-align: left;
  padding: 8px 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background: none; /* не перекрывать фон */
}

.legal-page h1, .legal-page h2, .legal-page h3 {
  text-align: center;
  margin-top: 1.2em;
}
.legal-page h1 {
  font-size: 2em;
}
.legal-page h2 {
  font-size: 1.4em;
}
.legal-page h3 {
  font-size: 1.2em;
}


.close-btn {
  display: block;
  margin: 24px auto 0 auto;
  padding: 12px 40px;
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
}


#consentModal {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}

#consentModal .modal-content {
  width: 100vw;
  max-width: 440px;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
  background: #fff;
  padding: 32px 24px;
  margin-bottom: 0;
  pointer-events: auto;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.42, 0, 0.58, 1) 1s, opacity 0.8s;
}

#consentModal.visible .modal-content {
  transform: translateY(0%);
  opacity: 1;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}
