body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: sans-serif;
}
.a11-chat-wrap {
    max-width: 900px;
    margin: 0 auto;
    font-family: system-ui, sans-serif;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

header, footer {
    max-width: 900px;
    margin: 0 auto;
}

.a11-header {
    background: #222;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a11-title {
    font-size: 16px;
    font-weight: bold;
}

.a11-progress-text {
    font-size: 12px;
    opacity: 0.8;
}

.a11-progress-bar {
    height: 6px;
    background: #eee;
}

.a11-bar-fill {
    height: 6px;
    width: 0%;
    background: #4caf50;
    transition: width .3s;
}

.a11-history {
    height: 350px;
    overflow-y: auto;
    padding: 16px;
    background: #fafafa;
}

.a11-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.45;
}

.a11-bubble.me {
    background: #d9eaff;
    margin-left: auto;
}

.a11-bubble.ai {
    background: #f1f1f1;
    margin-right: auto;
}

.a11-bubble.thinking {
    font-style: italic;
    color: #666;
}

.a11-input-wrap {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
}

.a11-send-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

/* === Markdown таблицы внутри пузырей === */

.a11-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
    display: block;
    overflow-x: auto; /* чтобы не ломалось на телефоне */
}

.a11-bubble th,
.a11-bubble td {
    border: 1px solid #ccc;       /* границы ячеек */
    padding: 8px 10px;            /* отступы внутри ячеек */
    text-align: left;             /* выравнивание по умолчанию */
    vertical-align: top;          /* аккуратный вид */
    white-space: nowrap;          /* чтобы таблица не рвалась */
}

.a11-bubble th {
    background: #f0f0f0;          /* фон заголовков */
    font-weight: bold;
}

.a11-bubble tr:nth-child(even) td {
    background: #fafafa;          /* лёгкая зебра */
}

/* Кнопки копирования */
.a11-content-wrap {
    display: flex;
    flex-direction: column;
}

.a11-content {
    width: 100%;
}

.a11-tools {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    opacity: 0.75;
    align-self: flex-start;
}

.a11-tool-btn {
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    transition: opacity .2s, transform .2s;
    display: inline-flex;
    align-items: center;
}

.a11-tool-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}
.a11-input {
    width: 100%;
    min-height: 40px;
    resize: none;
    overflow-y: hidden;
    /*padding: 10px 14px;*/
    font-size: 15px;
    line-height: 1.4;
    border: none;
    outline: none;
    background: #FFFFFF;
    border-radius: 10px;
    /*box-shadow: inset 0 0 0 1px #ddd;*/
    transition: box-shadow 0.2s ease;
    flex: 1;
}

/* Убираем синюю рамку браузера */
.a11-input:focus {
    /*box-shadow: inset 0 0 0 1px #bbb;*/
}

/* Чтобы textarea не прыгала */
.a11-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.a11-input:focus-visible {
    outline: none;
}

