﻿body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
}

.phone-container {
    width: 100%;
    max-width: 420px;
    /* 手机最大宽度 */
    height: 100vh;
    max-height: 800px;
    /* 手机最大高度 */
    border: 1px solid #ddd;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    /* 水平居中 */
}

.header {
    background-color: #07c160;
    color: white;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 18px;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 12px;
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot .bubble {
    background-color: #e5e5e5;
    border-radius: 0 8px 8px 8px;
}

.user .bubble {
    background-color: #95ec69;
    border-radius: 8px 0 8px 8px;
}

.time {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.input-area {
    background-color: white;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.input-box {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 16px;
    outline: none;
}

.send-btn {
    background-color: #07c160;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 媒体消息样式 */
.media-message {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin: 8px 0;
    overflow: hidden;
}

.media-message img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-message video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.fullscreen-content {
    max-width: 90%;
    max-height: 90%;
    cursor: pointer;
}

.fullscreen-content img,
.fullscreen-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 新增页脚样式 */
footer {
    background-color: #f5f5f5;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* 对话框覆盖层样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 对话框样式 */
.dialog {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 400px;
    overflow: hidden;
}

/* 对话框头部样式 */
.dialog-header {
    background-color: #07c160;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-title {
    font-weight: bold;
    font-size: 18px;
}

.dialog-close {
    font-size: 24px;
    cursor: pointer;
}

/* 对话框内容样式 */
.dialog-content {
    padding: 16px;
}

/* 对话框底部样式 */
.dialog-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.dialog-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.dialog-button.primary {
    background-color: #07c160;
    color: white;
}

.dialog-button.secondary {
    background-color: #e5e5e5;
    color: #333;
}