.add-review-btn {
  position: absolute;
  top: 60px;
  right: 100px;
  padding: 6px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #01406c;
  background: #b4e5ff77;
  border: 1px solid rgba(255, 255, 255, 0.713);
  border-radius: 35px;
  box-shadow:
    0 0 3px rgba(0, 0, 0, 0.091);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  z-index: 4;
  backdrop-filter: blur(5px) saturate(1.3);
  -webkit-backdrop-filter: blur(5px) saturate(1.3);
}

.add-review-btn:hover {
  transform: scale(1.08);
  background: #ffffff84;
  box-shadow:
    0 0 3px rgba(0, 0, 0, 0.2);
  color: #002a47;
}

.add-review-btn:active {
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Затемнение и блюр фона */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

/* Само стеклянное модальное окно */
.modal-content {
  padding: 30px 25px;
  border-radius: 65px;
  width: 90%;
  max-width: 500px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(222, 249, 255, 0.479);
  backdrop-filter: blur(15px) saturate(1.3);
  -webkit-backdrop-filter: blur(15px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.619);
  box-shadow:
    0 8px 12px 0 rgba(62, 62, 62, 0.222),
    inset -1px 1px 4px rgba(255, 255, 255, 0.15);
  color: #01406c;
}

/* Убрана анимация при наведении */
.modal-content:hover {
  transform: translate(-50%, -50%);
  box-shadow:
    0 8px 12px 0 rgba(62, 62, 62, 0.222),
    inset -1px 1px 4px rgba(255, 255, 255, 0.15);
}

/* Кнопка закрытия */
.modal-content .close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #cccccc;
  transition: color 0.3s ease, transform 0.3s ease;
}

.modal-content .close:hover {
  color: #000;
  transform: scale(1.2);
}

/* Группа формы */
.modal-content .form-group {
  position: relative;
  margin-bottom: 25px;
}

/* Поля ввода */
.modal-content .modal-input,
.modal-content .modal-textarea {
  width: 100%;
  padding: 18px 26px;
  font-size: 1rem;
  border-radius: 35px;
  border: none;
  background: #cbf7ffbc;
  color: #32758f;
  box-shadow: 0 0 3px #0000000d;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.modal-content .modal-textarea {
  height: 200px;
  resize: none;
  border-radius: 50px;
  padding: 26px;
}

.modal-content .modal-input:focus,
.modal-content .modal-textarea:focus {
  outline: none;
  box-shadow: 0 0 7px #6799ff5c;
  transform: scale(1.01);
}

.modal-content .modal-input:hover,
.modal-content .modal-textarea:hover {
  box-shadow: 0 0 7px #6799ff5c;
  transform: scale(1.01);
}

/* Label (в роли placeholder) */
.modal-content .form-group label {
  position: absolute;
  left: 56px;
  top: 50%;
  margin-left: 15px;
  transform: translateY(-50%);
  color: #32758f;
  font-size: 1rem;
  pointer-events: none;
  transition: top 0.3s ease, font-size 0.3s ease, background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px) saturate(1.3);
  -webkit-backdrop-filter: blur(5px) saturate(1.3);
  padding: 0 9px;
  border-radius: 8px;
  opacity: 1; /* всегда видим */
}

/* При фокусе или если поле заполнено — поднимаем и уменьшаем label */
.modal-content .modal-input:focus + label,
.modal-content .modal-textarea:focus + label,
.modal-content .modal-input:not(:placeholder-shown) + label,
.modal-content .modal-textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 12px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.4);
  color: #01406c; /* можно чуть темнее для акцента */
  transform: translateY(0);
  opacity: 1; /* видим */
}

/* Placeholder всегда прозрачный */
.modal-content .modal-input::placeholder,
.modal-content .modal-textarea::placeholder {
  color: transparent;
}


/* Кнопка отправки */
.modal-content .submit-btn {
  padding: 15px;
  border-radius: 25px;
  border: none;
  outline: none;
  background: #ffffff7c;
  color: #013f6cc7;
  position: relative;
  z-index: 0;
  overflow: hidden;
  font-size: 1rem;
  width: 80%;
  box-shadow: 0 0 6px #00000018, inset -1px 1px 6px rgba(218, 235, 255, 0.499);
  border: 1px solid rgba(255, 255, 255, 0.38);
  max-width: 300px;
  margin: 30px auto 0;
  display: block;
  transition: all 0.4s ease-in-out;
}

.modal-content .submit-btn:hover {
  background: transparent;
  color: #000000;
  transform: scale(1.1);
}

/* Эффект свечения кнопки */
.modal-content .submit-btn:before {
  content: '';
  background: linear-gradient(45deg, #82a7bb, #c2e8fc, #76c5ef, #c2e8fc, #4fc1ff, #7fbada);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  animation: glowing 27s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in;
  border-radius: 25px;
}

.modal-content .submit-btn:hover:before {
  opacity: 1;
}

/* Анимация свечения кнопки */
@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

.modal-content .submit-btn:active {
  transform: scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (orientation: portrait) {
  .add-review-btn {
    position: absolute;
    top: 460px;
    width: auto;             /* не растягиваем на всю ширину */
    height: auto;            /* убираем растяжение по высоте */
    padding: 10px 20px;   
    left: 50%;               /* по центру */
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 500;
    color: #01406c;
    background: #b4e5ffc0;
    border: 1px solid rgba(255, 255, 255, 0.713);
    border-radius: 35px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.091);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: inline-block;   /* важное! чтобы не растягивалось */
    max-width: 90%;          /* ограничение ширины */
    z-index: 10;
    backdrop-filter: blur(5px) saturate(1.3);
    -webkit-backdrop-filter: blur(5px) saturate(1.3);
  }

  .add-review-btn:hover {
    transform: scale(1.08) translateX(-45%);
    background: #ffffff84;
    box-shadow:
      0 0 3px rgba(0, 0, 0, 0.2);
    color: #002a47;
  }

  .add-review-btn:active {
    transform: scale(0.9) translateX(-45%);
  }
}
