/* Стили для страницы AI генератора */
fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fcfcfc;
}

legend {
    font-weight: bold;
    color: #0056b3;
    padding: 0 10px;
    font-size: 1.2em;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 5px;
}

.checkbox-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

#generate-button, #show-unlock-modal-button {
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

#generate-button:hover, #show-unlock-modal-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

/* --- Стили для результатов --- */
#results-container, #results-preview-container {
    margin-top: 30px;
}

.loading-spinner {
    text-align: center;
    font-size: 1.5em;
    padding: 40px;
    color: #007bff;
}

.result-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #007bff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.result-card h3 {
    margin-top: 0;
    font-size: 1.8em;
    color: #0056b3;
}
.result-card h3 .full-name {
    font-weight: normal;
    color: #555;
    font-size: 0.7em;
}

.result-card .reasoning {
    font-style: italic;
    color: #444;
    margin-bottom: 15px;
    border-left: 3px solid #eee;
    padding-left: 15px;
}
.result-card .analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.analysis-item {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}
.analysis-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

/* --- НОВЫЕ СТИЛИ ДЛЯ ПРЕВЬЮ --- */
.result-placeholder {
    position: relative;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 150px;
    filter: blur(8px);
    user-select: none;
    -webkit-user-select: none;
}
.result-placeholder::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    opacity: 0.5;
}


/* --- Стили для модального окна --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 650px; /* Увеличил ширину для двух колонок */
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.share-buttons {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    transition: opacity 0.2s;
}
.share-btn:hover {
    opacity: 0.9;
}
.share-btn.vk { background-color: #4a76a8; }
.share-btn.tg { background-color: #0088cc; }

#unlock-after-share-button {
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}
#unlock-after-share-button:hover {
    background-color: #218838;
}

/* === Стили для блока обратной связи === */
#feedback-section {
    margin-top: 40px;
    padding: 25px;
    border: 2px dashed #007bff;
    border-radius: 8px;
    text-align: center;
    background-color: #f8f9fa;
}

#feedback-section h3 {
    margin-top: 0;
    color: #0056b3;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.feedback-rate-btn, #feedback-submit-btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background-color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
}

.feedback-rate-btn:hover, #feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.feedback-rate-btn.selected {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.feedback-comment-area {
    margin-top: 20px;
}

#feedback-comment {
    width: 100%;
    max-width: 600px;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

#feedback-submit-btn {
    background-color: #007bff;
    color: white;
    border: none;
}

#feedback-thanks p {
    font-size: 1.2em;
    font-weight: bold;
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 15px;
}

/* Стили для нового модального окна */
.modal-content h3 {
    margin-top: 0;
}

.unlock-options {
    margin-top: 25px;
    display: flex;
    justify-content: center; /* Это свойство отцентрирует блок оплаты */
    gap: 20px;
    align-items: stretch;
}

.unlock-option {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #fcfcfc;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.unlock-option h4 {
    margin-top: 0;
    color: #0056b3;
}
.unlock-option p {
    flex-grow: 1;
}

.unlock-btn.pay-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #ff9800; /* Изменил цвет для акцента */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
    font-size: 1.1em;
}

.unlock-btn.pay-btn:hover {
    background-color: #f57c00;
}


.payment-waiting {
    text-align: center;
    padding: 20px;
    background-color: #e9ecef;
    border-radius: 8px;
    margin-top: 20px;
}
/* Стили для кнопки "Оплатить еще раз" */
.pay-again-btn {
    display: inline-block;
    padding: 10px 18px;
    margin-top: 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.pay-again-btn:hover {
    background-color: #0056b3;
}

/* --- НОВЫЕ СТИЛИ ДЛЯ БЛОКА ДОВЕРИЯ --- */
.reviews-container {
    background-color: #f8f9fa;
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.review-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    padding: 15px;
    border-radius: 5px;
}
.review-text {
    font-style: italic;
    color: #333;
}
.review-author {
    text-align: right;
    font-weight: bold;
    color: #0056b3;
}

/* --- Стили для блока истории и возврата --- */
#generation-history-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#generation-history-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

#resume-generation-prompt {
    background-color: #e9f5ff;
    border: 1px solid #b3d7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}
#resume-generation-prompt p {
    margin: 0 0 15px 0;
}
#resume-generation-prompt button {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.history-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: block;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.history-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item .description {
    font-weight: 600;
}

.history-item .date {
    font-size: 0.9em;
    color: #6c757d;
}

