/* Intergram 聊天窗口样式 —— 对齐 cp-h2 深色紫蓝科技风 */
/* 色板：bg #080d1e / card #111940 / input #0f1738 / 主色 #7c3aed + #3b82f6 */

html, body {
    background: #080d1e;
    color: #f1f5f9;
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
}

/* M E S S A G E S */

.chat {
    list-style: none;
    background: none;
    padding: 0 0 72px 0;
    margin: 0 0 10px;
}

.chat li {
    padding: 8px;
    padding: 0.5rem;
    font-size: 14.4px;
    font-size: 0.9rem;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.visitor {
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
        -ms-flex-pack: end;
            justify-content: flex-end;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
        -ms-flex-align: end;
                -ms-grid-row-align: flex-end;
            align-items: flex-end;
}

.visitor .msg {
    -webkit-box-ordinal-group: 2;
    -webkit-order: 1;
        -ms-flex-order: 1;
            order: 1;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
}

.admin .msg {
    -webkit-box-ordinal-group: 2;
    -webkit-order: 1;
        -ms-flex-order: 1;
            order: 1;
    border-top-left-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.msg {
    word-wrap: break-word;
    background: #111940;
    color: #f1f5f9;
    min-width: 50px;
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.msg p {
    margin: 0 0 3.2px 0;
    margin: 0 0 0.2rem 0;
}

.msg .time {
    font-size: 11.2px;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 3px;
    float: right;
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.visitor .msg .time {
    color: rgba(255, 255, 255, 0.7);
}

/* 深色滚动条 */

::-webkit-scrollbar {
    min-width: 12px;
    width: 12px;
    max-width: 12px;
    min-height: 12px;
    height: 12px;
    max-height: 12px;
    background: #080d1e;
    box-shadow: inset 0 -14px 0 #080d1e, inset 0 -46px 0 #0d1333;
}

::-webkit-scrollbar-thumb {
    background: #2a3466;
    border-radius: 100px;
    border: solid 3px #080d1e;
    box-shadow: inset 0 0 3px #1b2450;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b4780;
    box-shadow: inset 0 0 3px #2a3466;
}

::-webkit-scrollbar-thumb:active {
    background: #7c3aed;
    box-shadow: inset 0 0 3px #6d28d9;
}

::-webkit-scrollbar-button {
    display: block;
    height: 24px;
}

/* I N P U T */

.input-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 60px;
    padding: 0 8px 0 0;
    box-sizing: border-box;
    background: #0f1738;
    border-top: 1px solid rgba(124, 58, 237, 0.25);
    z-index: 99;
}

.input-bar:focus-within {
    border-top-color: rgba(124, 58, 237, 0.7);
    box-shadow: 0 -2px 12px rgba(124, 58, 237, 0.2);
}

input.textarea {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 16px;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 400;
}

input.textarea::placeholder {
    color: #64748b;
}

button.send {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

button.send:hover:not(:disabled) {
    filter: brightness(1.08);
}

button.send:active:not(:disabled) {
    transform: translateY(1px);
}

button.send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* 隐藏官方署名条 */
a.banner {
    display: none;
}
