body {
    font-family: Arial, sans-serif;
    background: #121212; /* 深色背景 */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #e0e0e0; /* 浅色文本 */
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 60vh;
    min-height: calc(100vh - 80px);
    padding: 10px;
    background-color: #1e1e1e; /* 容器深色背景 */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* 更深的阴影 */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

header h1 {
    color: #ffffff; /* 白色标题 */
    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(0, 0, 0, 0.5);
    font-size: 16px;
    padding: 10px;
    cursor: pointer;
    background-color: #333333; /* 按钮深色背景 */
    color: #ffffff; /* 按钮文本白色 */
}

.button-group button:hover {
    background-color: #444444; /* 按钮悬停效果 */
}

input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    border: 1px solid #444444; /* 深色边框 */
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    background-color: #2d2d2d; /* 输入框深色背景 */
    color: #e0e0e0; /* 输入框文本颜色 */
}

input[type="text"]::placeholder {
    color: #888888; /* 占位符颜色 */
}

.btn {
    width: 100%;
    padding: 10px;
    background-color: #333333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #444444;
}

.message-box {
    min-height: calc(100vh - 300px);
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    border: 1px solid #444444;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #2d2d2d;
}

/* 滚动条样式适配暗黑主题 */
.message-box::-webkit-scrollbar {
    width: 8px;
}

.message-box::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.message-box::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 4px;
}

.message-box::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

.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;
    color: #e0e0e0; /* 消息文本颜色 */
}

.msg-box.self .username {
    text-align: right;
}

.msg-box.self {
    margin-left: auto;
}

.msg-box.self .message {
    background-color: #35363e; /* 自己消息的深蓝色背景 */
}

.msg-box.other .message {
    background-color: #3d3d3d; /* 他人消息的深色背景 */
}

.timestamp {
    font-size: 12px;
    display: block;
    margin-top: 5px;
    color: #aaaaaa; /* 时间戳颜色 */
}

.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #bbbbbb; /* 复选框文本颜色 */
}

.checkbox-container input {
    margin-right: 5px;
}

/* 表情和文件弹窗样式 */
#emoji-popup,
#file-popup {
    display: none;
    position: absolute;
    background: #2d2d2d;
    border: 1px solid #444444;
    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.3);
    bottom: 50px;
    left: 0;
}

.emoji {
    cursor: pointer;
    font-size: 24px;
    text-align: center;
}

.emoji:hover {
    background-color: #3d3d3d;
}

.message img {
    max-width: 100%;
    max-height: 200px;
    cursor: pointer;
    border-radius: 8px;
}

.enlarged-image {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: auto;
    border: 2px solid #444;
    border-radius: 8px;
}

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}



.username {
    font-size: 10px; /* 例如设置为14px */
    /* 可补充其他样式，如颜色、粗细等 */
    /* color: #ffffff; */
    /* font-weight: bold; */
}






/* 公告栏样式 */
#notice-popup {
    display: none;
    position: absolute;
    background: #2d2d2d;
    border: 1px solid #444444;
    padding: 10px;
    z-index: 1000;
    width: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    left: 50%;
    transform: translateX(-50%);
    top: 50px;
    color: #e0e0e0;
}

#close-notice {
    margin-top: 10px;
    background-color: #333;
    color: white;
}

/* GitHub 图标样式 */
.github-icon {
    font-size: 24px;
    color: #bbbbbb;
    text-decoration: none;
}

.github-icon:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        width: 100%;
        padding: 20px;
        border-radius: 0;
        height: calc(100vh - 40px);
    }
}
