* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f7f8;
    color: #2d2d2d;
}    

/* Header */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    height: 60px;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
}

.header-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance,
.balance-mobile {
    font-size: 14px;
    font-weight: 500;
    color: #2d2d2d;
}

/* Стили для кнопок в хедере на мобильных */

.header-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 100%;
}

.header-mobile-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-mobile-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-model-select-mobile {
    padding: 8px 16px;
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #2d2d2d;
    cursor: pointer;
}
/* Стили для кнопок в хедере на мобильных */

.btn-topup {
    padding: 8px 16px;
    background-color: #f7f7f8;
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #2d2d2d;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-topup:hover {
    background-color: #ececed;
}

.btn-model-select {
    padding: 8px 16px;
    background-color: #f7f7f8;
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #2d2d2d;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-model-select:hover {
    background-color: #ececed;
}

.profile-link {
    display: flex;
    align-items: center;
    color: #565656;
    transition: color 0.2s;
}

.profile-link:hover {
    color: #2d2d2d;
}

.profile-link-mobile {
    display: flex;
    align-items: center;
    color: #565656;
    transition: color 0.2s;
}

.profile-link-mobile:hover {
    color: #2d2d2d;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    display: block;
    height: 36px;
    width: auto;
    object-fit: contain;
}

.logo-desktop {
    margin-right: 77px;
}

/* Для авторизованных пользователей уменьшаем отступ */
.header.logged-in .logo-desktop {
    margin-right: 20px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    background-color: #2d2d2d;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Container */
.container {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 60px);
}

.overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

.overlay.active {
    display: block;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #f7f7f8;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    height: calc(100vh - 60px);
}

.sidebar-header {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.newChatBtn_Fiat_lux {
    width: 100%;
    padding: 10px 14px;
    background-color: #fff;
    border: 1px solid #bbbbbb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2d2d2d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.newChatBtn_Fiat_lux:hover {
    background-color: #ececed;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.dialogues_list_Fiat_lux {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chatItem_Fiat_lux {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #2d2d2d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.chatItem_Fiat_lux > div:first-of-type {
    flex: 1;
    min-width: 0; 
    overflow: hidden;
}

.chatItem_Fiat_lux > div:first-of-type > div:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatItem_Fiat_lux:hover {
    background-color: #f7f7f8;
}

.chatItem_Fiat_lux.active {
    background-color: #ececed;
}

.chatItem_Fiat_lux svg {
    flex-shrink: 0;
    color: #565656;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
    max-width: 100%;
}

.chat-container {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    height: calc(100vh - 60px); 
}

.chat_dialogues_Fiat_lux {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0;
    padding: 15px;
}

.message {
    display: flex;
    flex-direction: column;
}

.us_text_Fiat_lux {
    align-items: flex-end;
}

.us_text_Fiat_lux .message_text_Fiat_lux {
    background-color: #f4f4f4;
    color: #000000;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid #d8d8d8;
    overflow-wrap: break-word;
    word-break: break-word;
    /* overflow-x: auto; */
}

.message_text_Fiat_lux {
    overflow-wrap: break-word; 
    word-wrap: break-word; 
}

.ai_message_Fiat_lux {
    align-items: flex-start;
}

.ai_message_Fiat_lux .message_text_Fiat_lux {
    background-color: #fff;
    color: #000000;
    padding: 16px 20px;
    border-radius: 18px;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.6;
}

.text_actions_Fiat_lux {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    padding-left: 18px;
}

.action-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #8e8e8e;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #f4f4f4;
    color: #2d2d2d;
}

/* Input Container */
.inputBox_Fiat_lux {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    min-height: 80px;
    flex-wrap: wrap;
}

/* Обертка для файлов и ошибок (создается через JS) */
.files-and-errors-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    order: -1;
    margin-bottom: 8px;
}


/* Заблокированное состояние inputBox_Fiat_lux */
.inputBox_Fiat_lux.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.inputBox_Fiat_lux.disabled .message-input,
.inputBox_Fiat_lux.disabled .attach-btn,
.inputBox_Fiat_lux.disabled .sendBtn_Fiat_lux {
    background-color: #f0f0f0;
    cursor: not-allowed;
}



