body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    color: grey;
}

.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: grey;
}

.menu {
    justify-content: flex-end;
    background-color: #333;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    z-index: 2;
}

.menu a {
    color: grey;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
}

.burger {
    display: none;
}

@media (max-width: 768px) {
    .menu a { display: none; }
    .burger {
        display: block;
        font-size: 30px;
        cursor: pointer;
    }

    .menu.responsive {
        position: absolute;
        top: 0;
        right: 0;
        background-color: #333;
        width: 100%;
        height: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .menu.responsive a {
        display: block;
        margin: 15px 0;
        font-size: 24px;
    }
}

.upload-btn {
    display: none;
}

.file-preview {
    display: none;
    margin: 20px auto;
    max-width: 80%;
    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% ширины экрана */
    }
}

/* Убедитесь, что секции будут занимать всю ширину и не перекрываются */
section {
    width: 100%;
    margin-top: 72px; /* Добавим отступ между секциями */
    margin-bottom: 72px; /* Добавим отступ между секциями */
}

/* Настроим .container внутри второй секции */
.container {
    max-width: 1200px; /* Ограниченная ширина */
    margin: 0 auto;    /* Центрируем .container */
    padding: 20px;     /* Отступы внутри контейнера */
    color: grey; /* Текст будет белым */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #ba68c8, #0f4e75);
    padding: 10px 20px;
    color: grey;
    font-family: 'Segoe UI', sans-serif;
    position: relative;
    max-width: 1200px; /* Ограниченная ширина */
    margin: 0 auto;     /* Центровка блока */
}

.nav-links a.active {
  color: #ba68c8;
  font-weight: bold;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: grey;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

.logo a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f1f1;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: grey;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ba68c8;
}

/* Бургер-меню */
.burger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: #2c3e50;
        position: absolute;
        top: 60px;
        right: 20px;
        width: 150px;
        border-radius: 8px;
        overflow: hidden;
        z-index: 999; /* Добавлено */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Для визуального эффекта */
    }

    .nav-links a {
        padding: 10px;
        border-bottom: 1px solid #34495e;
    }

    .nav-links.show {
        display: flex;
    }

    .burger {
        display: block;
        z-index: 1000; /* Чтобы бургер был поверх */
        position: relative;
    }
}

/* Основной стиль формы */
.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: grey;
    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 {
    width: 80%; /* Используем 100% ширины родительского контейнера */
    max-width: 400px; /* Ограничиваем максимальную ширину */
    padding: 12px;
    margin-bottom: 15px;
    font-size: 16px;
    color: grey;
    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;  /* Уменьшаем шрифт */
    }
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: grey;
  margin-bottom: 40px;
  position: relative;
}

.section-description {
  text-align: center;
  font-size: 1.5rem;
  color: grey;
  margin-bottom: 40px;
  position: relative;
}

.section-pre {
  text-align: center;
  font-size: 1.0rem;
  color: grey;
  position: relative;
}

.full-text {
  text-align: center;
  font-size: 1.5rem;
  color: grey;
  position: relative;
  padding-top: 24px;
  padding-bottom: 24px;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #ba68c8;
  margin: 10px auto 0;
  border-radius: 2px;
}

.fortunetellers {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
}

.fortuneteller {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(106, 27, 154, 0.15);
  padding: 20px;
  width: 280px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catteller {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(106, 27, 154, 0.15);
  padding: 20px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catteller p {
  color: #555; 
}

.fortuneteller:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(106, 27, 154, 0.25);
}

.fortuneteller-image {
  border-radius: 50%;
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 15px;
  border: 4px solid #ba68c8;
}

.fortuneteller-name {
  font-size: 1.25rem;
  color: #6a1b9a;
  font-weight: bold;
  margin-bottom: 10px;
}

.fortuneteller-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .fortunetellers {
    flex-direction: column;
    align-items: center;
  }
}

.psychic-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 768px) {
  .psychic-card {
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .psychic-card {
    width: 100%;
  }
}

.psychic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.psychic-card a {
  text-decoration: none;
  color: #6a1b9a;
}

.psychic-card a h2 {
  font-size: 1.8rem;
  margin: 0 0 10px;
  transition: color 0.2s ease;
}

.psychic-card a:hover h2 {
  color: #ab47bc;
}

.psychic-card p {
  margin: 5px 0;
  color: #555;
  line-height: 1.5;
}

.psychic-card p:first-of-type {
  font-size: 0.95rem;
  color: #888;
}

.site-footer {
    background-color: #2c003e;
    color: grey;
    padding: 40px 20px 20px;
    font-size: 0.95rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 220px;
}

.footer-column h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #ba68c8;
}

.footer-column p,
.footer-column ul {
    margin: 0;
    color: #ddd;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.85rem;
    color: #aaa;
}

.questions-feed {
  padding: 40px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #222;
}

.question-text {
  font-size: 16px;
  color: #444;
  margin-bottom: 15px;
}

.question-meta {
  font-size: 14px;
  color: #999;
}

.seo-paragraph {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.seo-subtitle {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.seo-list {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 30px;
}

.seo-list li {
  font-size: 17px;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Адаптивность */
@media (max-width: 600px) {
  .seo-subtitle {
    font-size: 20px;
  }

  .seo-paragraph,
  .seo-list li {
    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);
}

#fortuneTextDisplay {
    max-width: 1200px; /* Ограниченная ширина */
    margin: 0 auto;    /* Центрируем .container */
    padding: 20px;     /* Отступы внутри контейнера */
    color: white; /* Текст будет белым */
    text-align: center;
}