:root {
    --index: calc(1vw + 1vh);
    --flowerScale: calc(1vw + 1vh);
}

@font-face {
    font-family: 'MTSWideMedium';
    src: url('/fonts/MTSWide-Medium-MH5A5AEJ.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
  }

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

html, body {
    font-family: 'MTSWideMedium', sans-serif;
    font-weight: 200;
    height: 100%;
    overflow: hidden;
    background-color: white;
    color: rgb(0, 0, 0);
    line-height: 1.5;
}

.main {
    position: relative;
    height: 100vh;
    width: 100vw;
}

.layers {
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer {
    height: 100%;
    width: 100%;
    position: absolute;
    background-size: cover;
    background-position: center;
}

.layer__main_bg {
    background-image: url('../image/bg_test.jpg');
}

.layer__flower__left {
    position: absolute;
    bottom: calc(10px + env(safe-area-inset-bottom, 0));
    left: calc(10px + env(safe-area-inset-left, 0));
    width: calc(var(--flowerScale) * 25);
    height: calc(var(--flowerScale) * 25);

    min-width: 120px;
    min-height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left bottom;
    z-index: 2;
}

.layer__flower__right {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top, 0));
    right: calc(10px + env(safe-area-inset-right, 0));
    width: calc(var(--flowerScale) * 25);
    height: calc(var(--flowerScale) * 25);;
    min-width: 120px;
    min-height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right top;
    z-index: 2;
}

.layer__text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
}

.text-wrapper {
    max-width: 90%;
}

.layer__text h1,
.layer__text h2,
.layer__text h3,
.layer__text h4,
.layer__text h5,
.layer__text h6 {
    display: block;
    margin: 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.layer__text h1 { font-size: calc(var(--index) * 3); }
.layer__text h2,h3,h5 { font-size: calc(var(--index) * 1.5); }
.layer__text h4 { font-size: calc(var(--index) * 3); }

.layer__text h6 { font-size: calc(var(--index) * 1); }

.layer__text h1,h4 {font-family: 'Great Vibes', bold;}

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .layer__text h1 { font-size: calc(var(--index) * 4); }
    .layer__text h2 { font-size: calc(var(--index) * 1.4); }
}

@media (max-width: 480px) {
    .layer__text h1 { font-size: calc(var(--index) * 4); }
    .layer__text h2 { font-size: calc(var(--index) * 1.2); }
}

@media (max-width: 360px) {
    .layer__text h1 { font-size: calc(var(--index) * 4); }
    .layer__text h2 { font-size: calc(var(--index) * 1); }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .layer__flower__left, .layer__flower__right {
        width: calc(var(--flowerScale) * 35);
        height: calc(var(--flowerScale) * 35);
        min-width: 150px;
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    .layer__flower__left, .layer__flower__right {
        width: calc(var(--flowerScale) * 35);
        height: calc(var(--flowerScale) * 35);
        min-width: 120px;
        min-height: 120px;
    }
}

@media (max-width: 360px) {
    .layer__flower__left, .layer__flower__right {
        width: calc(var(--flowerScale) * 35);
        height: calc(var(--flowerScale) * 35);
        min-width: 100px;
        min-height: 100px;
    }
}

.layer__flower__left {
    transform: translateX(-35px) translateY(35px);
}

.layer__flower__right {
    transform: translateX(35px) translateY(-35px);
}

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #6200ee;
    color: #fff;
    padding: 12px 18px;
    border-radius: 50px;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    z-index: 1000;
  }

  .floating-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
  }

  .floating-btn:hover {
    background-color: #3700b3;
    transform: scale(1.05);
  }

  #responseMessage {
    text-align: center;
    margin-top: 10px;
    font-weight: normal;
    font-size: 1.1rem;
  }

  .floating-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .floating-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
  }

  .floating-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffced9;
    color: #fff;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
  }

  .floating-main:hover {
    transform: scale(1.1);
    background-color: #ffced9;
  }

  .floating-main i {
    font-size: 1.5rem;
  }
  .floating-main,
  .floating-item,
  button {
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
  .floating-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    align-items: flex-end;
  }

  .floating-list > * {
    transform: translateX(-0px) translateY(-10px);
  }

  .floating-wrapper.active .floating-list {
    opacity: 1;
    pointer-events: auto;
  }

  .floating-item {
    background-color: #0088cc;
    color: #fff;
    padding: 12px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    transition: transform 0.3s ease, background-color 0.3s ease;
  }

  .floating-item:hover {
    transform: scale(1.05);
    background-color: #006699;
  }

  button {
    margin-top: 20px;
    font-family: 'Lato', sans-serif;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #f97a91;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    width: auto;
    max-width: 200px;
    align-self: center;
  }

  button:hover {
    background-color: #f1b3be;
  }

  @media (max-width: 360px) {
    .floating-wrapper {
        transform: translateX(45px);
    }
    .floating-list > * {
        transform: translateX(-35px) translateY(-10px);
      }
}
