/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-start: #667eea;
    --bg-end: #764ba2;
    --text-color: #333;
    
    /* Dashboard переменные */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-primary: #6366f1;
    --accent-primary-light: rgba(99, 102, 241, 0.1);
}

html[data-theme="dark"] {
    --bg-start: #1f2937;
    --bg-end: #111827;
    --text-color: #f3f4f6;
    
    /* Dashboard темная тема */
    --bg-primary: rgba(15, 15, 35, 0.95);
    --bg-secondary: rgba(99, 102, 241, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-primary: #6366f1;
    --accent-primary-light: rgba(99, 102, 241, 0.2);
}

html[data-theme="light"] {
    /* Оставляем значения по умолчанию */
}

/* Плавное переключение */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    min-height: 100vh;
}

/* Утилиты */
/* Скрывает элемент; используется, например, для годовых цен по умолчанию */
.hidden {
    display: none !important;
}

/* Главная страница */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative; /* Для позиционирования пузырьков */
    overflow: hidden;
}

/* ---------------- Фоновые пузырьки ---------------- */
#bubble-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: bubbleMove var(--duration) ease-in-out infinite alternate;
}

@keyframes bubbleMove {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: var(--opacity);
    }
    50% {
        transform: translate(calc(var(--dx) * 0.5), calc(var(--dy) * 0.5)) scale(1.2);
        opacity: calc(var(--opacity) * 0.7);
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(1);
        opacity: var(--opacity);
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-brand h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-text {
    max-width: 800px;
    color: white;
}

.hero-text h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-text > p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.feature h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Кнопки */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh; /* Увеличим высоту */
    display: flex; /* Используем flexbox */
    flex-direction: column; /* Вертикальное направление */
    overflow: hidden; /* Скрываем overflow на главном контейнере */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0; /* Запрещаем сжиматься */
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #374151;
}

/* Формы */
.form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
}

