body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Более современный шрифт */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background: linear-gradient(to bottom right, #0a0a2a, #1a0a2a, #0a1a2a);
    /* Темный футуристический фон */
    padding: 5px;
    box-sizing: border-box;
    color: #e0e0e0;
    /* Светлый текст по умолчанию */
}


/* Стили для контейнера */

.container {
    background: rgba(255, 255, 255, 0.05);
    /* Полупрозрачный фон для glass-morphism */
    padding: 5px;
    border-radius: 18px;
    /* Более скругленные углы */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    /* Более выраженная тень */
    backdrop-filter: blur(15px);
    /* Усиленный эффект размытия */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Тонкая светлая рамка */
    width: 100%;
    max-width: 700px;
    /* Немного шире для лучшего восприятия */
    text-align: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: fadeInUp 0.8s ease-out forwards;
    /* Анимация появления контейнера */
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h1 {
    color: #00eaff;
    /* Яркий акцентный цвет для заголовка */
    margin-bottom: 25px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
    /* Эффект свечения */
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}


/* Стили для подсказки */

.input-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #b0e0e6;
    line-height: 1.4;
    opacity: 0.8;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #b0e0e6;
    /* Более светлый цвет для меток */
    font-size: 14px;
    font-weight: 500;
}

.input-group input[type="text"],
.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    /* Полупрозрачный фон */
    border: 1px solid rgba(0, 234, 255, 0.3);
    /* Голубая рамка */
    border-radius: 8px;
    font-size: 16px;
    color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    outline: none;
}

.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus {
    border-color: #00eaff;
    /* Ярче при фокусе */
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
    /* Свечение при фокусе */
}