.attach-btn,
.sendBtn_Fiat_lux {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #bbbbbb;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attach-btn:hover,
.sendBtn_Fiat_lux:hover {
    background-color: #f4f4f4;
    color: #2d2d2d;
}

.message-input {
    flex: 1;
    min-width: 0;
    padding: 12px 18px;
    border: 1px solid #bbbbbb;
    border-radius: 24px;
    font-size: 15px;
    background-color: #fff;
    resize: none;
    overflow-y: hidden;
    min-height: 40px;
    max-height: 150px;
    line-height: 1.5;
}

.message-input:focus {
    border-color: #4e4e4e;
    outline: none;
}

.message-input::placeholder {
    color: #8e8e8e;
}

/* Footer */
.footer {
    background-color: #ececed;
    border-top: 1px solid #e5e5e5;
    padding: 40px 24px 20px;
}

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

/* Колонки футера */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 16px;
}

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

.footer-links li {
    margin: 0;
}

.footer-links a {
    font-size: 14px;
    color: #565656;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: #2d2d2d;
    text-decoration: underline;
}

/* Копирайт */
.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #d4d4d4;
}

.footer-copyright p {
    font-size: 13px;
    color: #6e6e6e;
    margin: 0;
}

/* Scrollbar */
.chat_dialogues_Fiat_lux::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.chat_dialogues_Fiat_lux::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.chat_dialogues_Fiat_lux::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb {
    background-color: #d4d4d4;
    border-radius: 3px;
}

.chat_dialogues_Fiat_lux::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover {
    background-color: #b4b4b4;
}

/* Mobile Styles */
@media (max-width: 768px) {

    body.sidebar-open {
        overflow: hidden;
    }

    .header-desktop {
        display: none;
    }

    .header-mobile {
        display: flex;
    }

    .main-content {
        min-height: calc(100vh - 60px);
    }

    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        z-index: 95;
        transform: translateX(-100%);
        display: flex;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .chat-container {
        padding: 0 16px;
        min-height: calc(100vh - 110px);
        display: flex;
        flex-direction: column;
        max-width: none;
    }

    .chat_dialogues_Fiat_lux {
        padding: 10px;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .inputBox_Fiat_lux {
        background-color: #ffffff;
        padding: 16px 0;
        min-height: 80px;
        flex-shrink: 0;
    }

    .footer {
        padding: 12px 30px;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 70vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 16px 20px;
    }
    
    .model-item {
        padding: 14px;
    }

    .hamburger {
        display: flex; 
    }

    .container {
        min-height: calc(100vh - 60px)
    }

    .logo-desktop {
        display: none;
    }
    
    .logo-mobile img {
        height: 36px;
    }

    .footer {
        padding: 30px 30px 30px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 25px;
    }
    
    .footer-title {
        font-size: 14px;
    }
    
    .footer-links a {
        font-size: 13px;
    }

    .btn-register {
        display: none !important;
    }

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

    .btn-login:hover {
        opacity: 0.9 !important;
    }
}


@media (max-width: 480px) {
    .us_text_Fiat_lux .message_text_Fiat_lux {
        max-width: 90%;
        font-size: 14px;
    }

    .ai_message_Fiat_lux .message_text_Fiat_lux {
        font-size: 14px;
    }

    .message-input {
        font-size: 14px;
        padding: 10px 16px;
    }

    .attach-btn,
    .sendBtn_Fiat_lux {
        width: 36px;
        height: 36px;
    }

    .attach-btn svg,
    .sendBtn_Fiat_lux svg {
        width: 18px;
        height: 18px;
    }

    .hamburger {
        display: flex; 
    }

    .inputBox_Fiat_lux {
        min-height: 70px; 
    }

    .logo-mobile img {
        height:36px;
    }

    .chat-container {
        max-width: none;
        height: calc(100vh - 110px);
    }

    .footer {
        padding: 25px 30px 30px;
    }
    
    .footer-columns {
        gap: 25px;
        margin-bottom: 20px;
    }

    .btn-register {
        display: none !important;
    }

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

    .btn-login:hover {
        opacity: 0.9 !important;
    }
}



/* Кнопка выбора модели */


.btn-model-select-mobile {
    padding: 8px;
    font-size: 14px;
}

.btn-model-select-mobile svg {
    color: #2d2d2d;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d2d2d;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #8e8e8e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f4f4f4;
    color: #2d2d2d;
}

.modal-body {
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
}

.model-item {
    padding: 16px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.model-item:hover {
    background-color: #f7f7f8;
    border-color: #d4d4d4;
}

.model-item.active {
    background-color: #f0f0ff;
    border-color: #6366f1;
}

.model-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 4px;
}

.model-description {
    font-size: 13px;
    color: #262626;
    line-height: 1.4;
}

/* Скроллбар для модального окна */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #d4d4d4;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #b4b4b4;
}

