* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #f0f2f5;
    height: 100vh;
}

#chat-container {
    max-width: 600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
}

.message {
    margin: 8px 0;
    max-width: 90%;
    padding: 10px;
    border-radius: 12px;
    word-break: break-word;
    clear: both;
    font-size: 14px;
    line-height: 1.4;
}

.received {
    background: #e4e6eb;
    float: left;
}

.sent {
    background: #0084ff;
    color: white;
    float: right;
}

.time {
    font-size: 12px; /* 时间更小 */
    color: #666;
    margin-top: 6px;
    display: block;
    text-align: right;
}

#input-area {
    padding: 12px;
    background: #fff;
    display: flex;
    gap: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    align-items: flex-end; /* 使子元素垂直对齐到底部 */
}

#message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    outline: none;
    font-size: 14px;
    height: 78px;
}

.send-wrapper {
    position: relative;
    display: flex;
}

#send-btn {
    background: #0084ff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 35px 8px 20px; /* 调整按钮高度为一行 */
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.preset-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 125px;
    margin-bottom: 8px;
    z-index: 10;
}

.preset-msg {
    padding: 12px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.preset-msg:last-child {
    border-bottom: none;
}

.preset-msg:hover {
    background: #f5f5f5;
}

.show-menu {
    display: block !important;
}

/* 新增时间戳样式 */
.center-time {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 15px 0;
    clear: both;
}

/* 调整原有时间显示为隐藏 */
.message .time {
    display: none;
}

.content {
    white-space: pre-wrap;
}

.message .think {
    color: darkgray;
    font-size: 12px;
    line-height: 12px;
    font-style: italic;
}

.message .usage {
    color: #333;
    display: block;
    font-size: 12px;
    height: 16px;
    line-height: 16px;
    padding-left: 20px;
    float: right;
    clear: both;
    background: url("/images/cost.png") no-repeat left top;
    background-size: 16px 16px;
}

.message .flow {
    color: #404040;
    font-size: 12px;
    line-height: 12px;
}

.message .splitter {
    display: block;
    height: 6px;
}

.sent .image {
    width: 50vw;
    border-radius: 8px;
}

.received .image {
    width: 100%;
    border-radius: 8px;
}

.received .video {
    width: 100%;
    border-radius: 8px;
}

.message .media-desc {
    font-size: 12px;
    line-height: 12px;
}

.loading-icon {
    width: 6px;
    height: 6px;
    display: inline-block;
    background-color: black;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}