* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 违禁词提示模态框样式 ==================== */

.banned-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.banned-word-modal.show {
    opacity: 1;
    visibility: visible;
}

.banned-word-dialog {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 20px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 32px;
    min-width: 500px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.banned-word-modal.show .banned-word-dialog {
    transform: scale(1) translateY(0);
}

.banned-word-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
    border-radius: 20px;
}

.banned-word-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.banned-word-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 16px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.banned-word-icon i {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banned-word-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.banned-word-content {
    margin-bottom: 24px;
}

.banned-word-message {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
}

.banned-words-list {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.banned-words-list h4 {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banned-words-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.banned-word-tag {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 
        0 4px 8px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.original-message-container {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.original-message-container h4 {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.original-message {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 8px;
    padding: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2d3748;
    word-wrap: break-word;
}

.banned-word-highlight {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

.banned-word-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.banned-word-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.banned-word-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 8px 16px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.banned-word-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 24px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.banned-word-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.banned-word-btn.secondary:hover {
    background: rgba(248, 250, 252, 0.95);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 深色主题下的违禁词提示样式 */
body.dark-theme .banned-word-dialog {
    background: rgba(51, 65, 85, 0.98);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-theme .banned-word-dialog::before {
    background: linear-gradient(135deg, 
        rgba(71, 85, 105, 0.1) 0%, 
        rgba(51, 65, 85, 0.05) 50%, 
        rgba(71, 85, 105, 0.1) 100%);
}

body.dark-theme .banned-word-header {
    border-bottom-color: rgba(71, 85, 105, 0.5);
}

body.dark-theme .banned-word-title {
    color: #e2e8f0;
}

body.dark-theme .banned-word-message {
    color: #cbd5e1;
}

body.dark-theme .banned-words-list {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-theme .original-message-container {
    background: rgba(71, 85, 105, 0.5);
    border-color: rgba(100, 116, 139, 0.5);
}

body.dark-theme .original-message-container h4 {
    color: #cbd5e1;
}

body.dark-theme .original-message {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
    color: #e2e8f0;
}

body.dark-theme .banned-word-btn.secondary {
    background: rgba(71, 85, 105, 0.9);
    color: #cbd5e1;
    border-color: rgba(100, 116, 139, 0.5);
}

body.dark-theme .banned-word-btn.secondary:hover {
    background: rgba(100, 116, 139, 0.95);
}

/* 状态消息样式 */
.status-message {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.status-message i {
    margin-right: 8px;
    font-size: 16px;
}

.status-message.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.status-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-message.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-message.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 禁用状态样式 */
.message-input.disabled,
.message-input:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn.disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .banned-word-dialog {
        min-width: 320px;
        max-width: calc(100vw - 40px);
        padding: 24px;
        margin: 20px;
    }
    
    .banned-word-title {
        font-size: 1.2rem;
    }
    
    .banned-word-message {
        font-size: 0.9rem;
    }
    
    .banned-word-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .banned-word-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .banned-words-tags {
        justify-content: center;
    }
}

/* ==================== 精美用户提示框卡片样式 ==================== */

.user-tooltip-card {
    position: fixed;
    z-index: 9999;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.98) 50%, 
        rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    opacity: 0;
    transform: translateY(15px) scale(0.85);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
    min-width: 200px;
    max-width: 280px;
}

.user-tooltip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

.user-tooltip-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tooltip-card-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.tooltip-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.tooltip-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.tooltip-avatar-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, 
        var(--primary-color, #007bff) 0%, 
        rgba(102, 126, 234, 0.8) 50%, 
        var(--primary-color, #007bff) 100%);
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.3s ease;
    z-index: -1;
    animation: avatarRingPulse 3s ease-in-out infinite;
}

@keyframes avatarRingPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1.1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.15);
    }
}

.tooltip-user-info {
    flex: 1;
    min-width: 0;
}

.tooltip-nickname {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
}

.tooltip-title-badge {
    position: relative;
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    background: 
        linear-gradient(135deg, 
            var(--badge-color, #007bff) 0%, 
            color-mix(in srgb, var(--badge-color, #007bff) 85%, white) 15%,
            color-mix(in srgb, var(--badge-color, #007bff) 90%, white) 30%,
            var(--badge-color-light, #4dabf7) 50%, 
            color-mix(in srgb, var(--badge-color, #007bff) 90%, white) 70%,
            color-mix(in srgb, var(--badge-color, #007bff) 85%, white) 85%,
            var(--badge-color, #007bff) 100%
        );
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.15),
        0 0 16px color-mix(in srgb, var(--badge-color, #007bff) 40%, transparent),
        0 3px 8px rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: titleGlowSoft 4s ease-in-out infinite alternate;
}

.tooltip-title-badge::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.7) 25%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0.7) 75%,
        transparent
    );
    border-radius: 0.5px;
    pointer-events: none;
}

.tooltip-title-shine {
    position: absolute;
    top: -2px;
    left: -100%;
    width: 100%;
    height: calc(100% + 4px);
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
    animation: titleShineMove 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes titleShineMove {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

@keyframes titleGlowSoft {
    0% {
        box-shadow: 
            0 0 0 0.5px rgba(255, 255, 255, 0.15),
            0 0 16px color-mix(in srgb, var(--badge-color, #007bff) 40%, transparent),
            0 3px 8px rgba(0, 0, 0, 0.25),
            0 1px 3px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    100% {
        box-shadow: 
            0 0 0 0.5px rgba(255, 255, 255, 0.2),
            0 0 20px color-mix(in srgb, var(--badge-color, #007bff) 50%, transparent),
            0 3px 8px rgba(0, 0, 0, 0.25),
            0 1px 3px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.6),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
}

.tooltip-title-text {
    position: relative;
    z-index: 1;
}

.tooltip-no-title {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    opacity: 0.8;
}

.tooltip-card-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 当提示框显示在下方时的箭头 */
.user-tooltip-card.bottom .tooltip-card-arrow {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid rgba(255, 255, 255, 0.95);
}

/* 深色主题下的提示框样式 */
body.dark-theme .user-tooltip-card {
    background: linear-gradient(145deg, 
        rgba(30, 41, 59, 0.95) 0%, 
        rgba(15, 23, 42, 0.98) 50%, 
        rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(71, 85, 105, 0.4);
}

body.dark-theme .tooltip-nickname {
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.dark-theme .tooltip-no-title {
    color: #94a3b8;
}

body.dark-theme .tooltip-card-arrow {
    border-top-color: rgba(30, 41, 59, 0.95);
}

body.dark-theme .user-tooltip-card.bottom .tooltip-card-arrow {
    border-bottom-color: rgba(30, 41, 59, 0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-tooltip-card {
        min-width: 180px;
        max-width: 240px;
    }
    
    .tooltip-card-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .tooltip-avatar {
        width: 40px;
        height: 40px;
    }
    
    .tooltip-nickname {
        font-size: 14px;
    }
    
    .tooltip-title-badge {
        padding: 4px 10px;
        font-size: 10px;
    }
}

/* ==================== 原有用户提示框样式（保持兼容性） ==================== */

.user-tooltip {
    position: fixed;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px) saturate(180%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-width: 200px;
    word-wrap: break-word;
}

.user-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.user-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 当提示框显示在下方时的箭头 */
.user-tooltip.bottom::before {
    bottom: auto;
    top: -6px;
    border-top: none;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9);
}

.user-tooltip .tooltip-title {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin-top: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 用户头像悬停效果增强 */
.user-avatar-with-tooltip {
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar-with-tooltip:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 深色主题下的提示框样式 */
body.dark-theme .user-tooltip {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(71, 85, 105, 0.3);
    color: #e2e8f0;
}

body.dark-theme .user-tooltip::before {
    border-top-color: rgba(30, 41, 59, 0.95);
}

body.dark-theme .user-tooltip.bottom::before {
    border-bottom-color: rgba(30, 41, 59, 0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-tooltip {
        font-size: 13px;
        padding: 10px 14px;
        max-width: 180px;
    }
    
    .user-tooltip .tooltip-title {
        font-size: 11px;
    }
}

/* ==================== 聊天室悬浮窗样式 ==================== */

/* 悬浮窗主容器 */
.chat-float-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInFloat 0.4s ease-out;
}

.chat-float-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

/* 悬浮窗头部 */
.chat-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 16px 16px 0 0;
    cursor: move;
    user-select: none;
}

.chat-float-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.chat-float-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.online-count {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.chat-float-controls {
    display: flex;
    gap: 4px;
}

.chat-float-minimize,
.chat-float-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.chat-float-minimize:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: scale(1.05);
}

.chat-float-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.05);
}

/* 悬浮窗主体 */
.chat-float-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-float-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 悬浮窗消息样式 */
.chat-float-messages .message {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.5);
    font-size: 0.85rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.chat-float-messages .message:hover {
    background: rgba(248, 250, 252, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chat-float-messages .message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 100%;
}

.chat-float-messages .message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-float-messages .message-nickname {
    font-weight: 600;
    color: #374151;
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-float-messages .message-time {
    color: #9ca3af;
    font-size: 0.7rem;
    margin-left: auto;
    flex-shrink: 0;
}

.chat-float-messages .message-content {
    color: #4b5563;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
    width: 100%;
    min-height: 20px;
    overflow-wrap: break-word;
}

/* 悬浮窗输入区域 */
.chat-float-input-container {
    padding: 12px 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    background: rgba(248, 250, 252, 0.5);
    border-radius: 0 0 16px 16px;
}

.chat-float-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-float-input-wrapper input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-float-input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-float-send {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-float-send:hover {
    background: color-mix(in srgb, var(--primary-color) 90%, black);
    transform: scale(1.05);
}

/* 悬浮聊天室图片按钮 */
.btn-float-image {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #10b981;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    margin-right: 6px;
}

.btn-float-image:hover {
    background: #059669;
    transform: scale(1.05);
}

/* 悬浮聊天室表情包按钮 */
.btn-float-emoji {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f59e0b;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    margin-right: 6px;
}

.btn-float-emoji:hover {
    background: #d97706;
    transform: scale(1.05);
}

/* 悬浮聊天室图片预览 */
.float-image-preview {
    margin-top: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.float-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.float-preview-container img {
    max-width: 200px;
    max-height: 120px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.float-preview-actions {
    display: flex;
    gap: 8px;
}

.float-preview-actions .btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    flex-direction: row;
}

.float-preview-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.float-preview-actions .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.float-preview-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 禁言提示 */
.mute-notice-float {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.8rem;
}

/* 登录提示 */
.login-prompt-float {
    text-align: center;
    padding: 8px;
}

.login-prompt-float p {
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #64748b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* 最小化状态 */
.chat-float-minimized {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        0 4px 12px rgba(102, 126, 234, 0.2);
    z-index: 10000;
    cursor: move;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: bounceIn 0.4s ease-out;
    user-select: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    /* 移动设备触摸支持 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

.chat-float-minimized:hover {
    transform: scale(1.1);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.4),
        0 6px 16px rgba(102, 126, 234, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.chat-float-minimized.dragging {
    transition: none;
    transform: scale(1.05);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.5),
        0 8px 20px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    cursor: grabbing;
}

.chat-float-mini-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
    pointer-events: none;
}

/* 添加拖拽提示动画 */
.chat-float-minimized::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    opacity: 0;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0;
        transform: rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: rotate(180deg);
    }
}

.new-message-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

/* 滚动条样式 */
.chat-float-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-float-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.chat-float-messages::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.chat-float-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* 动画效果 */
@keyframes slideInFloat {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 悬浮窗提示消息 */
.float-toast {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.float-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.float-toast-success {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.float-toast-error {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.float-toast-info {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}

/* 旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 深色主题适配 */
body.dark-theme .chat-float-window {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(71, 85, 105, 0.4);
}

body.dark-theme .chat-float-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom-color: rgba(71, 85, 105, 0.5);
}

body.dark-theme .chat-float-title {
    color: #f1f5f9;
}

body.dark-theme .online-count {
    color: #94a3b8;
}

body.dark-theme .chat-float-minimize,
body.dark-theme .chat-float-close {
    background: rgba(71, 85, 105, 0.8);
    color: #94a3b8;
}

body.dark-theme .chat-float-messages .message {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}

body.dark-theme .chat-float-messages .message:hover {
    background: rgba(51, 65, 85, 1);
}

body.dark-theme .chat-float-messages .message-header {
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 8px;
}

body.dark-theme .chat-float-messages .message-avatar {
    flex-shrink: 0;
}

body.dark-theme .chat-float-messages .message-nickname {
    color: #e2e8f0;
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-theme .chat-float-messages .message-time {
    margin-left: auto;
    flex-shrink: 0;
}

body.dark-theme .chat-float-messages .message-content {
    color: #cbd5e1;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
    width: 100%;
    min-height: 20px;
    overflow-wrap: break-word;
}

body.dark-theme .chat-float-input-container {
    background: rgba(51, 65, 85, 0.5);
    border-top-color: rgba(71, 85, 105, 0.5);
}

body.dark-theme .chat-float-input-wrapper input {
    background: rgba(71, 85, 105, 0.9);
    border-color: rgba(100, 116, 139, 0.8);
    color: #f1f5f9;
}

body.dark-theme .mute-notice-float {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-theme .login-prompt-float p {
    color: #94a3b8;
}

/* 深色主题图片功能样式 */
body.dark-theme .float-image-preview {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(71, 85, 105, 0.8);
}

body.dark-theme .float-preview-actions .btn-secondary {
    background: rgba(71, 85, 105, 0.9);
    color: #e2e8f0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chat-float-window {
        width: 300px;
        height: 400px;
        bottom: 10px;
        right: 10px;
    }
    
    .chat-float-minimized {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
    }
    
    .chat-float-mini-content {
        font-size: 1rem;
    }
    
    .new-message-indicator {
        top: 6px;
        right: 6px;
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .chat-float-window {
        width: calc(100vw - 20px);
        height: 350px;
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(248, 250, 252, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(241, 245, 249, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #2d3748;
    overflow: hidden;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.03"><circle cx="30" cy="30" r="1"/></g></svg>') repeat;
    pointer-events: none;
    z-index: -1;
}

.container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 侧边栏收起状态 */
.sidebar.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
}

/* 收起按钮样式 */
.sidebar-toggle-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(239, 68, 68, 0.1);
}

.sidebar-toggle-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* 主内容区域适应侧边栏收起 */
.container.sidebar-collapsed {
    gap: 0;
}

.container.sidebar-collapsed .main-content {
    margin-left: 20px;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

.sidebar-header {
    padding: 32px 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #2d3748;
    text-align: center;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
}

.sidebar-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-header i {
    margin-right: 12px;
    color: #4a5568;
    font-size: 1.4rem;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* 允许flex子项收缩 */
}

/* 侧边栏菜单滚动条样式 */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 10px 0;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(74, 85, 104, 0.3);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 85, 104, 0.5);
}

/* Firefox滚动条样式 */
.sidebar-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 85, 104, 0.3) rgba(255, 255, 255, 0.1);
}

.menu-group {
    margin-bottom: 0;
}

.menu-group:last-child {
    margin-bottom: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    margin: 6px 18px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        color-mix(in srgb, var(--primary-color) 15%, transparent), 
        transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0.05;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover::after {
    opacity: 1;
}

.menu-item-content {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.menu-item-content i {
    font-size: 1.3rem;
    margin-right: 15px;
    width: 24px;
    color: #4a5568;
    transition: all 0.3s ease;
}

.menu-item-content span {
    font-weight: 600;
    color: #4a5568;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.expand-icon {
    font-size: 0.9rem;
    color: #a0aec0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
    position: relative;
    z-index: 1;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(8px) scale(1.02);
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 15%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 10%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.menu-item:hover .menu-item-content i {
    color: #2d3748;
    transform: scale(1.1);
}

.menu-item:hover .menu-item-content span {
    color: #2d3748;
}

.menu-item:hover .expand-icon {
    color: #2d3748;
}

.menu-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 
        0 12px 40px color-mix(in srgb, var(--primary-color) 40%, transparent),
        0 6px 20px color-mix(in srgb, var(--primary-color) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.menu-item.active::before {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
}

.menu-item.active .menu-item-content i {
    color: white;
}

.menu-item.active .menu-item-content span {
    color: white;
    font-weight: 700;
}

.menu-item.active .expand-icon {
    color: white;
}

.menu-item.expanded .expand-icon {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    margin: 8px 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.submenu.expanded {
    max-height: 500px;
    padding: 12px 0;
    margin-bottom: 8px;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 3px 12px;
    position: relative;
    overflow: hidden;
}

.submenu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-color) 20%, transparent), transparent);
    transition: left 0.4s;
}

.submenu-item:hover::before {
    left: 100%;
}

.submenu-item:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    transform: translateX(8px);
}

.submenu-item i {
    font-size: 1.1rem;
    margin-right: 12px;
    width: 18px;
    color: #4a5568;
    transition: all 0.3s ease;
}

.submenu-item:hover i {
    color: #2d3748;
    transform: scale(1.1);
}

.submenu-item span {
    color: #4a5568;
    font-weight: 500;
    transition: all 0.3s ease;
}

.submenu-item:hover span {
    color: #2d3748;
    font-weight: 600;
}

.sidebar-footer {
    padding: 25px;
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
    background: color-mix(in srgb, var(--primary-color) 2%, transparent);
    border-radius: 0 0 20px 20px;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 15px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.user-avatar-section {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.checkin-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.checkin-btn.checked {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
}

.checkin-btn.checked:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 8px;
}

.username {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    margin: 0;
}

.user-points {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.user-points i {
    color: #f59e0b;
    font-size: 0.75rem;
}

.btn {
    width: 100%;
    padding: 18px 28px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover::after {
    opacity: 1;
}

.btn i {
    margin-right: 15px;
    font-size: 1.3rem;
    width: 24px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-login {
    background: linear-gradient(135deg, 
        #2d3748 0%, 
        #4a5568 100%);
    color: white;
    box-shadow: 
        0 8px 32px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login:hover {
    box-shadow: 
        0 16px 48px rgba(45, 55, 72, 0.4),
        0 8px 24px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-register {
    background: linear-gradient(135deg, 
        #718096 0%, 
        #a0aec0 100%);
    color: white;
    box-shadow: 
        0 8px 32px rgba(113, 128, 150, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-register:hover {
    box-shadow: 
        0 16px 48px rgba(113, 128, 150, 0.4),
        0 8px 24px rgba(113, 128, 150, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-logout {
    background: linear-gradient(135deg, 
        rgba(45, 55, 72, 0.95) 0%, 
        rgba(74, 85, 104, 0.95) 100%);
    color: white;
    box-shadow: 
        0 12px 40px rgba(45, 55, 72, 0.4),
        0 6px 20px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-logout:hover {
    box-shadow: 
        0 16px 48px rgba(45, 55, 72, 0.5),
        0 8px 24px rgba(45, 55, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-admin {
    background: linear-gradient(135deg, 
        rgba(45, 55, 72, 0.95) 0%, 
        rgba(74, 85, 104, 0.95) 100%);
    color: white;
    box-shadow: 
        0 12px 40px rgba(45, 55, 72, 0.4),
        0 6px 20px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-admin:hover {
    box-shadow: 
        0 16px 48px rgba(45, 55, 72, 0.5),
        0 8px 24px rgba(45, 55, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-site-settings {
    background: linear-gradient(135deg, 
        rgba(45, 55, 72, 0.95) 0%, 
        rgba(74, 85, 104, 0.95) 100%);
    color: white;
    box-shadow: 
        0 12px 40px rgba(45, 55, 72, 0.4),
        0 6px 20px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-site-settings:hover {
    box-shadow: 
        0 16px 48px rgba(45, 55, 72, 0.5),
        0 8px 24px rgba(45, 55, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-settings {
    background: linear-gradient(135deg, 
        rgba(45, 55, 72, 0.95) 0%, 
        rgba(74, 85, 104, 0.95) 100%);
    color: white;
    box-shadow: 
        0 12px 40px rgba(45, 55, 72, 0.4),
        0 6px 20px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-settings:hover {
    box-shadow: 
        0 16px 48px rgba(45, 55, 72, 0.5),
        0 8px 24px rgba(45, 55, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

/* 内容区域统一样式 */
.content-section {
    display: none;
    height: 100%;
    flex-direction: column;
    background: transparent;
    margin: 0;
    border: none;
    overflow: hidden;
}

.content-section.active {
    display: flex;
}

.section-header {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    padding: 25px 30px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    flex-shrink: 0;
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(10px);
}

.section-header h2 {
    color: #2d3748;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: #718096;
    margin: 8px 0 0 0;
    font-size: 1rem;
    font-weight: 500;
}

.section-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 20px;
}

/* 主内容区域滚动条样式 */
.section-body::-webkit-scrollbar {
    width: 8px;
}

.section-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 10px 0;
}

.section-body::-webkit-scrollbar-thumb {
    background: rgba(74, 85, 104, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.section-body::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 85, 104, 0.5);
}

/* Firefox滚动条样式 */
.section-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 85, 104, 0.3) rgba(255, 255, 255, 0.1);
}

/* 聊天室特定样式 */
#chat-content .section-body {
    display: flex;
    gap: 25px;
    padding: 25px;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: transparent;
    min-height: 0;
    scroll-behavior: smooth;
    position: relative;
}

.chat-input-container {
    padding: 20px 25px;
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.online-users {
    width: 320px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 25px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.online-users h3 {
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(226, 232, 240, 0.5);
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-count {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748 !important;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-left: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.users-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 工具箱、游戏和资源库网格样式 */
.tools-grid, .games-grid, .resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 0;
}

.tool-item, .game-item, .resource-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 36px;
    text-align: center;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.tool-item::before, .game-item::before, .resource-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0.08;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.tool-item::after, .game-item::after, .resource-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, 
        color-mix(in srgb, var(--primary-color) 10%, transparent) 0%, 
        transparent 70%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.tool-item:hover::before, .game-item:hover::before, .resource-item:hover::before {
    opacity: 1;
}

.tool-item:hover::after, .game-item:hover::after, .resource-item:hover::after {
    width: 300px;
    height: 300px;
}

.tool-item:hover, .game-item:hover, .resource-item:hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg);
    box-shadow: 
        0 32px 80px color-mix(in srgb, var(--primary-color) 15%, transparent),
        0 16px 40px color-mix(in srgb, var(--primary-color) 12%, transparent),
        0 8px 20px color-mix(in srgb, var(--primary-color) 8%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.tool-item i, .game-item i, .resource-item i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, 
        #2d3748 0%, 
        #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    display: block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(45, 55, 72, 0.2));
}

.tool-item:hover i, .game-item:hover i, .resource-item:hover i {
    transform: scale(1.15) translateY(-4px);
    filter: drop-shadow(0 8px 16px rgba(45, 55, 72, 0.3));
}

.tool-item h3, .game-item h3, .resource-item h3 {
    color: #2d3748;
    margin: 0 0 18px 0;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.tool-item:hover h3, .game-item:hover h3, .resource-item:hover h3 {
    color: #1a202c;
    transform: translateY(-2px);
}

.tool-item p, .game-item p, .resource-item p {
    color: #718096;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.tool-item:hover p, .game-item:hover p, .resource-item:hover p {
    color: #4a5568;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    color: #a0aec0;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 25px;
    display: block;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h3 {
    margin: 0 0 15px 0;
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 700;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
    color: #718096;
}

/* 内容显示区域样式 */
.content-viewer-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    overflow: hidden;
}

.content-viewer-header {
    padding: 20px 30px;
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.btn-back {
    background: linear-gradient(135deg, 
        rgba(45, 55, 72, 0.95) 0%, 
        rgba(74, 85, 104, 0.95) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 8px 25px rgba(45, 55, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 35px rgba(45, 55, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-back i {
    font-size: 1rem;
}

#contentFrame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.message {
    display: flex;
    margin-bottom: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 添加消息滑入动画 */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 新消息滑入动画优化 */
@keyframes newMessageSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* 为新消息添加特殊样式 */
.message.new-message-animation {
    animation: newMessageSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 平滑滚动优化 */
.chat-messages {
    scroll-behavior: smooth;
}

/* 减少动画时的重绘 */
.message {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    border: 3px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.message-avatar:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.message-nickname {
    font-weight: 700;
    color: #2d3748;
    margin-right: 12px;
    font-size: 0.95rem;
}

.message-time {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
}

/* 用户头衔徽章样式 - 小巧精致版 */
.user-title-badge {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 5px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    background: 
        linear-gradient(135deg, 
            var(--badge-color, #007bff) 0%, 
            color-mix(in srgb, var(--badge-color, #007bff) 85%, white) 15%,
            color-mix(in srgb, var(--badge-color, #007bff) 90%, white) 30%,
            var(--badge-color-light, #4dabf7) 50%, 
            color-mix(in srgb, var(--badge-color, #007bff) 90%, white) 70%,
            color-mix(in srgb, var(--badge-color, #007bff) 85%, white) 85%,
            var(--badge-color, #007bff) 100%
        ),
        radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.2), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 255, 255, 0.1), transparent 40%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.6),
        0 0 6px rgba(255, 255, 255, 0.25),
        0 0 12px color-mix(in srgb, var(--badge-color, #007bff) 40%, transparent);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.12),
        0 0 12px color-mix(in srgb, var(--badge-color, #007bff) 35%, transparent),
        0 2px 8px rgba(0, 0, 0, 0.25),
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        inset 1px 0 0 rgba(255, 255, 255, 0.15),
        inset -1px 0 0 rgba(0, 0, 0, 0.08);
    vertical-align: middle;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(1px);
    animation: titleGlow 4s ease-in-out infinite alternate;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    transform-style: preserve-3d;
}

.user-title-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        60deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.08) 60%,
        transparent 70%
    );
    border-radius: 14px;
    animation: titleShine 5s linear infinite;
    pointer-events: none;
    opacity: 0.8;
    filter: blur(0.3px);
}

.user-title-badge::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6) 25%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.6) 75%,
        transparent
    );
    border-radius: 0.5px;
    pointer-events: none;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}

.user-title-badge:hover {
    transform: translateY(-1px) scale(1.05) rotateX(2deg);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.2),
        0 0 18px color-mix(in srgb, var(--badge-color, #007bff) 50%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        inset 1px 0 0 rgba(255, 255, 255, 0.2),
        inset -1px 0 0 rgba(0, 0, 0, 0.1);
    filter: brightness(1.1) saturate(1.15) contrast(1.03);
    animation: titleGlowHover 0.4s ease-out;
}

@keyframes titleGlow {
    0% {
        box-shadow: 
            0 0 0 0.5px rgba(255, 255, 255, 0.12),
            0 0 12px color-mix(in srgb, var(--badge-color, #007bff) 35%, transparent),
            0 2px 8px rgba(0, 0, 0, 0.25),
            0 1px 2px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2),
            inset 1px 0 0 rgba(255, 255, 255, 0.15),
            inset -1px 0 0 rgba(0, 0, 0, 0.08);
        filter: brightness(1) saturate(1) contrast(1);
    }
    100% {
        box-shadow: 
            0 0 0 0.5px rgba(255, 255, 255, 0.15),
            0 0 16px color-mix(in srgb, var(--badge-color, #007bff) 45%, transparent),
            0 2px 8px rgba(0, 0, 0, 0.25),
            0 1px 2px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.45),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2),
            inset 1px 0 0 rgba(255, 255, 255, 0.18),
            inset -1px 0 0 rgba(0, 0, 0, 0.08);
        filter: brightness(1.05) saturate(1.08) contrast(1.01);
    }
}

@keyframes titleShine {
    0% {
        transform: translateX(-150%) translateY(-150%) rotate(60deg);
        opacity: 0;
    }
    25% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
    75% {
        opacity: 0.2;
    }
    100% {
        transform: translateX(150%) translateY(150%) rotate(60deg);
        opacity: 0;
    }
}

@keyframes titleGlowHover {
    0% {
        filter: brightness(1.1) saturate(1.15) contrast(1.03);
    }
    50% {
        filter: brightness(1.15) saturate(1.2) contrast(1.05);
    }
    100% {
        filter: brightness(1.1) saturate(1.15) contrast(1.03);
    }
}

.message-text {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 20px 20px 20px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
    position: relative;
    overflow: hidden;
}

.message-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

/* ==================== 置顶消息样式 ==================== */

/* 置顶消息容器 */
.message.pinned-message {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.08) 0%, 
        rgba(255, 193, 7, 0.05) 50%, 
        rgba(255, 215, 0, 0.08) 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 
        0 4px 20px rgba(255, 193, 7, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    animation: pinnedGlow 3s ease-in-out infinite alternate;
}

.message.pinned-message::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 193, 7, 0.3) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(255, 193, 7, 0.3) 100%);
    border-radius: 14px;
    z-index: -1;
    animation: pinnedShine 4s linear infinite;
}

/* 置顶标识 */
.pin-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: pinPulse 2s ease-in-out infinite;
}

.pin-indicator i {
    font-size: 0.6rem;
    animation: pinRotate 3s ease-in-out infinite;
}

/* 置顶按钮 */
.pin-button {
    background: none;
    border: none;
    color: #ffc107;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    margin-left: 8px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    opacity: 0.7;
}

.pin-button:hover {
    background: rgba(255, 193, 7, 0.1);
    color: #ff9800;
    opacity: 1;
    transform: scale(1.1);
}

.pin-button.pinned {
    color: #ff9800;
    opacity: 1;
}

.pin-button.pinned:hover {
    color: #f57c00;
}

/* 置顶消息动画 */
@keyframes pinnedGlow {
    0% {
        box-shadow: 
            0 4px 20px rgba(255, 193, 7, 0.15),
            0 2px 8px rgba(0, 0, 0, 0.1);
    }
    100% {
        box-shadow: 
            0 6px 25px rgba(255, 193, 7, 0.25),
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes pinnedShine {
    0% {
        transform: translateX(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(200%) rotate(45deg);
        opacity: 0;
    }
}

@keyframes pinPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes pinRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* ==================== 置顶消息悬浮区域样式 ==================== */

/* 置顶消息容器 */
.pinned-messages-container {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.08) 0%, 
        rgba(255, 193, 7, 0.05) 50%, 
        rgba(255, 215, 0, 0.08) 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 
        0 4px 20px rgba(255, 193, 7, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.pinned-messages-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 193, 7, 0.6) 50%, 
        transparent 100%);
    animation: pinnedTopShine 3s ease-in-out infinite;
}

/* 置顶消息头部 */
.pinned-messages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.1) 0%, 
        rgba(255, 215, 0, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 193, 7, 0.15);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.pinned-messages-header:hover {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.15) 0%, 
        rgba(255, 215, 0, 0.08) 100%);
}

.pinned-messages-header i {
    color: #ffc107;
    margin-right: 8px;
    font-size: 0.9rem;
    animation: pinPulse 2s ease-in-out infinite;
}

.pinned-messages-header span {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.pinned-toggle-btn {
    background: none;
    border: none;
    color: #ffc107;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.pinned-toggle-btn:hover {
    background: rgba(255, 193, 7, 0.1);
    transform: scale(1.1);
}

.pinned-toggle-btn i {
    transition: transform 0.3s ease;
}

.pinned-messages-container.collapsed .pinned-toggle-btn i {
    transform: rotate(180deg);
}

/* 置顶消息内容区域 */
.pinned-messages-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    transition: all 0.3s ease;
}

.pinned-messages-container.collapsed .pinned-messages-content {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

/* 置顶消息项 */
.pinned-message-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 193, 7, 0.1);
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
    position: relative;
}

.pinned-message-item:last-child {
    border-bottom: none;
}

.pinned-message-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(2px);
}

.pinned-message-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ffc107 0%, #ff9800 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pinned-message-item:hover::before {
    opacity: 1;
}

/* 置顶消息头部信息 */
.pinned-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.pinned-message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.pinned-message-nickname {
    font-weight: 600;
    color: #374151;
}

.pinned-message-time {
    color: #9ca3af;
    font-size: 0.75rem;
}

.pinned-message-pin-info {
    margin-left: auto;
    font-size: 0.7rem;
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pinned-message-pin-info i {
    font-size: 0.6rem;
}

/* 取消置顶按钮 */
.unpin-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    margin-left: 8px;
    opacity: 0.7;
}

.unpin-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.unpin-btn:active {
    transform: scale(0.95);
}

/* 置顶消息内容 */
.pinned-message-content {
    color: #4b5563;
    line-height: 1.4;
    word-wrap: break-word;
    font-size: 0.9rem;
}

/* 置顶消息图片 */
.pinned-message-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pinned-message-image:hover {
    transform: scale(1.02);
}

/* 置顶消息动画 */
@keyframes pinnedTopShine {
    0%, 100% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 滚动条样式 */
.pinned-messages-content::-webkit-scrollbar {
    width: 4px;
}

.pinned-messages-content::-webkit-scrollbar-track {
    background: rgba(255, 193, 7, 0.1);
    border-radius: 2px;
}

.pinned-messages-content::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.4);
    border-radius: 2px;
}

.pinned-messages-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.6);
}

/* 深色主题适配 */
body.dark-theme .pinned-messages-container {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.1) 0%, 
        rgba(255, 215, 0, 0.05) 50%, 
        rgba(255, 193, 7, 0.1) 100%);
    border-color: rgba(255, 193, 7, 0.3);
}

body.dark-theme .pinned-messages-header {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.15) 0%, 
        rgba(255, 215, 0, 0.08) 100%);
    border-bottom-color: rgba(255, 193, 7, 0.2);
}

body.dark-theme .pinned-messages-header span {
    color: #e2e8f0;
}

body.dark-theme .pinned-message-item {
    background: rgba(45, 55, 72, 0.5);
    border-bottom-color: rgba(255, 193, 7, 0.15);
}

body.dark-theme .pinned-message-item:hover {
    background: rgba(45, 55, 72, 0.8);
}

body.dark-theme .pinned-message-nickname {
    color: #e2e8f0;
}

body.dark-theme .pinned-message-content {
    color: #cbd5e0;
}

body.dark-theme .pinned-messages-content::-webkit-scrollbar-track {
    background: rgba(255, 193, 7, 0.15);
}

body.dark-theme .pinned-messages-content::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.5);
}

body.dark-theme .pinned-messages-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.7);
}

body.dark-theme .unpin-btn {
    color: #f56565;
}

body.dark-theme .unpin-btn:hover {
    background: rgba(245, 101, 101, 0.15);
}

#messageInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    border-radius: 25px;
    outline: none;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #2d3748;
    font-weight: 500;
}

#messageInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
    transform: scale(1.02);
}

#messageInput::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.btn-send {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
    position: relative;
    overflow: hidden;
}

.btn-image {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
    position: relative;
    overflow: hidden;
}

.btn-emoji {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
    position: relative;
    overflow: hidden;
}

.btn-send::before, .btn-image::before, .btn-emoji::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.btn-send:hover::before, .btn-image:hover::before, .btn-emoji:hover::before {
    transform: scale(1);
}

.btn-send:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.btn-image:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.btn-emoji:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.btn-send i, .btn-image i, .btn-emoji i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* 图片预览样式 */
.image-preview {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.preview-container img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.preview-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    flex-direction: row;
}

.preview-actions .btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.preview-actions .btn-secondary {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #4a5568;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.preview-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 消息中的图片样式 */
.message-image {
    max-width: 300px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
    margin-top: 8px;
}

.message-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 图片消息特殊样式 */
.message.image-message .message-text {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    padding: 15px;
    backdrop-filter: blur(10px);
}

.login-prompt {
    text-align: center;
    color: #718096;
    font-style: italic;
    font-size: 1.1rem;
    padding: 30px;
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    border-radius: 15px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.mute-notice {
    background: linear-gradient(135deg, rgba(248, 215, 218, 0.9) 0%, rgba(245, 198, 203, 0.9) 100%);
    color: #721c24;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(245, 198, 203, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(248, 215, 218, 0.3);
}

.mute-notice i {
    margin-right: 10px;
    font-size: 18px;
}

.mute-time {
    display: block;
    margin-top: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.mute-notice .mute-reason {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(245, 198, 203, 0.5);
    font-size: 15px;
    opacity: 0.9;
}

.online-user {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
    position: relative;
    overflow: hidden;
}

.online-user::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-color) 10%, transparent), transparent);
    transition: left 0.4s;
}

.online-user:hover::before {
    left: 100%;
}

.online-user:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    transform: translateX(5px);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.online-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    transition: all 0.3s ease;
}

.online-user:hover img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.online-user span {
    font-weight: 600;
    color: #2d3748;
    position: relative;
    z-index: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .section-header {
        padding: 15px 20px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .section-body {
        padding: 15px;
    }
    
    #chat-content .section-body {
        flex-direction: column;
        gap: 15px;
    }
    
    .online-users {
        width: 100%;
        margin-top: 0;
    }
    
    .tools-grid, .games-grid, .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .tool-item, .game-item, .resource-item {
        padding: 20px;
    }
    
    .tool-item i, .game-item i, .resource-item i {
        font-size: 2rem;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
}
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px) saturate(120%);
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    margin: 3% auto;
    padding: 48px;
    border-radius: 28px;
    width: 90%;
    max-width: 480px;
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-gradient);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
    border-radius: 28px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.close {
    color: #a0aec0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal h2 {
    margin-bottom: 25px;
    color: #2d3748;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.form-group input {
    width: 100%;
    padding: 18px 22px;
    border: 2px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    border-radius: 16px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    color: #2d3748;
    font-weight: 500;
    position: relative;
    z-index: 1;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 4px color-mix(in srgb, var(--primary-color) 12%, transparent),
        0 8px 32px color-mix(in srgb, var(--primary-color) 15%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: scale(1.02) translateY(-2px);
    background: rgba(255, 255, 255, 0.98);
}

.form-group input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 18px 36px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 30%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 70%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover::after {
    width: 200px;
    height: 200px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 16px 48px color-mix(in srgb, var(--primary-color) 40%, transparent),
        0 8px 24px color-mix(in srgb, var(--primary-color) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.avatar-preview {
    margin-top: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.avatar-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

.avatar-preview img:hover {
    border-color: var(--primary-color);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 
        0 16px 48px color-mix(in srgb, var(--primary-color) 20%, transparent),
        0 8px 24px color-mix(in srgb, var(--primary-color) 15%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* 动画效果 */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: scale(1.1);
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.1);
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 25px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .sidebar-header h2 {
        font-size: 1.3rem;
    }
    
    .menu-item {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 20px;
    }
    
    .form-group input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 12px 25px;
        font-size: 15px;
    }
    
    .avatar-preview img {
        width: 70px;
        height: 70px;
    }
    
    .empty-state {
        padding: 50px 20px;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
}

/* 加载状态样式 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background: rgba(45, 55, 72, 0.95);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(45, 55, 72, 0.95) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 焦点可访问性 */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

button:focus,
input:focus,
.menu-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .sidebar {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid #fff;
    }
    
    .main-content {
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    #chat-content {
        flex-direction: column;
    }
    
    .online-users {
        width: 100%;
        margin-top: 20px;
    }
    
    .tools-grid, .games-grid, .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 主站点容器样式 */
.main-site {
    display: none;
    height: 100vh;
    overflow: hidden;
}

.main-site.loaded {
    display: block;
}

.main-site .container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}



/* 网站基本设置样式 */
.site-basic-settings {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.site-basic-settings .setting-group {
    position: relative;
}

.site-basic-settings .setting-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.site-basic-settings .setting-group label::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary-gradient);
    border-radius: 2px;
    flex-shrink: 0;
}

.site-basic-settings input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-basic-settings input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 10%, transparent), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.site-basic-settings input[type="text"]:hover {
    border-color: #cbd5e1;
}

/* 图标上传容器样式 */
.icon-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.icon-preview {
    width: 80px;
    height: 80px;
    border: 3px dashed #e5e7eb;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    position: relative;
    overflow: hidden;
}

.icon-preview:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.icon-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 10px;
}

.icon-placeholder i {
    font-size: 24px;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.icon-preview:hover .icon-placeholder i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.icon-preview:hover .icon-placeholder {
    color: var(--primary-color);
}

.btn-select-icon {
    align-self: flex-start;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-select-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-select-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-select-icon:hover::before {
    left: 100%;
}

.btn-select-icon:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* 图标上传区域布局 */
.icon-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-upload-container .icon-preview {
    flex-shrink: 0;
}

.icon-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .icon-upload-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-basic-settings .setting-group {
        margin-bottom: 25px;
    }
}

/* 网站设置模态框样式 */
.site-settings-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    position: relative;
}

.site-settings-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
    border-radius: 28px;
}

.site-settings-modal h2 {
    color: #2d3748;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-section {
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.settings-section h3 {
    color: #374151;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

/* 主题模式选择器 */
.theme-mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.theme-btn {
    flex: 1;
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.theme-btn i {
    font-size: 24px;
    margin-bottom: 5px;
}

.theme-btn:hover {
    border-color: #667eea;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.theme-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 颜色调色板 */
.color-palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.color-option i {
    color: white;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.color-option.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #667eea, 0 4px 15px rgba(102, 126, 234, 0.3);
}

.color-option.active i {
    opacity: 1;
}

/* 老板键选择框样式 - 精简风格 */
.boss-key-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: 8px;
}

.boss-key-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.boss-key-select:hover {
    border-color: #cbd5e1;
}

/* 设置组标签样式 */
.setting-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

/* 老板键功能标题样式 */
.boss-key-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.boss-key-title i {
    color: #667eea;
    font-size: 18px;
}

/* 老板键配置 */
.boss-key-config {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.boss-key-config::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.boss-key-config:hover {
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.key-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.key-input-container input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.key-input-container input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.key-input-container input[readonly] {
    background: #f8fafc;
    cursor: pointer;
}

.btn-record-key {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-record-key::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-record-key:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-record-key:hover::before {
    left: 100%;
}

.btn-record-key:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.help-text {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

#bossKeyUrl, #customBossUrl {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    font-size: 14px;
    color: #374151;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
}

#bossKeyUrl:focus, #customBossUrl:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 10%, transparent), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.boss-key-preview {
    margin-top: 25px;
    padding: 18px;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    position: relative;
}

.boss-key-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 12px 12px 0 0;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.preview-info i {
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

.preview-info strong {
    color: var(--primary-color);
    font-weight: 600;
    padding: 2px 8px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
}

/* 设置操作按钮 */
.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

.settings-actions .btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.settings-actions .btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.settings-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.settings-actions .btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e5e7eb;
}

.settings-actions .btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

/* 深色主题样式 */
body.dark-theme {
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(15, 23, 42, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(30, 41, 59, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

body.dark-theme::before {
    background: 
        url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.02"><circle cx="30" cy="30" r="1"/></g></svg>') repeat;
}

body.dark-theme .sidebar {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.4);
}

body.dark-theme .sidebar-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

body.dark-theme .sidebar-header h2 {
    color: #e2e8f0;
}

/* 深色主题下的侧边栏收起按钮 */

body.dark-theme .sidebar-toggle-btn {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.5);
    color: #94a3b8;
}

body.dark-theme .sidebar-toggle-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(239, 68, 68, 0.15);
}

body.dark-theme .main-content {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.4);
}

body.dark-theme .menu-item {
    background: rgba(51, 65, 85, 0.02);
    color: #cbd5e1;
}

body.dark-theme .menu-item:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: #e2e8f0;
}

body.dark-theme .user-info {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.7) 100%);
    border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
}

body.dark-theme .username {
    color: #e2e8f0;
}

/* 聊天室深色模式样式 */
body.dark-theme .chat-container {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.3);
}

body.dark-theme .chat-messages {
    background: transparent;
}

body.dark-theme .chat-input-container {
    background: color-mix(in srgb, var(--primary-color) 8%, rgba(15, 23, 42, 0.9));
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
}

body.dark-theme .online-users {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.3);
}

body.dark-theme .online-users h3 {
    color: #e2e8f0;
    border-bottom: 2px solid rgba(51, 65, 85, 0.5);
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-theme .user-count {
    color: #e2e8f0 !important;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body.dark-theme .online-user {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
}

body.dark-theme .online-user:hover {
    background: color-mix(in srgb, var(--primary-color) 15%, rgba(51, 65, 85, 0.5));
}

body.dark-theme .online-user span {
    color: #e2e8f0;
}

body.dark-theme .message-nickname {
    color: #e2e8f0;
}

body.dark-theme .message-time {
    color: #64748b;
}

body.dark-theme .message-text {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: #e2e8f0;
}

body.dark-theme #messageInput {
    background: rgba(51, 65, 85, 0.6);
    border: 2px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    color: #e2e8f0;
}

body.dark-theme #messageInput::placeholder {
    color: #64748b;
}

body.dark-theme .image-preview {
    background: rgba(51, 65, 85, 0.8);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
}

/* 深色主题下的图片消息样式 */
body.dark-theme .message-image {
    border: 2px solid rgba(226, 232, 240, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
}

body.dark-theme .message-image:hover {
    border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 1px color-mix(in srgb, var(--primary-color) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

body.dark-theme .message.image-message .message-text {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    opacity: 1;
}

body.dark-theme .login-prompt {
    background: color-mix(in srgb, var(--primary-color) 8%, rgba(30, 41, 59, 0.8));
    border: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: #cbd5e1;
}

body.dark-theme .mute-notice {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.9) 0%, rgba(153, 27, 27, 0.9) 100%);
    color: #fca5a5;
    border: 2px solid rgba(153, 27, 27, 0.5);
}

/* 内容区域深色模式样式 */
body.dark-theme .section-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.8) 100%);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

body.dark-theme .section-header h2 {
    color: #e2e8f0;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-theme .section-header p {
    color: #94a3b8;
}

body.dark-theme .tool-item,
body.dark-theme .game-item,
body.dark-theme .resource-item {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.4);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .tool-item:hover,
body.dark-theme .game-item:hover,
body.dark-theme .resource-item:hover {
    border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    box-shadow: 
        0 32px 80px color-mix(in srgb, var(--primary-color) 20%, rgba(0, 0, 0, 0.4)),
        0 16px 40px color-mix(in srgb, var(--primary-color) 15%, rgba(0, 0, 0, 0.3)),
        0 8px 20px color-mix(in srgb, var(--primary-color) 10%, rgba(0, 0, 0, 0.2)),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark-theme .tool-item i,
body.dark-theme .game-item i,
body.dark-theme .resource-item i {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(226, 232, 240, 0.2));
}

body.dark-theme .tool-item:hover i,
body.dark-theme .game-item:hover i,
body.dark-theme .resource-item:hover i {
    filter: drop-shadow(0 8px 16px rgba(226, 232, 240, 0.3));
}

body.dark-theme .tool-item h3,
body.dark-theme .game-item h3,
body.dark-theme .resource-item h3 {
    color: #e2e8f0;
}

body.dark-theme .tool-item:hover h3,
body.dark-theme .game-item:hover h3,
body.dark-theme .resource-item:hover h3 {
    color: #f1f5f9;
}

body.dark-theme .tool-item p,
body.dark-theme .game-item p,
body.dark-theme .resource-item p {
    color: #94a3b8;
}

body.dark-theme .tool-item:hover p,
body.dark-theme .game-item:hover p,
body.dark-theme .resource-item:hover p {
    color: #cbd5e1;
}

body.dark-theme .empty-state {
    color: #64748b;
}

body.dark-theme .empty-state i {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-theme .empty-state h3 {
    color: #94a3b8;
}

/* 内容查看器深色模式样式 */
body.dark-theme .content-viewer-container {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.4);
}

body.dark-theme .content-viewer-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

body.dark-theme .btn-back {
    background: linear-gradient(135deg, 
        rgba(51, 65, 85, 0.95) 0%, 
        rgba(71, 85, 105, 0.95) 100%);
    color: #e2e8f0;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
}

body.dark-theme .btn-back:hover {
    background: linear-gradient(135deg, 
        rgba(71, 85, 105, 0.95) 0%, 
        rgba(100, 116, 139, 0.95) 100%);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.5),
        0 4px 15px color-mix(in srgb, var(--primary-color) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

body.dark-theme #contentFrame {
    background: #0f172a;
}

/* 模态框和表单深色模式样式 */
body.dark-theme .modal-content {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.4);
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .modal h2 {
    color: #e2e8f0;
}

body.dark-theme .form-group label {
    color: #e2e8f0;
}

body.dark-theme .form-group input {
    background: rgba(51, 65, 85, 0.6);
    border: 2px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    color: #e2e8f0;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .form-group input:focus {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent),
        0 8px 32px color-mix(in srgb, var(--primary-color) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark-theme .form-group input::placeholder {
    color: #64748b;
}

body.dark-theme .close {
    color: #94a3b8;
}

body.dark-theme .close:hover {
    color: var(--primary-color);
}

/* 网站设置模态框深色模式样式 */
body.dark-theme .site-settings-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

body.dark-theme .site-settings-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    border-radius: 28px;
}

body.dark-theme .site-settings-modal h2 {
    color: #e2e8f0;
}

/* 网站基本设置深色模式样式 */
body.dark-theme .site-basic-settings .setting-group label {
    color: #e2e8f0;
}

body.dark-theme .site-basic-settings input[type="text"] {
    background: rgba(51, 65, 85, 0.6);
    border: 2px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    color: #e2e8f0;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .site-basic-settings input[type="text"]:focus {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent),
        0 8px 32px color-mix(in srgb, var(--primary-color) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark-theme .site-basic-settings input[type="text"]:hover {
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
}

body.dark-theme .site-basic-settings input[type="text"]::placeholder {
    color: #64748b;
}

/* 图标上传容器深色模式样式 */
body.dark-theme .icon-preview {
    border-color: rgba(51, 65, 85, 0.6);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

body.dark-theme .icon-preview:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

body.dark-theme .icon-placeholder {
    color: #64748b;
}

body.dark-theme .icon-placeholder i {
    color: #475569;
}

body.dark-theme .icon-preview:hover .icon-placeholder {
    color: var(--primary-color);
}

body.dark-theme .icon-preview:hover .icon-placeholder i {
    color: var(--primary-color);
}

body.dark-theme .help-text {
    color: #64748b;
}

body.dark-theme .settings-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
    border: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-theme .settings-section h3 {
    color: #e2e8f0;
}

body.dark-theme .setting-group label {
    color: #e2e8f0;
}

body.dark-theme .theme-btn {
    border: 2px solid rgba(51, 65, 85, 0.5);
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
}

body.dark-theme .theme-btn:hover {
    border-color: var(--primary-color);
    background: rgba(51, 65, 85, 0.6);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

body.dark-theme .theme-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

body.dark-theme .boss-key-select {
    border: 2px solid rgba(51, 65, 85, 0.5);
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
}

body.dark-theme .boss-key-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

body.dark-theme .boss-key-select:hover {
    border-color: rgba(100, 116, 139, 0.5);
}

body.dark-theme .boss-key-title {
    color: #e2e8f0;
}

body.dark-theme .boss-key-title i {
    color: var(--primary-color);
}

body.dark-theme .boss-key-config {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 8%, rgba(30, 41, 59, 0.8)) 0%, color-mix(in srgb, var(--primary-color) 5%, rgba(51, 65, 85, 0.8)) 100%);
    border: 2px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
}

body.dark-theme .key-input-container input {
    border: 2px solid rgba(51, 65, 85, 0.5);
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
}

body.dark-theme .key-input-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent), 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .key-input-container input[readonly] {
    background: rgba(51, 65, 85, 0.6);
}

body.dark-theme .help-text {
    color: #94a3b8;
}

body.dark-theme #bossKeyUrl,
body.dark-theme #customBossUrl {
    border: 2px solid rgba(51, 65, 85, 0.5);
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
}

body.dark-theme #bossKeyUrl:focus,
body.dark-theme #customBossUrl:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent), 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .boss-key-preview {
    background: color-mix(in srgb, var(--primary-color) 8%, rgba(30, 41, 59, 0.8));
    border: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
}

body.dark-theme .preview-info {
    color: #e2e8f0;
}

body.dark-theme .preview-info strong {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 15%, rgba(30, 41, 59, 0.8));
}

body.dark-theme .settings-actions {
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

/* 深色主题下的按钮样式 */
body.dark-theme .settings-actions .btn {
    color: #e2e8f0;
}

body.dark-theme .settings-actions .btn-primary {
    background: var(--primary-gradient);
    border: 2px solid var(--primary-color);
    color: white;
}

body.dark-theme .settings-actions .btn-secondary {
    background: rgba(51, 65, 85, 0.8);
    border: 2px solid rgba(100, 116, 139, 0.5);
    color: #e2e8f0;
}

body.dark-theme .settings-actions .btn-secondary:hover {
    background: rgba(71, 85, 105, 0.8);
    border-color: rgba(148, 163, 184, 0.5);
}

/* 深色主题下的小提示文字 */
body.dark-theme .help-text,
body.dark-theme small.help-text {
    color: #94a3b8;
}

/* 深色主题下的按钮记录键样式 */
body.dark-theme .btn-record-key {
    background: var(--primary-gradient);
    border: 2px solid var(--primary-color);
    color: white;
}

body.dark-theme .btn-record-key:hover {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--primary-color) 80%, white) 0%, 
        color-mix(in srgb, var(--primary-color) 80%, white) 100%);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

/* 深色主题下的键输入容器样式 */
body.dark-theme .key-input-container {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(51, 65, 85, 0.5);
}

body.dark-theme .key-input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

/* 深色主题下的老板键配置区域 */
body.dark-theme .boss-key-config {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--primary-color) 8%, rgba(30, 41, 59, 0.8)) 0%, 
        color-mix(in srgb, var(--primary-color) 5%, rgba(51, 65, 85, 0.8)) 100%);
    border: 2px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

/* 深色主题下的主题设置区域 */
body.dark-theme .theme-settings .setting-group label {
    color: #e2e8f0;
}

/* 深色主题下的老板键设置区域 */
body.dark-theme .boss-key-settings .setting-group label {
    color: #e2e8f0;
}

/* 深色主题下的预览信息样式 */
body.dark-theme .preview-info span {
    color: #e2e8f0;
}

/* 主题色变量 */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-bg: rgba(255, 255, 255, 0.98);
    --main-bg: rgba(255, 255, 255, 0.98);
    --text-color: #2d3748;
    --border-color: rgba(255, 255, 255, 0.4);
}

body.theme-blue {
    --primary-color: #4facfe;
    --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body.theme-green {
    --primary-color: #43e97b;
    --primary-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

body.theme-purple {
    --primary-color: #fa709a;
    --primary-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

body.theme-orange {
    --primary-color: #ff9a9e;
    --primary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

body.theme-red {
    --primary-color: #ff6b6b;
    --primary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
}

/* 响应式设计 - 侧边栏滚动优化 */
@media (max-height: 800px) {
    .sidebar {
        height: 100vh;
        max-height: 100vh;
    }
    
    .sidebar-header {
        padding: 20px 28px;
        flex-shrink: 0;
    }
    
    .sidebar-header h2 {
        font-size: 1.4rem;
    }
    
    .sidebar-menu {
        padding: 15px 0;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .menu-item {
        padding: 14px 28px;
        margin: 4px 18px;
    }
    
    .sidebar-footer {
        padding: 20px;
        flex-shrink: 0;
    }
    
    .user-info {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .btn {
        padding: 14px 24px;
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
}

@media (max-height: 600px) {
    .sidebar-header {
        padding: 15px 28px;
    }
    
    .sidebar-header h2 {
        font-size: 1.2rem;
    }
    
    .sidebar-menu {
        padding: 10px 0;
    }
    
    .menu-item {
        padding: 12px 28px;
        margin: 3px 18px;
    }
    
    .menu-item-content i {
        font-size: 1.2rem;
        margin-right: 12px;
    }
    
    .menu-item-content span {
        font-size: 0.9rem;
    }
    
    .sidebar-footer {
        padding: 15px;
    }
    
    .user-info {
        margin-bottom: 12px;
        padding: 10px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .username {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 12px 20px;
        margin-bottom: 8px;
        font-size: 0.85rem;
    }
    
    .btn i {
        margin-right: 10px;
        font-size: 1.1rem;
    }
}

/* 超小屏幕优化 */
@media (max-height: 480px) {
    .sidebar-header {
        padding: 12px 20px;
    }
    
    .sidebar-header h2 {
        font-size: 1.1rem;
    }
    
    .sidebar-menu {
        padding: 8px 0;
    }
    
    .menu-item {
        padding: 10px 20px;
        margin: 2px 15px;
    }
    
    .sidebar-footer {
        padding: 12px;
    }
    
    .user-info {
        margin-bottom: 10px;
        padding: 8px;
    }
    
    .btn {
        padding: 10px 16px;
        margin-bottom: 6px;
        font-size: 0.8rem;
    }
}

/* 宽屏幕优化 */
@media (min-width: 1400px) {
    .sidebar {
        width: 320px;
    }
    
    .sidebar-menu {
        padding: 25px 0;
    }
    
    .menu-item {
        padding: 20px 30px;
        margin: 8px 20px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .sidebar-menu::-webkit-scrollbar {
        width: 8px;
    }
    
    .sidebar-menu::-webkit-scrollbar-thumb {
        background: rgba(74, 85, 104, 0.4);
    }
    
    .menu-item {
        padding: 16px 28px;
    }
    
    .btn {
        padding: 16px 28px;
    }
}

/* ==================== 消息引用功能样式 ==================== */

/* 引用按钮样式 */
.quote-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s ease;
    margin-left: 8px;
}

/* 置顶按钮样式 */
.pin-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7; /* 改为0.7，使按钮更容易看到 */
    transition: all 0.2s ease;
    margin-left: 8px;
}

/* 撤回按钮样式 */
.recall-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.message:hover .quote-btn,
.message:hover .pin-btn,
.message:hover .recall-btn {
    opacity: 1;
}

.quote-btn:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
    opacity: 1;
}

.pin-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    transform: scale(1.1);
    opacity: 1;
}

.recall-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
    opacity: 1;
}

.pin-btn .pinned {
    color: #f59e0b;
    animation: pinPulse 2s infinite;
    opacity: 1; /* 置顶状态下始终可见 */
}

/* 引用消息显示样式 */
.quoted-message {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.08) 0%, 
        rgba(118, 75, 162, 0.08) 100%);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.quoted-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.03) 0%, 
        rgba(118, 75, 162, 0.03) 100%);
    pointer-events: none;
}

.quoted-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.quoted-header i {
    margin-right: 6px;
    font-size: 0.75rem;
}

.quoted-nickname {
    font-weight: 600;
}

.quoted-content {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* 引用预览样式（输入框上方） */
.quote-preview {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
    margin-bottom: 0;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 -4px 20px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quote-preview-content {
    position: relative;
}

.quote-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.quote-preview-header i {
    margin-right: 6px;
    font-size: 0.8rem;
}

.quote-cancel-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quote-cancel-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.quote-preview-text {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
    font-style: italic;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 撤回消息样式 ==================== */

/* 撤回消息容器 */
.message.recalled-message {
    background: linear-gradient(135deg, 
        rgba(156, 163, 175, 0.08) 0%, 
        rgba(107, 114, 128, 0.08) 100%);
    border: 1px solid rgba(156, 163, 175, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    opacity: 0.7;
    position: relative;
}

.message.recalled-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(156, 163, 175, 0.03) 0%, 
        rgba(107, 114, 128, 0.03) 100%);
    pointer-events: none;
}

/* 撤回消息内容 */
.recalled-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    color: #9ca3af;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.recalled-content i {
    color: #ef4444;
    font-size: 0.8rem;
}

/* 深色主题下的撤回消息样式 */
body.dark-theme .message.recalled-message {
    background: linear-gradient(135deg, 
        rgba(75, 85, 99, 0.12) 0%, 
        rgba(55, 65, 81, 0.12) 100%);
    border-color: rgba(75, 85, 99, 0.3);
}

body.dark-theme .message.recalled-message::before {
    background: linear-gradient(135deg, 
        rgba(75, 85, 99, 0.05) 0%, 
        rgba(55, 65, 81, 0.05) 100%);
}

body.dark-theme .recalled-content {
    color: #6b7280;
}

body.dark-theme .recalled-content i {
    color: #ef4444;
}

/* 深色主题下的撤回按钮样式 */
body.dark-theme .recall-btn {
    color: #64748b;
    opacity: 0.4;
}

body.dark-theme .recall-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    opacity: 1;
}

/* 深色主题下的引用样式 */
body.dark-theme .quote-btn {
    color: #64748b;
    opacity: 0.4;
}

body.dark-theme .quote-btn:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.15);
    opacity: 1;
}

/* 深色主题下的置顶按钮样式 */
body.dark-theme .pin-btn {
    color: #64748b;
    opacity: 0.4;
}

body.dark-theme .pin-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    opacity: 1;
}

body.dark-theme .pin-btn .pinned {
    color: #f59e0b;
}

body.dark-theme .quoted-message {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.12) 0%, 
        rgba(118, 75, 162, 0.12) 100%);
    border-left-color: var(--primary-color);
}

body.dark-theme .quoted-message::before {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.05) 0%, 
        rgba(118, 75, 162, 0.05) 100%);
}

body.dark-theme .quoted-header {
    color: var(--primary-color);
}

body.dark-theme .quoted-content {
    color: #94a3b8;
}

body.dark-theme .quote-preview {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 
        0 -4px 20px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .quote-preview-header {
    color: var(--primary-color);
}

body.dark-theme .quote-preview-text {
    color: #94a3b8;
}

body.dark-theme .quote-cancel-btn {
    color: #64748b;
}

body.dark-theme .quote-cancel-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* 引用消息动画效果 */
.quoted-message {
    animation: slideInQuote 0.3s ease-out;
}

.quote-preview {
    animation: slideDownPreview 0.3s ease-out;
}

@keyframes slideInQuote {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDownPreview {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quote-btn {
        font-size: 0.75rem;
        padding: 3px 5px;
    }
    
    .quoted-message {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .quoted-header {
        font-size: 0.8rem;
    }
    
    .quoted-content {
        font-size: 0.85rem;
    }
    
    .quote-preview {
        padding: 10px 12px;
    }
    
    .quote-preview-header {
        font-size: 0.8rem;
    }
    
    .quote-preview-text {
        font-size: 0.85rem;
    }
}

/* 自定义确认对话框样式 */
.custom-confirm {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-confirm.show {
    opacity: 1;
    visibility: visible;
}

.custom-confirm-dialog {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 20px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 32px;
    min-width: 400px;
    max-width: 500px;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-confirm.show .custom-confirm-dialog {
    transform: scale(1) translateY(0);
}

.custom-confirm-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

.custom-confirm-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.custom-confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 16px rgba(251, 191, 36, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.custom-confirm-icon i {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-confirm-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.custom-confirm-message {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 32px;
}

.custom-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.custom-confirm-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 8px 16px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.custom-confirm-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 24px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.custom-confirm-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.custom-confirm-btn.secondary:hover {
    background: rgba(248, 250, 252, 0.95);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 深色主题下的确认对话框样式 */
body.dark-theme .custom-confirm-dialog {
    background: rgba(51, 65, 85, 0.98);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-theme .custom-confirm-dialog::before {
    background: linear-gradient(135deg, 
        rgba(71, 85, 105, 0.1) 0%, 
        rgba(51, 65, 85, 0.05) 50%, 
        rgba(71, 85, 105, 0.1) 100%);
}

body.dark-theme .custom-confirm-header {
    border-bottom-color: rgba(71, 85, 105, 0.5);
}

body.dark-theme .custom-confirm-title {
    color: #e2e8f0;
}

body.dark-theme .custom-confirm-message {
    color: #cbd5e1;
}

body.dark-theme .custom-confirm-btn.secondary {
    background: rgba(71, 85, 105, 0.9);
    color: #cbd5e1;
    border-color: rgba(100, 116, 139, 0.5);
}

body.dark-theme .custom-confirm-btn.secondary:hover {
    background: rgba(100, 116, 139, 0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .custom-confirm-dialog {
        min-width: 320px;
        max-width: calc(100vw - 40px);
        padding: 24px;
    }
    
    .custom-confirm-title {
        font-size: 1.2rem;
    }
    
    .custom-confirm-message {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .custom-confirm-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .custom-confirm-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* ==================== Toast 提示框样式 ==================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    box-shadow: 
        0 16px 32px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #374151;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #6b7280;
    background: rgba(0, 0, 0, 0.05);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 0 0 12px 12px;
    transition: width linear;
}

/* Toast 类型样式 */
.toast.success {
    border-left: 4px solid #10b981;
}

.toast.success .toast-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.toast.success .toast-progress {
    background: linear-gradient(90deg, #10b981, #059669);
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.error .toast-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.toast.error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast.warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.toast.warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast.info .toast-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.toast.info .toast-progress {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.toast.loading {
    border-left: 4px solid #6b7280;
}

.toast.loading .toast-icon {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.toast.loading .toast-progress {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* ==================== 侧边栏图标栏样式 ==================== */

.sidebar-icon-bar {
    width: 70px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: fit-content;
    max-height: calc(100vh - 40px);
}

.sidebar-icon-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

.icon-bar-header {
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

.icon-bar-expand-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 80%, #000));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-size: 1.2rem;
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 40%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin: 0 auto;
}

.icon-bar-expand-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 12px 40px color-mix(in srgb, var(--primary-color) 50%, transparent),
        0 6px 20px color-mix(in srgb, var(--primary-color) 40%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.icon-bar-expand-btn:active {
    transform: scale(0.95);
}

.icon-bar-menu {
    flex: 1;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.icon-bar-menu::-webkit-scrollbar {
    width: 4px;
}

.icon-bar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.icon-bar-menu::-webkit-scrollbar-thumb {
    background: rgba(74, 85, 104, 0.3);
    border-radius: 2px;
}

.icon-bar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 85, 104, 0.5);
}

.icon-bar-item {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #4a5568;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.icon-bar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        color-mix(in srgb, var(--primary-color) 20%, transparent), 
        transparent);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-bar-item:hover::before {
    left: 100%;
}

.icon-bar-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    color: #2d3748;
    border-color: color-mix(in srgb, var(--primary-color) 20%, transparent);
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 20%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.icon-bar-item.active {
    background: var(--primary-gradient);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 40%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.icon-bar-item.active::before {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
}

.icon-bar-footer {
    padding: 15px 0 20px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.3);
    text-align: center;
}

.icon-bar-user {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.icon-bar-user:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 30%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.icon-bar-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-bar-login {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #4a5568;
    font-size: 1.1rem;
    margin: 0 auto;
}

.icon-bar-login:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    color: #2d3748;
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    box-shadow: 
        0 8px 32px color-mix(in srgb, var(--primary-color) 20%, transparent),
        0 4px 16px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

/* 深色主题下的图标栏样式 */
body.dark-theme .sidebar-icon-bar {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(71, 85, 105, 0.4);
}

body.dark-theme .icon-bar-header {
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

body.dark-theme .icon-bar-item {
    background: rgba(71, 85, 105, 0.1);
    color: #cbd5e1;
}

body.dark-theme .icon-bar-item:hover {
    background: rgba(71, 85, 105, 0.2);
    color: #f1f5f9;
}

body.dark-theme .icon-bar-footer {
    border-top-color: rgba(71, 85, 105, 0.3);
}

body.dark-theme .icon-bar-login {
    background: rgba(71, 85, 105, 0.1);
    border-color: rgba(71, 85, 105, 0.2);
    color: #cbd5e1;
}

body.dark-theme .icon-bar-login:hover {
    background: rgba(71, 85, 105, 0.2);
    color: #f1f5f9;
}

/* 响应式设计 - 图标栏 */
@media (max-width: 768px) {
    .sidebar-icon-bar {
        width: 60px;
    }
    
    .icon-bar-expand-btn,
    .icon-bar-item,
    .icon-bar-user,
    .icon-bar-login {
        width: 40px;
        height: 40px;
    }
    
    .icon-bar-expand-btn {
        font-size: 1rem;
    }
    
    .icon-bar-item {
        font-size: 1rem;
    }
    
    .icon-bar-login {
        font-size: 0.9rem;
    }
}