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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Главный контейнер */
.app-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Шапка с аватаркой */
.profile-header {
    background: #0088cc;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.avatar-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.profile-name {
    color: white;
    font-size: 17px;
    font-weight: 600;
}

/* Контейнер с сообщениями */
.background-container {
    flex: 1;
    overflow-y: auto;
    background: #f0f2f5;
    padding: 0;
}

.chat-container {
    padding: 15px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Очистка float */
.chat-container:after {
    content: "";
    display: table;
    clear: both;
}

/* Сообщения */
.message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
    clear: both;
}

.message-in {
    background: white;
    float: left;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.message-out {
    background: #0088cc;
    color: white;
    float: right;
    border-bottom-right-radius: 4px;
}

.message-text {
    word-wrap: break-word;
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
    clear: both;
}

/* Инлайн-кнопки */
.inline-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    clear: both;
    justify-content: flex-start;
}

.inline-button {
    background: #e9ecef;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: #0088cc;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.inline-button:hover {
    background: #dee2e6;
}

/* Нижняя панель */
.bottom-panel {
    background: white;
    border-top: 1px solid #ddd;
    padding: 10px;
    flex-shrink: 0;
}

.input-area {
    background: #f5f5f5;
    border-radius: 24px;
    padding: 8px 12px;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-input {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
}

.send-button {
    background: #0088cc;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопка отправки заявки */
.button {
    background: #0088cc;
    border: none;
    border-radius: 12px;
    padding: 12px;
    color: white;
    width: 100%;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
}