.history-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.history-status.paid { background-color: #007bff; }
.history-status.shared { background-color: #28a745; }
.history-status.pending { background-color: #ffc107; color: #333; }
.history-status.canceled { background-color: #6c757d; }

.history-item.inaccessible {
    color: #999;
    pointer-events: none; /* Делаем ссылку некликабельной */
    cursor: not-allowed;
    background-color: #fdfdfd;
}

.history-item.inaccessible .history-item-content {
    opacity: 0.6;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .unlock-options {
        flex-direction: column;
    }
    .modal-overlay {
        align-items: flex-start; 
        overflow-y: auto;
    }
    .modal-content {
        width: 100%;
        min-height: 100%;
        border-radius: 0;
        box-sizing: border-box;
    }

    .review-author {
        text-align: center; /* Центрируем автора на мобильных */
    }
    .container {
        width: 100%;
        padding: 15px; /* Небольшой отступ, чтобы текст не прилипал к краям */
        box-shadow: none; /* Убираем тень */
        border: none; /* Убираем рамку, если она есть */
        box-sizing: border-box; /* Важное правило для правильного расчета ширины */
    }
    .reviews-grid {
        grid-template-columns: 1fr; /* Заставляем отзывы встать в один столбец */
    }
    .unlock-overlay span {
    font-size: 1em; /* Уменьшаем размер шрифта для подсказки */
}
}
/* --- Стили для нового блока "Живой ленты" --- */
#live-stats-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#live-stats-container.visible {
    opacity: 1;
}

.live-stats-header {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.live-stats-body p {
    margin: 5px 0;
    color: #555;
}

#live-activity-message {
    font-style: italic;
    transition: opacity 0.4s ease-in-out;
}

.stats-counter {
    font-size: 0.9em;
    text-align: right;
    color: #6c757d;
}

/* Контейнер для "замыливания" */
.preview-blurred {
    position: relative;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

/* Применяем фильтр размытия к самому содержимому, а не к контейнеру */
.preview-blurred .analysis-grid {
    filter: blur(6px);
    -webkit-filter: blur(6px);
    opacity: 0.7;
    transition: filter 0.3s ease;
}

/* Слой-подсказка поверх размытого блока */
.unlock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85); /* Полупрозрачный фон */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    color: #0056b3;
    z-index: 2;
    cursor: pointer;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    transition: background 0.3s ease;
}
.unlock-overlay:hover {
    background: rgba(233, 245, 255, 0.9);
}

/* Дополнительный текст-заполнитель, который мы добавили в JS */
.preview-filler-text {
    font-size: 0.9em;
    color: #777;
    margin-top: 8px;
    line-height: 1.4;
}

/* Стили для фейковой шкалы анализа */
.preview-score-bar-bg {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.preview-score-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}
/* Стили для кастомного плейсхолдера в поле даты */
input[type="date"]#dob::before {
    content: attr(placeholder);
    color: #999;
    margin-right: 0.5em;
}

input[type="date"]#dob:focus::before,
input[type="date"]#dob:valid::before {
    display: none;
}
/* --- НОВЫЕ СТИЛИ ДЛЯ РАНЖИРОВАНИЯ (Версия 2) --- */
.result-card h3 .rank-badge {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.8em;
    padding: 4px 12px;
    border-radius: 12px;
    background-color: #ffc107;
    color: #333;
    font-weight: bold;
    vertical-align: middle;
}

/* Контейнер для размытого результата */
.blurred-result-wrapper {
    position: relative; /* Основа для позиционирования оверлея */
    margin-bottom: 20px;
    cursor: pointer; /* Показываем, что можно нажать */
    border-radius: 8px;
    overflow: hidden; /* Скрываем все, что выходит за рамки */
}

/* Сам контент, который будет размыт */
.blurred-result-wrapper .blurred-content {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    pointer-events: none; /* Запрещаем взаимодействие с размытым текстом */
    user-select: none;    /* Запрещаем выделение размытого текста */
}

/* Оверлей с рангом, который будет поверх размытия */
.blurred-result-wrapper .rank-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Размещаем поверх размытого контента */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4); /* Легкий белый фильтр для читаемости */
    transition: background-color 0.3s ease;
}

.blurred-result-wrapper:hover .rank-overlay {
    background-color: rgba(233, 245, 255, 0.6); /* Подсветка при наведении */
}

/* Стили для значка ранга на оверлее */
.rank-overlay .rank-badge {
    font-size: 1.8em;
    padding: 10px 25px;
    border-radius: 50px;
    background-color: #ffdc73;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Подсказка под значком ранга */
.rank-overlay .unlock-prompt-text {
    margin-top: 15px;
    font-weight: bold;
    color: #0056b3;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
}
/* Стили для комбинированного поля даты и зодиака */
.form-group div[style*="display: flex"] {
    gap: 10px;
}

@media (max-width: 480px) {
    .form-group div[style*="display: flex"] {
        flex-direction: column;
    }
    .form-group div[style*="display: flex"] input,
    .form-group div[style*="display: flex"] select {
        width: 100% !important;
    }
}
/* === Стили для баннера AI-сравнения имён === */
.compare-service-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #5b4cdb 0%, #00c2a8 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 10px 24px rgba(91, 76, 219, 0.24);
    animation: pulse-glow-compare 2s infinite alternate;
}

@keyframes pulse-glow-compare {
    from { box-shadow: 0 10px 22px rgba(91, 76, 219, 0.2); }
    to { box-shadow: 0 12px 32px rgba(0, 194, 168, 0.36); }
}

.compare-service-banner-icon {
    font-size: 3em;
}

.compare-service-banner-text {
    flex-grow: 1;
}

.compare-service-banner-text h3 {
    margin: 0 0 6px 0;
    font-size: 1.5em;
    color: white !important;
    border: none !important;
}

.compare-service-banner-text p {
    margin: 0;
    opacity: 0.94;
    line-height: 1.45;
}

.compare-service-banner-button {
    background-color: #ffffff;
    color: #4b3ed2;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.compare-service-banner-button:hover {
    background-color: #f0f4ff;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .compare-service-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}