body {
    font-family: Arial, sans-serif;
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    margin: 0; /* 去掉默认边距 */
    padding: 0; /* 去掉默认内边距 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    flex: 1; /* 使容器自适应填满空间 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 上边对齐 */
    width: 100%;
    max-width: 100vh;
    min-height: calc(100vh - 100px);



    padding: 20px; /* 减少内边距 */
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between; /* 左右排列 */
    align-items: center; /* 垂直居中 */
    margin-bottom: 20px; /* 标题和聊天区域的间距 */
}

header h1 {
    color: #333;
    text-align: center;
    margin: 0; /* 去掉默认的外边距 */
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px; /* 减少下边距 */
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.button-group button {
    width: 30%;
    border-radius: 5px;
    border: 0;
    box-shadow: 0 0 5px rgba(19, 18, 18, 0.5);
    font-size: 16px;
    padding: 10px;
    cursor: pointer;
}

input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
    box-shadow: 0 0 5px rgba(19, 18, 18, 0.15);
}

.btn {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.message-box {
    min-height: calc(100vh - 300px);
    max-height: calc(100vh - 300px);
    /* max-height: 300px; */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px; /* 减少底部边距 */
    background-color: #f1f1f1;
}

.msg-box {
    margin: 10px 0;
    display: table;
    width: auto;
    max-width: 70%;
    word-wrap: break-word;
}

.message {
    padding: 10px;
    margin-top: 5px;
    border-radius: 15px;
}

.msg-box.self .username {
    text-align: right;
}

.msg-box.self {
    margin-left: auto;
}
.msg-box.self .message{
    background-color: #d1e7dd;
}

.msg-box.other .message{
    background-color: #f8d7da;
}

.timestamp {
    font-size: 12px;
    display: block;
    margin-top: 5px;
    color: #888;
}

.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.checkbox-container input {
    margin-right: 5px;
}

/* 表情弹窗样式 */
#emoji-popup,
#file-popup {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1000;
    width: 150px;
    height: 150px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    bottom: 50px;
    left: 0;
}

.emoji {
    cursor: pointer;
    font-size: 24px;
    text-align: center;
}

.emoji:hover {
    background-color: #f0f0f0;
}

.message img {
    max-width: 100%;
    max-height: 200px;
    cursor: pointer;
}

.enlarged-image {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: auto;
}

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

/* 公告栏样式 */
#notice-popup {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1000;
    width: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    left: 50%;
    transform: translateX(-50%);
    top: 50px;
}

#close-notice {
    margin-top: 10px;
}

/* GitHub 图标样式 */
.github-icon {
    font-size: 24px;
    color: #333;
    text-decoration: none; /* 去掉下划线 */
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        width: 100%;
        padding: 20px;
        border-radius: 0;
        height: calc(100vh - 40px);
    }

    /* .button-group button {
        width: 30%;
    } */
}