/* Кликабельный баланс */
.balance-mobile,
.balance {
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
    transition: opacity 0.2s;
}

.balance-mobile:hover,
.balance:hover {
    opacity: 0.8;
}

.btn-topup {
    text-decoration: none !important;
    display: inline-block;
}


/* Скрываем кнопку выбора модели на всех страницах кроме главной */
.not-homepage .btn-model-select,
.not-homepage .btn-model-select-mobile {
    display: none !important;
}

/* ========================================
   СТИЛИ ДЛЯ ПРОСТЫХ СТРАНИЦ (terms, pricing)
   ======================================== */

.simple-page {
    min-height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background-color: #fff;
}

.simple-content {
    width: 70%;
    max-width: 900px;
    font-size: 15px;
    color: #000;
    line-height: 1.6;
}

.simple-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.simple-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-top: 35px;
    margin-bottom: 15px;
}

.simple-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-top: 25px;
    margin-bottom: 12px;
}

.simple-content p {
    margin-bottom: 15px;
}

.simple-content ul,
.simple-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.simple-content li {
    margin-bottom: 8px;
}

.simple-content a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.simple-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.last-updated {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    color: #6e6e6e;
    font-style: italic;
}

/* ========================================
   СТИЛИ ДЛЯ СТРАНИЦЫ PRICING
   ======================================== */

.pricing-intro {
    padding: 20px;
    margin-bottom: 30px;
    background-color: #f7f7f8;
    border-left: 4px solid #667eea;
    border-radius: 6px;
}

.pricing-intro p {
    margin: 0;
    font-size: 16px;
    color: #2d2d2d;
}

.pricing-table-wrapper {
    overflow-x: auto;
    margin-bottom: 40px;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.pricing-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pricing-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
}

.pricing-table .price-note {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

.pricing-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s;
}

.pricing-table tbody tr:hover {
    background-color: #f7f7f8;
}

.pricing-table tbody tr:last-child {
    border-bottom: none;
}

.pricing-table td {
    padding: 16px;
    font-size: 15px;
}

.pricing-table .model-name {
    font-weight: 600;
    color: #2d2d2d;
}

.pricing-table .price {
    color: #667eea;
    font-weight: 600;
}

.pricing-info {
    margin-top: 40px;
    padding: 30px;
    background-color: #f7f7f8;
    border-radius: 8px;
}

.pricing-info h2 {
    font-size: 20px;
    margin-top: 25px;
}

