*, ::before, ::after {
    box-sizing: border-box;
}
html,body{
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;
}
body{
    max-width:800px;
    margin:0 auto;
    background-color: #ffffff;
}
.top{
    padding: 0 10px;
    background-color: #ffffff;
    height:50px;
    line-height:50px;
    text-align:center;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
    font-size: 18px;
}
.mk-chat-box{
    font-size:16px;
    width: 100%;
    padding: 0;
    position:relative;
    overflow-y: scroll;
    overflow-x: hidden;
    height: calc(100% - 130px);
    border: 1px solid #e0e0e0;
    border-bottom:0;
    background: white;
}
.footer-links {
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}
.footer-links a {
    margin: 0 10px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}
.write{
    height:50px;
    width: 100%;
    display: flex;
    background: white;
    border-top: 1px solid #e0e0e0;
}
.write input { 
    font-size: 16px;
    flex-grow: 1;
    height: 50px;
    padding: 0 15px;
    border: none;
    outline: none;
    background: white;
}
.global-mute-input {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
}
.send{
    color:#fff;
    text-decoration:none;
    width:80px; 
    background-color: #007bff;
    display:flex;
    justify-content: center;
    align-items: center;
    height: 50px;
}
.send.disabled{
    background-color: #cccccc;
}
.mk-chat-box .msg{
    margin: 10px;
    position: relative;
    min-height: 40px;
    border: 0;
    display: flex;
    align-items: flex-start;
}
.mk-chat-box .right{
    flex-direction: row-reverse;
}
.mk-chat-box .left{
    flex-direction: row;
}
.mk-chat-box img.head{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    cursor: pointer;
}
.mk-chat-box .msg-content {
    max-width: 70%;
    margin: 0 10px;
}
.mk-chat-box .name{
    color: #666;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}
.mk-chat-box .content{
    word-break: break-all;
    word-wrap: break-word;
    position: relative;
    display: inline-block;
    font-size: 14px;
    padding: 8px 12px;
    line-height: 1.4;
    border-radius: 18px;
    min-width: 9px;
    min-height: 18px;
}
.mk-chat-box .right .content{
    background: #007bff;
    color: white;
}
.mk-chat-box .left .content{
    background: #f5f5f5;
    color: #333;
}
.mk-chat-box .msg-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}
.recall-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 5px;
    cursor: pointer;
}
.recall-btn:hover {
    background: #ff3742;
}
.recalled-msg {
    color: #999;
    font-style: italic;
}
.auth-container {
    max-width: 400px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}
.auth-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    background: #f8f9fa;
}
.auth-tabs .tab.active {
    background: white;
    font-weight: bold;
    border-bottom: 2px solid #007bff;
}
.auth-forms {
    padding: 20px;
}
.form-container {
    display: none;
}
.form-container.active {
    display: block;
}
.form-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.birthday-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.birthday-selector select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.auth-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.auth-btn:hover {
    background: #0069d9;
}
.message-list {
    padding: 15px;
    background: white;
}
.message-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}
.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}
.message-user {
    font-weight: bold;
}
.message-time {
    color: #999;
}
.message-ip {
    color: #666;
    font-family: monospace;
}
.message-content {
    line-height: 1.5;
}
.user-profile {
    padding: 20px;
    background: white;
}
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}
.user-details {
    max-width: 400px;
    margin: 0 auto;
}
.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.label {
    font-weight: bold;
    width: 100px;
}
.value {
    flex: 1;
}
.value.online {
    color: #28a745;
    font-weight: bold;
}
.value.offline {
    color: #6c757d;
}
.settings-container {
    padding: 20px;
    background: white;
}
.settings-container h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.error-message {
    color: #dc3545;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
    margin-bottom: 15px;
}
.success-message {
    color: #28a745;
    padding: 10px;
    background: #d4edda;
    border-radius: 4px;
    margin-bottom: 15px;
}
.recalled-msg {
    color: #999;
    font-style: italic;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}
.settings-container h2 {
    margin-top: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.settings-container form {
    margin-bottom: 30px;
}

/* 管理员相关样式 */
.admin-panel {
    padding: 10px;
    background: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
    text-align: center;
}
.admin-panel button {
    margin: 0 5px;
    padding: 5px 10px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}
.admin-panel button:hover {
    background: #1976d2;
}
.permission-badge {
    font-size: 10px;
    background: #ff9800;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}
.admin-badge {
    font-size: 10px;
    background: #4caf50;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}
.super-admin-badge {
    font-size: 10px;
    background: #f44336;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

/* 用户管理样式 */
.user-management {
    max-height: 400px;
    overflow-y: auto;
}
.user-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}
.user-info {
    font-weight: bold;
    margin-bottom: 5px;
}
.user-status {
    color: #666;
    font-size: 12px;
    margin-bottom: 10px;
}
.user-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.user-actions button, .user-actions select {
    padding: 3px 8px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
}
.user-actions button:hover {
    background: #f5f5f5;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    width: 500px;
}
.modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header .close {
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}
.modal-content {
    padding: 15px;
}

/* 禁言状态提示 */
.muted-indicator {
    color: #ff4757;
    font-size: 12px;
    margin-left: 5px;
}
.global-mute-indicator {
    background: #ff4757;
    color: white;
    padding: 5px 10px;
    text-align: center;
    font-size: 14px;
}