/* Базовые настройки страницы */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #fdfdfd;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Верхняя панель навигации (Шапка) */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2e7d32;
    background-color: #e8f5e9;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    background-color: #4caf50;
    border-radius: 50%;
}

.site-logo {
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.btn-support {
    background: none;
    border: 1px solid #ffcdd2;
    color: #d32f2f;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-support:hover {
    background-color: #ffebee;
}

/* Системное уведомление */
.system-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 20px auto 0 auto;
    padding: 12px 20px;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    color: #1565c0;
    font-size: 14px;
    width: 90%;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-icon {
    font-weight: bold;
}

.close-alert {
    background: none;
    border: none;
    font-size: 20px;
    color: #1565c0;
    cursor: pointer;
    line-height: 1;
}

/* Главный контент меню */
.main-content {
    max-width: 800px;
    margin: 50px auto;
    text-align: center;
    padding: 0 20px;
    flex: 1;
}

.main-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.main-subtitle {
    font-size: 16px;
    color: #666666;
    margin-bottom: 32px;
}

.selection-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.selection-subtitle {
    font-size: 14px;
    color: #999999;
    margin-bottom: 24px;
}

/* Синяя информационная плашка */
.info-note {
    background-color: #f0f7ff;
    color: #0066cc;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 40px;
    max-width: 90%;
    line-height: 1.4;
    text-align: left;
}

/* Сетка карточек выбора режимов */
.modes-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 30px;
}

.mode-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.card-icon-wrap {
    width: 70px;
    height: 70px;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 12px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mode-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.mode-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 24px;
}

/* Кнопки внутри карточек */
.card-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.card-btn:hover {
    opacity: 0.8;
}

.btn-blue {
    color: #0066cc;
}

.btn-green {
    color: #2e7d32;
}

/* Дисклеймер под карточками */
.system-disclaimer {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.6;
    margin-top: 20px;
}

/* Окно чата (Консультант) */
.chat-container {
    max-width: 700px;
    width: 90%;
    margin: 30px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 550px;
    flex: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-back {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    font-size: 14px;
}

.chat-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fafafa;
}

/* Пузыри сообщений */
.msg {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.msg.user {
    background-color: #f1f5f9;
    color: #1a1a1a;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.msg.ai {
    background-color: #e3f2fd;
    color: #1565c0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

/* Область ввода сообщения */
.chat-input-zone {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    background-color: #ffffff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.chat-input-zone input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

.btn-send {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-send:hover {
    background-color: #1e293b;
}

/* Футер */
.main-footer {
    border-top: 1px solid #e2e8f0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    background-color: #ffffff;
    margin-top: auto;
}

.footer-right {
    display: flex;
    gap: 20px;
}

/* Модальное окно (Затемнение фона) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Карточка модального окна */
.modal-card {
    background-color: #ffffff;
    width: 90%;
    max-width: 680px;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 600;
}

.modal-close-x {
    background: none;
    border: none;
    font-size: 24px;
    color: #aaaaaa;
    cursor: pointer;
}

.modal-close-x:hover {
    color: #666666;
}

.modal-body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.modal-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    line-height: 1.5;
    font-size: 14px;
    text-align: left;
}

.text-bold {
    font-weight: 600;
    color: #1a1a1a;
}

.text-secondary {
    color: #666666;
}

/* Зона QR-кода */
.modal-qr-zone {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #edf2f7;
}

.qr-container {
    width: 140px;
    height: 140px;
    background-color: #ffffff;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-instruction {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 12px;
    line-height: 1.3;
}

.qr-subtext {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.4;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.system-version {
    font-size: 12px;
    color: #94a3b8;
}

.btn-confirm {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-confirm:hover {
    background-color: #1e293b;
}