.pricing-info h2:first-child {
    margin-top: 0;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6e6e6e;
    font-size: 16px;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 768px) {
    .simple-content {
        width: 95%;
    }

    .simple-content h1 {
        font-size: 26px;
    }

    .simple-content h2 {
        font-size: 20px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 12px 8px;
        font-size: 14px;
    }

    .pricing-intro p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .simple-content {
        width: 100%;
        font-size: 14px;
    }

    .simple-content h1 {
        font-size: 22px;
    }

    .simple-content h2 {
        font-size: 18px;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* ========================================
   FAQ SECTION
   ======================================== */

.faq-section {
    background-color: #fff;
    padding: 60px 24px;
    max-width: 70%;
    width: 100%;
    margin: 0 auto;
}

.faq-container {
    width: 100%;
}


.faq-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 40px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faqCard_Fiat_lux {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    transition: box-shadow 0.2s;
}

.faqCard_Fiat_lux:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.faqQ_Fiat_lux {
    width: 100%;
    padding: 20px 24px;
    background-color: #fff;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #2d2d2d;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background-color 0.2s;
}

.faqQ_Fiat_lux:hover {
    background-color: #f7f7f8;
}

.faqQ_Fiat_lux span {
    flex: 1;
}

.faq-icon {
    flex-shrink: 0;
    color: #8e8e8e;
    transition: transform 0.3s ease;
}

.faqCard_Fiat_lux.active .faq-icon {
    transform: rotate(180deg);
}

.faqA_Fiat_lux {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.2s ease;
    background-color: #fff;
}

.faqCard_Fiat_lux.active .faqA_Fiat_lux {
    max-height: 500px;
    padding: 20px;
    background-color: #f7f7f8;
    border-top: 1px solid #e5e5e5;
}

.faqA_Fiat_lux p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #000;
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .faq-section {
        padding: 40px 30px;
        max-width: none;
    }

    .faq-container {
        width: 100%;
    }

    .faq-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .faqQ_Fiat_lux {
        padding: 16px 20px;
        font-size: 15px;
    }

    .faqCard_Fiat_lux.active .faqA_Fiat_lux {
        padding: 20px;
    }

    .faqA_Fiat_lux p {
        font-size: 14px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .faq-section {
        padding: 30px 30px;
    }

    .faq-container {
        width: 100%;
    }

    .faq-title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .faqQ_Fiat_lux {
        padding: 14px 16px;
        font-size: 14px;
    }

    .faq-icon {
        width: 18px;
        height: 18px;
    }

    .faqCard_Fiat_lux.active .faqA_Fiat_lux {
        padding: 16px;
    }

    .faqA_Fiat_lux p {
        font-size: 13px;
    }
}


/* Фикс для очень маленьких экранов */
@media (max-width: 319px) {
    html, body {
        min-width: 320px;
        overflow-x: auto;
    }
    
    .header {
        min-width: 320px;
    }
    
    .footer {
        min-width: 320px;
    }
}

/* Кнопка удаления чата */
.del_dialogue_Fiat_lux {
    border: none;
    color: #050b8d;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: auto;
    opacity: 0.6;
    transition: opacity 0.2s;
    background: none;
}

.chatItem_Fiat_lux:hover .del_dialogue_Fiat_lux {
    display: block;
}

.del_dialogue_Fiat_lux:hover {
    opacity: 1;
}

/* Индикатор загрузки */
.chatItem_Fiat_lux.loading {
    opacity: 0.6;
    pointer-events: none;
    font-style: italic;
}

/* === ПРИВЕТСТВЕННЫЙ ЭКРАН === */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
    text-align: center;
}

.welcome-screen h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    line-height: 1.4;
    max-width: 600px;
}

.welcome-screen p {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0 0 40px 0;
    line-height: 1.5;
}

