.photo-container {
    width: 100%;
    margin-top: 72px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.portal {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: url('/fotogadanie/avatar.jpg') no-repeat center center;
    background-size: cover;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 4.5s infinite;
    z-index: 0;
}

@keyframes pulse {
    0% { box-shadow: 0 0 20px rgba(0, 0, 255, 0.5); }
    50% { box-shadow: 0 0 40px rgba(0, 0, 255, 1); }
    100% { box-shadow: 0 0 20px rgba(0, 0, 255, 0.5); }
}

.portal:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 0, 255, 0.8);
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}



.upload-btn {
    display: none;
}

.file-preview {
    display: none;
    margin: 20px auto;
    max-width: 30%;
    border: 2px solid #fff;
    border-radius: 10px;
}

#questionForm {
    text-align: center;
    margin-top: 20px;
}

#questionForm input[type="text"] {
    padding: 10px;
    width: 80%;
    max-width: 400px;
    font-size: 16px;
}

#questionForm button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .container {
        max-width: 90%; /* Для мобильных устройств контейнер растягивается на 90% ширины экрана */
    }
}

/* Основной стиль формы */
.question-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    animation: pulse-form 4s infinite;
}

/* Анимация мигания */
@keyframes pulse-form {
    0%   { box-shadow: 0 0 20px rgba(106, 0, 255, 0.4); }
    50%  { box-shadow: 0 0 35px rgba(106, 0, 255, 0.8); }
    100% { box-shadow: 0 0 20px rgba(106, 0, 255, 0.4); }
}

/* Заголовок формы */
.form-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e0e0e0;
}

/* Стиль для input и textarea */
.form-input,
.form-textarea {
    max-width: 400px; /* Ограничиваем максимальную ширину */
    padding: 12px;
    margin-bottom: 15px;
    font-size: 16px;
    background-color: #1b1b1b;
    color: white;
    border: 1px solid #555;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Фокусировка на input/textarea */
.form-input:focus,
.form-textarea:focus {
    border-color: #bb86fc;
    box-shadow: 0 0 10px rgba(187, 134, 252, 0.6);
}

/* Кнопка */
.form-button {
    padding: 14px 30px;
    font-size: 18px;
    background-color: #6a00ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(106, 0, 255, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* Ховер для кнопки */
.form-button:hover {
    background-color: #ba68c8;
    color: black;
    box-shadow: 0 6px 16px rgba(106, 0, 255, 0.4);
}

/* Активное состояние кнопки */
.form-button:active {
    background-color: #4800aa;
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(106, 0, 255, 0.2);
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .question-form {
        max-width: 90%; /* Сделаем ширину формы 90% от ширины экрана */
        padding: 15px;  /* Уменьшаем отступы */
    }

    .form-input,
    .form-textarea {
        padding: 10px;  /* Уменьшаем padding */
        font-size: 14px; /* Уменьшаем шрифт */
        max-width: 80%;
    }

    .form-button {
        padding: 12px 25px; /* Уменьшаем padding для кнопки */
        font-size: 16px;  /* Уменьшаем шрифт */
    }
}

/* Общие стили для bodys */
.bodys {
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#uploadForm {
  margin-bottom: 20px;
}

#imageInput {
  margin: 10px 0;
}

#resultImage {
  max-width: 600px;
  margin-top: 20px;
  display: none;
}

/* Стиль прелоадера */
#loaders {
  display: none;
  margin: 50px auto;
  border: 5px solid #f3f3f3; /* серый фон */
  border-top: 5px solid #ffd700;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Стиль для кнопки "Обзор" */
.custom-file-upload {
  display: inline-block;
  padding: 12px 24px;
  cursor: pointer;
  background-color: #ffd700;
  color: white;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.custom-file-upload:hover {
  background-color: #ffccff; /* Изменяем цвет при наведении */
  transform: scale(1.05); /* Легкое увеличение при наведении */
}

.custom-file-upload:active {
  background-color: #387c34; /* Изменяем цвет при клике */
}

/* Добавляем анимацию кнопке */
.custom-file-upload:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(72, 157, 72, 0.8);
}

.popup-close {
  margin-right: 72px;
}

.open-popup-btn {
  font-size: 24px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  animation: pulse 2s infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}

.open-popup-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0,0,0,0.5);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 15px rgba(255, 95, 109, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 195, 113, 1);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 15px rgba(255, 95, 109, 0.6);
    transform: scale(1);
  }
}

.second-block {
  background: linear-gradient(to bottom, #fdf6ff, #ffe9fb);
  padding: 60px 0;
  color: #3a003a;
  font-family: 'Segoe UI', sans-serif;
}

.second-block h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 30px;
  color: #620067;
}

.second-block p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.gadalkas-catalog {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.sidebar {
  flex: 0 0 180px;
}

.category {
  padding: 12px 20px;
  margin-bottom: 10px;
  background-color: #f3d9ff;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
}

.category:hover,
.category.active {
  background-color: #d895ff;
  color: #fff;
  font-weight: bold;
}

.gadalkas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1;
}

.gadalka-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(150, 0, 150, 0.1);
  padding: 20px;
  text-align: center;
  flex: 1 1 calc(50% - 20px);
  max-width: calc(50% - 20px);
  transition: transform 0.3s;
}

.gadalka-card:hover {
  transform: translateY(-5px);
}

.gadalka-card img {
  width: 100px;
  margin-bottom: 10px;
}

.gadalka-card h3 {
  margin: 10px 0 5px;
  font-size: 20px;
  color: #54006a;
}

.gadalka-card p {
  margin: 5px 0;
}

.gadalka-modal-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #8a2be2;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.gadalka-modal-btn:hover {
  background-color: #6a1bbf;
}

.questions-block {
  background: #f8f0ff;
  padding: 60px 0;
}

.questions-p{
  font-size: 18px;
  padding: 10px;
  text-align: center;
}

.questions-block h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 30px;
  color: #5e0073;
}

.question-card {
  background-color: #ffffff;
  border-left: 6px solid #9b00e8;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(155, 0, 232, 0.1);
}

.question-card h3 {
  font-size: 20px;
  color: #77009c;
}

.question-card p {
  margin: 8px 0;
  font-size: 16px;
}

#fortuneTextDisplay {
    max-width: 1200px; /* Ограниченная ширина */
    margin: 0 auto;    /* Центрируем .container */
    padding: 20px;     /* Отступы внутри контейнера */
    color: white; /* Текст будет белым */
    text-align: center;
}