.form-footer {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

.form-footer a {
    color: #4f46e5;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Личный кабинет */
.dashboard-body {
    background: #f8fafc;
    margin: 0;
    padding: 0;
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.header-content h1 {
    color: #1f2937;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-welcome {
    color: #6b7280;
    font-weight: 500;
}

.dashboard-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* Боковая панель */
.sidebar {
    flex: 0 0 320px;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.agents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.agent-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.agent-toggle:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.agent-toggle.active {
    border-color: #4f46e5;
    background: #eef2ff;
}

.agent-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.agent-info {
    flex: 1;
}

.agent-info .name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.agent-info .role {
    font-size: 0.875rem;
    color: #6b7280;
}

.agent-emoji {
    font-size: 1.5rem;
}

/* Специальные опции */
.special-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.special-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.special-toggle:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.special-toggle .agent-info .name {
    color: white;
    font-weight: 600;
}

.special-toggle .agent-info .role {
    color: rgba(255, 255, 255, 0.8);
}

/* Основная область чата */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
    position: relative;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 400px;
    max-height: calc(100vh - 400px); /* Ограничиваем высоту */
    scroll-behavior: smooth; /* Плавный скролл */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

/* Кастомный скроллбар для Webkit браузеров */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.welcome-message {
    text-align: center;
    color: #6b7280;
}

.welcome-message h2 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.empty-chat-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-chat-message h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-size: 1.25rem;
}

.empty-chat-message p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.agent-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.agent-card {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.agent-card .agent-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.agent-card h4 {
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.agent-card p {
    font-size: 0.875rem;
    color: #6b7280;
}

.message {
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    text-align: right;
}

.message.agent {
    text-align: left;
}

.message-content {
    display: inline-block;
    max-width: 80%;
    padding: 1rem;
    border-radius: 15px;
    word-wrap: break-word;
}

.message.user .message-content {
    background: #4f46e5;
    color: white;
    border-bottom-right-radius: 5px;
}

.message.agent .message-content {
    background: #f1f5f9;
    color: #1f2937;
    border-bottom-left-radius: 5px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.message.agent .message-header {
    color: #4f46e5;
}

.message.user .message-header {
    justify-content: flex-end;
    color: #6b7280;
}

/* Поле ввода чата */
.chat-input-container {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.active-agents {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.active-agent-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #eef2ff;
    color: #4f46e5;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-form textarea {
    flex: 1;
    min-height: 60px;
    max-height: 120px;
    resize: vertical;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
}

.chat-form textarea:focus {
    outline: none;
    border-color: #4f46e5;
}

.chat-actions {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.send-btn {
    padding: 0.75rem 1.5rem;
    height: fit-content;
    flex: 1;
}

.multi-agent-btn {
    padding: 0.75rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.multi-agent-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.multi-agent-btn small {
    font-size: 0.75rem;
    opacity: 0.8;
    text-align: center;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* История чатов */
.chat-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chat-history-header h3 {
    margin: 0;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px; /* Примерно 4 элемента по 80px каждый */
    overflow-y: auto;
    padding-right: 0.25rem; /* Отступ для скроллбара */
}

/* Стили для скроллбара */
.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.chat-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.chat-content {
    flex: 1;
    cursor: pointer;
    min-width: 0; /* Позволяет тексту сжиматься */
}

.chat-history-item:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.chat-history-item.active {
    background: #eef2ff;
    border-color: #4f46e5;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.chat-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.chat-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.chat-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 1rem;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.chat-delete-btn:hover {
    opacity: 1;
    background-color: #fee2e2;
    transform: scale(1.1);
}

.chat-delete-btn:active {
    transform: scale(0.95);
}

/* Уведомления */
.notifications {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

/* Стили для markdown контента */
.markdown-content {
    line-height: 1.7;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 1.2em 0 0.6em 0;
    font-weight: 600;
    line-height: 1.3;
}

.markdown-content h1 {
    font-size: 1.5em;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.3em;
}

.markdown-content h2 {
    font-size: 1.3em;
    color: #374151;
}

.markdown-content h3 {
    font-size: 1.2em;
    color: #4b5563;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-size: 1.1em;
    color: #6b7280;
}

.markdown-content p {
    margin: 0.8em 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.8em 0;
    padding-left: 1.5em;
}

.markdown-content li {
    margin: 0.3em 0;
}

.markdown-content blockquote {
    margin: 1em 0;
    padding: 0.8em 1.2em;
    background: #f9fafb;
    border-left: 4px solid #4f46e5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.markdown-content code {
    background: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

.markdown-content pre {
    margin: 1em 0;
    padding: 1em;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    border-radius: 0;
}

.markdown-content table {
    width: 100%;
    margin: 1em 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.markdown-content th,
.markdown-content td {
    padding: 0.6em 1em;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.markdown-content th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.markdown-content tr:last-child td {
    border-bottom: none;
}

.markdown-content tr:hover {
    background: #f9fafb;
}

.markdown-content a {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.markdown-content a:hover {
    border-bottom-color: #4f46e5;
}

.markdown-content strong {
    font-weight: 600;
    color: #1f2937;
}

.markdown-content em {
    font-style: italic;
    color: #4b5563;
}

.markdown-content hr {
    margin: 2em 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Специальные стили для markdown в сообщениях агентов */
.message.agent .markdown-content {
    color: #374151;
}

.message.agent .markdown-content h1,
.message.agent .markdown-content h2,
.message.agent .markdown-content h3 {
    color: #1f2937;
}

.message.agent .markdown-content blockquote {
    background: rgba(79, 70, 229, 0.05);
    border-left-color: #6366f1;
}

.message.agent .markdown-content code {
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
}

/* Стили для markdown в сообщениях пользователя */
.message.user .markdown-content {
    color: #f9fafb;
}

.message.user .markdown-content h1,
.message.user .markdown-content h2,
.message.user .markdown-content h3,
.message.user .markdown-content h4,
.message.user .markdown-content h5,
.message.user .markdown-content h6 {
    color: #ffffff;
}

.message.user .markdown-content blockquote {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #ffffff;
    color: #f3f4f6;
}

.message.user .markdown-content code {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.message.user .markdown-content pre {
    background: rgba(0, 0, 0, 0.3);
    color: #f9fafb;
}

.message.user .markdown-content th {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.message.user .markdown-content a {
    color: #93c5fd;
}

.message.user .markdown-content a:hover {
    border-bottom-color: #93c5fd;
}

/* Адаптивность */
/* Pricing Preview Section */
.pricing-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 2rem;
    color: white;
}

.pricing-preview-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.pricing-preview h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pricing-preview > p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.billing-toggle-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.yearly-savings-home {
    margin-top: 0.5rem;
    color: #10b981;
    font-weight: 600;
    text-align: center;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem 0;
    position: relative;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.popular-preview {
    transform: scale(1.05);
    border-color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.1) !important;
    margin-top: 1rem;
    z-index: 1;
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 6px 16px rgba(79, 70, 229, 0.6);
    }
}

.pricing-card-header {
    margin-bottom: 2rem;
}

.pricing-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.period {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
}

.features li {
    padding: 0.5rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.features li:last-child {
    border-bottom: none;
}

.pricing-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-btn.btn-trial {
    background: #10b981;
    color: white;
}

.pricing-btn.btn-trial:hover {
    background: #059669;
    transform: translateY(-2px);
}

.pricing-btn.btn-pro {
    background: #4f46e5;
    color: white;
}

.pricing-btn.btn-pro:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.pricing-btn.btn-ultra {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.pricing-btn.btn-ultra:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}

.pricing-footer {
    margin-top: 2rem;
}

.pricing-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.pricing-link:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .pricing-preview {
        padding: 3rem 1rem;
    }
    
    .pricing-preview h2 {
        font-size: 2rem;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .popular-preview {
        transform: none;
    }
    
    .popular-preview:hover {
        transform: translateY(-4px);
    }
    
    .pricing-preview {
        padding: 3rem 1rem;
    }
    
    .pricing-preview > p {
        margin-bottom: 1.5rem;
    }
    
    .billing-toggle-home {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .popular-preview {
        margin-top: 0.5rem;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        flex: none;
        order: 2;
    }
    
    .chat-main {
        order: 1;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .agent-info-cards {
        grid-template-columns: 1fr;
    }
    
    .chat-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .send-btn {
        align-self: flex-end;
        width: auto;
    }
}



/* Стили для сообщения ожидания */
.message.waiting {
    opacity: 0.8;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-left: 4px solid #6366f1;
}

.waiting-animation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.waiting-dots {
    animation: blink 1.5s infinite;
    font-weight: bold;
    color: #6366f1;
}

.waiting-text {
    font-style: italic;
    color: #6b7280;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

/* Стили для кошелька */
.wallet-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.wallet-section h3 {
    margin: 0 0 1rem 0;
    color: white;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.balance-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.balance-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd700;
}

.wallet-actions {
    display: flex;
    gap: 0.5rem;
}

.wallet-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

.pricing-info {
    text-align: center;
    opacity: 0.8;
}

.pricing-info small {
    font-size: 0.75rem;
}

/* Модальные окна кошелька */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh; /* Увеличим высоту */
    display: flex; /* Используем flexbox */
    flex-direction: column; /* Вертикальное направление */
    overflow: hidden; /* Скрываем overflow на главном контейнере */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0; /* Запрещаем сжиматься */
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto; /* Добавляем скролл только для тела */
    flex-grow: 1; /* Разрешаем телу расти */
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0; /* Запрещаем сжиматься */
}

/* Формы в модальных окнах */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: #6366f1;
    background: #f8faff;
}

.payment-method input[type="radio"] {
    margin: 0;
}

.payment-method input[type="radio"]:checked + .payment-icon + span {
    font-weight: 600;
}

.payment-method:has(input[type="radio"]:checked) {
    border-color: #6366f1;
    background: #f8faff;
}

.payment-icon {
    font-size: 1.2rem;
}

/* История транзакций */
.wallet-history-modal .modal-content {
    max-width: 600px;
}

.wallet-summary {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-weight: 500;
    color: #374151;
}

.summary-value {
    font-weight: bold;
    font-size: 1.1rem;
    color: #059669;
}

.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.transaction-item:hover {
    background: #f9fafb;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.transaction-date {
    font-size: 0.8rem;
    color: #6b7280;
}

.transaction-amount {
    font-weight: bold;
    font-size: 1rem;
}

.transaction-amount.positive {
    color: #059669;
}

.transaction-amount.negative {
    color: #dc2626;
}

.transaction-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 0.5rem;
}

.transaction-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.transaction-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.transaction-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Модальное окно подтверждения удаления */
.confirm-modal {
    z-index: 3000; /* Выше других модальных окон */
}

.confirm-modal .modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.confirm-content {
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: confirmModalIn 0.3s ease-out;
}

@keyframes confirmModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirm-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: none;
}

.confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 50%;
    margin: 0 auto 1rem;
    color: #dc2626;
}

.confirm-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.confirm-body {
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.confirm-body p {
    margin: 0 0 1rem;
    color: #4b5563;
    line-height: 1.6;
}

.confirm-body p:last-child {
    margin-bottom: 0;
}

.warning-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.confirm-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-footer .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn-danger svg {
    width: 16px;
    height: 16px;
}

/* Стили для выделения новых возможностей */
.feature-highlight {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border: 1px solid #29b6f6;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(41, 182, 246, 0.1);
    animation: featureGlow 3s ease-in-out infinite;
}

.feature-icon {
    font-size: 1.5em;
    animation: pulse 2s ease-in-out infinite;
}

.feature-highlight strong {
    color: #0277bd;
    font-weight: 600;
}

@keyframes featureGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(41, 182, 246, 0.1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(41, 182, 246, 0.2);
    }
}

/* Стили для промокодов */
.promo-code-section {
    margin: 1rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f3e8ff 0%, #e879f9 5%, #f3e8ff 100%);
    border-radius: 12px;
    border: 1px solid #d8b4fe;
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.promo-input-group input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.promo-input-group input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.promo-input-group input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.promo-input-group .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: auto;
}

.promo-result {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

.promo-result.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.promo-result.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.promo-result.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #3b82f6;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для итогового расчета в модальном окне */
.deposit-summary {
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.discount-row {
    color: #059669;
    font-weight: 500;
}

.discount-amount {
    color: #059669;
    font-weight: 600;
}

.total-row {
    border-top: 2px solid #cbd5e1;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.total-row span:last-child {
    color: #059669;
    font-size: 1.1rem;
}

/* Анимация для применения промокода */
.promo-applied {
    animation: promoSuccess 0.6s ease-out;
}

@keyframes promoSuccess {
    0% {
        transform: scale(1);
        background: white;
    }
    50% {
        transform: scale(1.02);
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    }
    100% {
        transform: scale(1);
        background: white;
    }
}

/* Стили для кнопки применения промокода */
.btn-secondary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Специальные стили для промокодов в истории транзакций */
.transaction-item.promo-code {
    background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
    border-left: 4px solid #8b5cf6;
}

.transaction-item.promo-code .transaction-description {
    color: #7c3aed;
    font-weight: 600;
}

.transaction-item.promo-code .transaction-amount {
    color: #059669;
}

/* Подсказки для промокодов */
.promo-hints {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
    font-size: 0.75rem;
    color: #6b7280;
}

.promo-hints ul {
    margin: 0;
    padding-left: 1rem;
    list-style-type: disc;
}

.promo-hints li {
    margin-bottom: 0.25rem;
}

/* Адаптивные стили для промокодов */
@media (max-width: 768px) {
    .promo-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .promo-input-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    .deposit-summary {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .summary-row {
        font-size: 0.85rem;
    }
}

/* Стили для кнопки поиска */
.search-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    min-width: 120px;
    flex-direction: column;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.search-btn small {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 2px;
    font-weight: 400;
}

.btn-accent {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Стили для результатов поиска */
.search-results {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.02));
}

.search-results .message-header .agent-name {
    color: #059669;
    font-weight: 600;
}

.search-results-list {
    margin: 1rem 0;
}

.search-result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.result-number {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

.result-content {
    flex: 1;
}

.result-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.result-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: #10b981;
    text-decoration: underline;
}

.result-description {
    margin: 0 0 0.5rem 0;
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95rem;
}

.result-url {
    margin: 0;
}

.result-url a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-all;
    transition: color 0.2s ease;
}

.result-url a:hover {
    color: #10b981;
    text-decoration: underline;
}

.search-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Адаптивные стили для поиска */
@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-number {
        min-width: auto;
        text-align: left;
    }
    
    .chat-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-btn {
        min-width: auto;
        width: 100%;
    }
}

/* Кнопка быстрого скролла вниз */
.scroll-to-bottom-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-to-bottom-btn:hover {
    background: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.scroll-to-bottom-btn.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.scroll-to-bottom-btn svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
} 

.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-menu-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-plan-label {
    font-size: 0.8rem;
    color: var(--accent-primary);
    background-color: var(--accent-primary-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 240px;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    transform: translateX(2px);
    color: var(--accent-primary);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

/* Специальный стиль для кнопки выхода */
#logoutBtn {
    color: #ef4444 !important;
}

#logoutBtn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* Стили для переключателя темы в выпадающем меню */
.theme-switcher {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #6366f1, #f43f5e);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.dropdown-section {
    padding: 4px;
}

.plan-info {
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.plan-info .plan-name {
    color: var(--text-primary);
}

.theme-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Переключатель темы */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4f46e5;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4f46e5;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Rounded slider */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Стили для модального окна смены тарифа */
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.plan-option {
    position: relative;
}

.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.plan-option label {
    display: block;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.plan-option label:hover {
    border-color: var(--accent-primary-dark);
    background-color: var(--accent-primary-light);
}

.plan-option input[type="radio"]:checked + label {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary-light);
    box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.plan-option.current label {
    border-color: var(--accent-secondary);
    background-color: var(--bg-secondary);
    cursor: default;
}

.plan-option-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.plan-option-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.current-badge {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary-dark);
    background-color: var(--accent-secondary-light);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Стили для кнопки управления подпиской */
.subscription-manage-btn {
    background: var(--bg-primary) !important;
    border: 1px solid var(--accent-primary) !important;
    color: var(--accent-primary) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.subscription-manage-btn:hover {
    background: var(--accent-primary) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
} 

/* Стили для подвала */
.dashboard-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background-color: var(--bg-secondary, #f8fafc);
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
}

.footer-nav {
    margin-top: 0.5rem;
}

.footer-nav a {
    color: var(--text-secondary, #6b7280);
    text-decoration: none;
    margin: 0 0.75rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent-primary, #4f46e5);
    text-decoration: underline;
}

/* Google Sign In Button Styles */
.btn-google {
    background: white;
    color: #757575;
    border: 1px solid #dadce0;
    justify-content: center;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.social-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.social-divider span {
    background: var(--bg-primary, #ffffff);
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .social-divider span {
        background: var(--bg-primary, #1f2937);
    }
}

/* Footer Styles */
.main-footer {
    background: var(--bg-secondary, #1f2937);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 2rem 2rem;
    position: relative;
    color: var(--text-light, #f9fafb);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--text-primary, #ffffff);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-light, rgba(255, 255, 255, 0.6));
    line-height: 1.6;
    max-width: 350px;
}

.footer-column h4 {
    color: var(--text-primary, #ffffff);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-light, rgba(255, 255, 255, 0.6));
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--primary-500, #6366f1);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light, rgba(255, 255, 255, 0.5));
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .main-footer {
        padding: 3rem 1rem 2rem;
    }

    .footer-brand p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-brand h3 {
        font-size: 1.25rem;
    }

    .footer-column h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Agents Section Styles */
.agents-section {
    background: var(--bg-primary, #111827);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.agents-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03) 0%, transparent 50%, rgba(99, 102, 241, 0.03) 100%);
    pointer-events: none;
}

.agents-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.agents-header {
    text-align: center;
    margin-bottom: 4rem;
}

.agents-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgb(139, 92, 246), rgb(99, 102, 241));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.agents-subtitle {
    font-size: 1.25rem;
    color: var(--text-light, rgba(255, 255, 255, 0.7));
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.agent-card {
    background: var(--bg-secondary, rgba(30, 30, 30, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2.5rem;
    position: relative;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(99, 102, 241, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card:hover::before {
    opacity: 1;
}

.agent-card:hover {
    transform: translateY(-10px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

.agent-card.featured {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.15);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, rgb(139, 92, 246), rgb(99, 102, 241));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

.agent-avatar {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
}

.agent-info {
    text-align: center;
    position: relative;
    z-index: 2;
}

.agent-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.5rem;
}

.agent-role {
    font-size: 1.125rem;
    color: var(--primary-500, rgb(139, 92, 246));
    margin-bottom: 1rem;
    font-weight: 600;
}

.agent-description {
    color: var(--text-light, rgba(255, 255, 255, 0.8));
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.agent-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: rgba(139, 92, 246, 0.2);
    color: rgb(139, 92, 246);
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.agents-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary, rgba(30, 30, 30, 0.5));
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.agents-cta h3 {
    font-size: 1.75rem;
    color: var(--text-primary, #ffffff);
    margin-bottom: 1rem;
    font-weight: 700;
}

.agents-cta p {
    color: var(--text-light, rgba(255, 255, 255, 0.7));
    margin-bottom: 2rem;
    font-size: 1.125rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.btn-agents-cta {
    background: linear-gradient(135deg, rgb(139, 92, 246), rgb(99, 102, 241));
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-agents-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.4);
}

/* Responsive agents section */
@media (max-width: 1024px) {
    .agents-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .agents-section {
        padding: 4rem 1rem;
    }

    .agents-title {
        font-size: 2.5rem;
    }

    .agents-subtitle {
        font-size: 1.125rem;
    }

    .agents-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .agents-cta {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .agent-card {
        padding: 2rem;
    }

    .agents-title {
        font-size: 2rem;
    }

    .agent-avatar {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }

    .agent-name {
        font-size: 1.25rem;
    }

    .agent-role {
        font-size: 1rem;
    }

    .agents-cta h3 {
        font-size: 1.5rem;
    }

    .btn-agents-cta {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ===== BENEFITS SECTION ===== */
.benefits-section {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.90));
    position: relative;
    overflow: hidden;
}

.benefits-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
    z-index: 1;
}

.benefits-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.benefits-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.benefits-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.benefits-list {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefit-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.benefit-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.benefit-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.benefits-cta {
    text-align: left;
}

.btn-benefits-cta {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    display: inline-block;
}

.btn-benefits-cta:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 1), rgba(139, 92, 246, 1));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.benefits-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.benefits-visual {
    position: relative;
}

.council-preview {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.council-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
}

.council-header h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.council-members {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.council-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.council-member:hover {
    background: rgba(255, 255, 255, 0.05);
}

.council-member.active {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.member-avatar {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.member-info {
    flex: 1;
}

.member-info strong {
    color: white;
    font-weight: 600;
    display: block;
    font-size: 0.95rem;
}

.member-info span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.member-status {
    width: 8px;
    height: 8px;
    background: rgba(34, 197, 94, 0.8);
    border-radius: 50%;
    margin-left: auto;
}

.council-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.online-indicator {
    color: rgba(34, 197, 94, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.benefits-quote {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.benefits-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0.5;
}

.benefits-quote blockquote {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin: 0 0 1.5rem 0;
    padding: 0;
    border: none;
}

.benefits-quote cite {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-style: normal;
}

.benefits-quote cite a {
    color: rgba(99, 102, 241, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.benefits-quote cite a:hover {
    color: rgba(99, 102, 241, 1);
}

/* Benefits responsive design */
@media (max-width: 1024px) {
    .benefits-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .benefits-section {
        padding: 6rem 2rem;
    }
}

@media (max-width: 768px) {
    .benefits-section {
        padding: 4rem 1rem;
    }
    
    .benefits-list {
        gap: 1.5rem;
    }
    
    .benefit-item {
        gap: 1rem;
    }
    
    .benefit-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .council-preview {
        padding: 1.5rem;
    }
    
    .benefits-quote {
        padding: 2rem;
    }
    
    .benefits-quote blockquote {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .benefit-icon {
        align-self: center;
    }
    
    .benefits-cta {
        text-align: center;
    }
    
    .btn-benefits-cta {
        width: 100%;
    }
} 