.welcome-screen .doc-icon {
    width: 80px;
    height: 80px;
    color: #bdc3c7;
    opacity: 0.8;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .welcome-screen {
        min-height: 300px;
        padding: 40px 20px;
    }
    
    .welcome-screen h1 {
        font-size: 22px;
    }
    
    .welcome-screen p {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .welcome-screen .doc-icon {
        width: 64px;
        height: 64px;
    }
}

/* Индикатор печатания */
.typing-indicator-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: transparent;
    border-radius: 18px;
    max-width: 80px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #2d2d2d;
    border-radius: 50%;
    animation: typing-animation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-animation {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Стили для кодовых блоков */
.code-block {
    background: #f9fafb;
    color: black;
    padding: 16px;
    border-radius: 8px;
    margin: 12px 0;
    position: relative;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: hidden; /* УЖЕ ЕСТЬ */
    overflow-y: auto; /* ИЗМЕНИТЬ на auto */
    line-height: 1.5;
    max-width: 100%;
    word-wrap: break-word; /* ДОБАВИТЬ */
    overflow-wrap: break-word; /* ДОБАВИТЬ */
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* ДОБАВИТЬ */
    max-width: 100%; /* ДОБАВИТЬ */
}

.code-block code {
    white-space: pre-wrap; 
    word-break: break-word;
    overflow-wrap: break-word; /* ДОБАВИТЬ */
    display: block; /* ДОБАВИТЬ */
    max-width: 100%; /* ДОБАВИТЬ */
}

/* ИСПРАВЛЕНИЕ: Контейнер чата на мобильных */
@media (max-width: 768px) {
    .chat-container {
        padding: 0 16px;
        min-height: calc(100vh - 110px);
        display: flex;
        flex-direction: column;
        max-width: none;
        overflow-x: hidden; /* ДОБАВИТЬ */
    }

    .chat_dialogues_Fiat_lux {
        padding: 10px;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden; /* ДОБАВИТЬ */
    }
    
    /* ДОБАВИТЬ: Блоки кода на мобильных */
    .code-block {
        font-size: 12px;
        padding: 12px;
        max-width: 100%;
    }
    
    .code-block pre,
    .code-block code {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .us_text_Fiat_lux .message_text_Fiat_lux {
        max-width: 90%;
        font-size: 14px;
        /* word-break: break-word; */
    }

    .ai_message_Fiat_lux .message_text_Fiat_lux {
        font-size: 14px;
        /* word-break: break-word; */
    }
    
    /* ДОБАВИТЬ: Дополнительно для кода на маленьких экранах */
    .code-block {
        font-size: 11px;
        padding: 10px;
    }
}

/* ДОБАВИТЬ: Для длинных ссылок и строк без пробелов */
.message_text_Fiat_lux a,
.message_text_Fiat_lux p {
    word-break: break-word;
    overflow-wrap: break-word;
}


/* Блокировка кнопки отправки */
.sendBtn_Fiat_lux:disabled {
    cursor: not-allowed;
}

.model-item.blocked {
    opacity: 0.6;
    background-color: #f5f5f5;
}

.model-blocked-text {
    color: #1c01ff;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}


/* Счетчик символов для гостей */
.char-counter {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 12px;
    color: #666;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 10;
}

.char-counter.exceeded {
    color: #dc3545;
    font-weight: bold;
    top: -25px;
}

.counter-warning {
    color: #dc3545;
    font-size: 11px;
    margin-top: 2px;
    display: none;
}

.char-counter.exceeded .counter-warning {
    display: block;
}


/* === СТИЛИ ДЛЯ ПРИКРЕПЛЕНИЯ ФАЙЛОВ === */

/* Скрытый input для выбора файлов */
#fileInput {
    display: none;
}

/* Контейнер прикрепленных файлов */
.attached-files-container {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    font-size: 14px;
    color: #1976d2;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

.attached-files-container:not(:empty) {
    display: inline-flex;
}


/* Карточка файла */
.file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s;
}

.file-badge:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

/* Иконка файла */
.file-badge-icon {
    font-size: 16px;
}

/* Название файла */
.file-badge-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Размер файла */
.file-badge-size {
    font-size: 11px;
    color: #6c757d;
}

/* Кнопка удаления файла */
.file-badge-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.2s;
}

.file-badge-remove:hover {
    transform: scale(1.2);
}

/* Ошибка валидации */
.file-error {
    color: #73000b;
    font-size: 13px;
    padding: 8px 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin: 0;
}


/* Иконки файлов в истории чата */
.message-files-indicator {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.message-file-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.03);
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.message-file-icon svg {
    width: 14px;
    height: 14px;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .attached-files-container {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .file-error {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .files-and-errors-wrapper {
        margin-bottom: 4px;
    }
}


/* ТАБЛИЦЫ В ЧАТЕ */
.fiat_lux_mdtable_container_x7k9 {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto; /* горизонтальный скролл */
    -webkit-overflow-scrolling: touch; /* плавный скролл iOS */
    margin: 20px 0;
}

.fiat_lux_mdtable_element_x7k9 {
    border-collapse: collapse;
    width: 100%; /* ОСТАВЛЯЕМ 100% для десктопа */
    min-width: 100%; /* ОСТАВЛЯЕМ 100% */
    table-layout: auto; /* ОСТАВЛЯЕМ auto */
    background: white;
}

.fiat_lux_mdtable_element_x7k9 th,
.fiat_lux_mdtable_element_x7k9 td {
    border: 1px solid #d1d5db;
    padding: 10px 14px;
    text-align: left;
    white-space: normal; 
    vertical-align: top;
    font-size: 14px;
}

.fiat_lux_mdtable_element_x7k9 th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #2d2d2d;
}

.fiat_lux_mdtable_element_x7k9 tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.fiat_lux_mdtable_element_x7k9 tbody tr:hover {
    background-color: #ececed;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    .fiat_lux_mdtable_element_x7k9 th,
    .fiat_lux_mdtable_element_x7k9 td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Для очень длинного контента в ячейках на мобильных */
    .fiat_lux_mdtable_element_x7k9 td,
    .fiat_lux_mdtable_element_x7k9 th {
        max-width: 200px; /* Только на мобильных ограничиваем ширину */
    }
}

@media (max-width: 480px) {
    .fiat_lux_mdtable_element_x7k9 th,
    .fiat_lux_mdtable_element_x7k9 td {
        padding: 6px 8px;
        font-size: 12px;
        max-width: 150px; /* Еще меньше на очень маленьких экранах */
    }
}


/* СПИСКИ  */
.message_text_Fiat_lux ul,
.message_text_Fiat_lux ol {
    padding-left: 1.5rem;
    line-height: 1.6;
}

.message_text_Fiat_lux li {
    margin-top: 8px;
    margin-left: 18px;
}

.message_text_Fiat_lux ol ol,
.message_text_Fiat_lux ul ul {
    margin: 8px 0;
}

/* Маркеры */
.message_text_Fiat_lux ul li {
    list-style-type: disc;
}

.message_text_Fiat_lux ol li {
    list-style-type: decimal;
}

.code-block { position: relative; background: #f6f8fa; border-radius: 6px; margin: 1em 0; padding-top: 40px; }
.copy-btn { 
    position: absolute; top: 8px; right: 8px; 
    background: #e0e0e0; color: black; border: none; 
    border-radius: 4px; padding: 4px 8px; cursor: pointer; 
    font-size: 12px; z-index: 10; transition: background 0.2s; 
}
.copy-btn:hover { background: #d0d0d0; }
.copy-btn.copied { background: #4caf50; color: white; }

.ai_message_Fiat_lux h1,
.ai_message_Fiat_lux h2,
.ai_message_Fiat_lux h3 {
    margin-bottom: 8px;
    margin-top: 8px;
}

/* Индикатор обработки изображений */
.image-processing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    animation: pulse 1.5s ease-in-out infinite;
}

.image-processing-indicator svg {
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.processing-text {
    flex: 1;
}

.processing-progress {
    font-weight: 600;
    font-size: 16px;
}

/* ============================================
   КНОПКА ЭКСПОРТА
   ============================================ */

/* Кнопка Export у AI-сообщений */
.export-message-btn {
    background: none;
    border: none;
    color: #8e8e8e;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}

.export-message-btn:hover {
    background-color: #f4f4f4;
    color: #2d2d2d;
}

/* Стиль для кнопки скачивания в модалке */
#exportWordDownloadBtn:hover {
    background: #0056b3 !important;
}

/* Кнопка прокрутки вниз */
.down8_fiat_lux {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 35px;
    height: 35px;
    background-color: white;
    border: 1px solid #bbbbbb;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.down8_fiat_lux.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.down8_fiat_lux:hover {
    background: #ececed;
    transform: scale(1.1);
}

.down8_fiat_lux:active {
    transform: scale(0.95);
}

.down8_fiat_lux svg {
    color: #2d2d2d;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .down8_fiat_lux {
        bottom: 130px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .down8_fiat_lux {
        bottom: 130px;
        right: 8px;
        width: 38px;
        height: 38px;
    }
}