.timeframe-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.timeframe-btn {
    background-color: rgba(0, 234, 255, 0.1);
    /* Полупрозрачный голубой */
    color: #e0e0e0;
    border: 1px solid rgba(0, 234, 255, 0.3);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.timeframe-btn:hover {
    background-color: rgba(0, 234, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 8px rgba(0, 234, 255, 0.5);
}

.timeframe-btn.active {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    /* Яркий градиент */
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 198, 255, 0.7);
    border-color: #00c6ff;
    transform: translateY(0);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    /* padding: 5px 0; */
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    accent-color: #00eaff;
    /* Яркий акцент для чекбокса */
    filter: drop-shadow(0 0 5px rgba(0, 234, 255, 0.5));
    /* Свечение чекбокса */
}

#analyzeBtn {
    background: linear-gradient(45deg, #28a745, #007bff);
    /* Градиент как на стартовой кнопке */
    color: #ffffff;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 100%;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

#analyzeBtn:hover {
    background: linear-gradient(45deg, #218838, #0056b3);
    /* Темнее при наведении */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}


/* Стили для счетчика запросов */

.request-counter {
    font-size: 14px;
    color: #b0e0e6;
    margin-bottom: 20px;
    text-align: right;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(0, 234, 255, 0.1);
    box-shadow: inset 0 0 5px rgba(0, 234, 255, 0.2);
}

.request-counter span {
    font-weight: bold;
    color: #00eaff;
    text-shadow: 0 0 5px rgba(0, 234, 255, 0.5);
}


/* Стили для страницы "Лимит запросов исчерпан" */

.limit-exceeded-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    /* Тот же фон, что и на приветственном */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Поверх всего */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-out;
}

.limit-exceeded-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.limit-content {
    background: rgba(255, 255, 255, 0.05);
    /* Как основной контейнер */
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px;
    margin: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    /* Начальное состояние для анимации */
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.limit-exceeded-screen.active .limit-content {
    transform: scale(1);
    opacity: 1;
}

.limit-content h2 {
    color: #ff4500;
    /* Оранжевый/красный цвет для предупреждения */
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.limit-content p {
    font-size: 15px;
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 15px;
}

.limit-content .small-text {
    font-size: 12px;
    color: #b0e0e6;
    margin-top: 20px;
}

.limit-content .small-text span {
    font-weight: bold;
    color: #00eaff;
    text-shadow: 0 0 5px rgba(0, 234, 255, 0.5);
}

.contact-dev-button {
    display: inline-block;
    background: linear-gradient(45deg, #007bff, #28a745);
    /* Градиент как на кнопках */
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease-in-out;
    margin-top: 20px;
}

.contact-dev-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}


/* Стили для анимации загрузки */

.loading-spinner {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    color: #00eaff;
    font-size: 16px;
}

.loading-spinner p {
    margin-top: 15px;
    font-weight: bold;
    color: #00eaff;
    /* Цвет текста загрузки */
}

.spinner {
    border: 4px solid rgba(0, 234, 255, 0.2);
    /* Светло-голубой */
    border-top: 4px solid #00eaff;
    /* Ярко-голубой */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Стили для индикаторов статуса агентов */

.agent-status {
    margin-top: 25px;
    /* Увеличим отступ */
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    /* Увеличим отступ */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-status-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    /* Немного больше отступов */
    border: 1px solid rgba(0, 234, 255, 0.2);
    /* Тонкая голубая рамка */
    border-radius: 10px;
    /* Чуть более скругленные углы */
    background-color: rgba(255, 255, 255, 0.05);
    /* Полупрозрачный фон */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    /* Более заметная тень */
    font-size: 15px;
    color: #b0e0e6;
    /* Светлый текст */
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.agent-status-item.completed {
    border-color: #38a745;
    /* Зеленая рамка */
    background-color: rgba(40, 167, 69, 0.1);
    /* Светло-зеленый фон */
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
    /* Зеленое свечение */
}

.agent-status-item.in-progress {
    border-color: #ffc107;
    /* Желтая рамка */
    background-color: rgba(255, 193, 7, 0.1);
    /* Светло-желтый фон */
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
    /* Желтое свечение */
}

.status-dot {
    width: 14px;
    /* Чуть больше */
    height: 14px;
    border-radius: 50%;
    background-color: #555555;
    /* Темно-серый */
    margin-right: 12px;
    /* Чуть больше отступ */
    transition: background-color 0.3s ease-in-out;
}

.status-dot.in-progress {
    background-color: #ffc107;
    /* Желтый */
    animation: pulse-animation 1s infinite alternate;
}

.status-dot.completed {
    background-color: #28a745;
    /* Зеленый */
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}


/* Стили для кнопок переключения отчетов */

.report-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    /* Увеличим отступ */
    margin-bottom: 20px;
    border: 1px solid #00eaff;
    /* Яркая голубая рамка */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
    /* Легкое свечение группы кнопок */
}

.report-btn {
    flex-grow: 1;
    padding: 12px 15px;
    border: none;
    background-color: rgba(0, 234, 255, 0.1);
    /* Полупрозрачный голубой фон */
    color: #00eaff;
    /* Яркий голубой текст */
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.report-btn:hover {
    background-color: rgba(0, 234, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 234, 255, 0.5);
    /* Внутреннее свечение */
}

.report-btn.active {
    background: linear-gradient(45deg, #00eaff, #0072ff);
    /* Яркий градиент */
    color: #ffffff;
    font-weight: bold;
    box-shadow: inset 0 0 15px rgba(0, 198, 255, 0.8);
    /* Более сильное внутреннее свечение */
    border-color: transparent;
    /* Убираем рамку, она уже есть у родителя */
}

.report-btn:first-child {
    border-right: 1px solid rgba(0, 234, 255, 0.3);
    /* Разделитель между кнопками */
}


/* Стили для области результата */

.result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    /* Как основной контейнер */
    border: 1px solid rgba(0, 234, 255, 0.1);
    border-radius: 12px;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    /* Увеличим максимальную высоту */
    overflow-y: auto;
    color: #e0e0e0;
    /* Светлый текст */
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.result::-webkit-scrollbar {
    width: 8px;
}

.result::-webkit-scrollbar-thumb {
    background-color: rgba(0, 234, 255, 0.3);
    /* Голубой скроллбар */
    border-radius: 10px;
}

.result::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
}

.result h2 {
    font-size: 22px;
    /* Чуть больше */
    margin-top: 20px;
    margin-bottom: 15px;
    color: #00eaff;
    /* Акцентный цвет */
    text-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
}

.result pre {
    background-color: rgba(0, 234, 255, 0.05);
    /* Фон для кода */
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 15px;
    border: 1px dashed rgba(0, 234, 255, 0.2);
    /* Пунктирная рамка */
    color: #aaffff;
}


/* Стили для рендеринга Markdown в финальном отчете */

.final-report h1 {
    font-size: 28px;
    /* Больше */
    margin-top: 30px;
    margin-bottom: 20px;
    color: #00eaff;
    border-bottom: 1px solid rgba(0, 234, 255, 0.3);
    padding-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.final-report h2 {
    font-size: 24px;
    /* Больше */
    margin-top: 25px;
    margin-bottom: 12px;
    color: #00c6ff;
    text-shadow: 0 0 8px rgba(0, 198, 255, 0.4);
}

.final-report h3 {
    font-size: 20px;
    /* Больше */
    margin-top: 20px;
    margin-bottom: 10px;
    color: #0099ff;
}

.final-report p {
    line-height: 1.7;
    margin-bottom: 12px;
    color: #e0e0e0;
}

.final-report ul,
.final-report ol {
    margin-bottom: 12px;
    padding-left: 25px;
    color: #b0e0e6;
}

.final-report li {
    margin-bottom: 6px;
}

.final-report strong {
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.final-report code {
    background-color: rgba(0, 234, 255, 0.1);
    padding: 3px 6px;
    border-radius: 5px;
    font-family: 'Share Tech Mono', 'Consolas', 'monospace';
    /* Более футуристичный шрифт */
    font-size: 95%;
    color: #aaffff;
    border: 1px solid rgba(0, 234, 255, 0.3);
}

.final-report pre {
    background-color: rgba(0, 234, 255, 0.08);
    /* Чуть темнее */
    padding: 15px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 234, 255, 0.3);
    /* Солидная рамка */
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
}

.final-report pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.final-report hr {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    /* Футуристичный разделитель */
    margin: 30px 0;
}


/* Стили для Приветственного Экрана */

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    /* Анимированный градиентный фон */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Поверх всего */
    opacity: 0;
    pointer-events: none;
    /* Не реагирует на события, пока не активен */
    transition: opacity 0.8s ease-out;
}

.welcome-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.1);
    /* Полупрозрачный фон для glass-morphism */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    margin: 20px;
    text-align: center;
    max-width: 550px;
    /* Увеличена ширина для лучшей читаемости */
    width: 90%;
    transform: scale(0.9);
    /* Начальное состояние для анимации */
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.welcome-screen.active .welcome-content {
    transform: scale(1);
    opacity: 1;
}

.logo-container {
    margin-bottom: 25px;
}

.bot-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
    /* Голубое свечение */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    animation: pulse-logo 2s infinite alternate;
    object-fit: cover;
    object-position: center;
}

.bot-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 123, 255, 0.8);
}

@keyframes pulse-logo {
    0% {
        box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 25px rgba(0, 123, 255, 0.8);
    }
}

.description {
    font-size: 15px;
    /* Немного увеличен для читаемости */
    color: #e0e0e0;
    /* Светлый текст для темной темы */
    margin-bottom: 30px;
    /* Отступ под всем блоком описания */
    line-height: 1.6;
    /* Немного увеличен для лучшей читаемости */
    padding: 0 15px;
    opacity: 0.9;
    /* Сделаем чуть менее прозрачным */
    letter-spacing: 0.5px;
    /* Добавляем межбуквенный интервал */
    text-shadow: 0 0 5px rgba(0, 198, 255, 0.3);
    /* Легкое свечение */
}

.description p {
    margin-bottom: 10px;
    /* Отступ между абзацами */
    line-height: 1.7;
    /* Улучшенная межстрочная высота для абзацев */
}

.description p:last-child {
    margin-bottom: 0;
    /* Убираем нижний отступ у последнего абзаца */
}

.gradient-text {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    /* Градиентный текст */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.start-button {
    background: linear-gradient(45deg, #28a745, #007bff);
    /* Яркий градиент */
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.6);
}

.start-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    /* Эффект свечения при наведении */
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out;
    z-index: -1;
}

.start-button:hover::after {
    width: 200%;
    height: 200%;
    opacity: 1;
}


/* Утилитарные классы для JS анимаций */

.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.fade-out-up {
    animation: fadeOutUp 0.6s ease-out forwards;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
}

@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}