:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252540;
    --bg-input: #151528;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0c0;
    --text-muted: #6a6a8a;
    --accent: #7c73ff;
    --accent-hover: #6a62e0;
    --accent-light: rgba(124, 115, 255, 0.12);
    --accent-glow: rgba(124, 115, 255, 0.4);
    --success: #4ade80;
    --error: #f87171;
    --warning: #fb923c;
    --border: #2a2a4a;
    --border-light: #353555;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(124, 115, 255, 0.2);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --click-scale: 0.95;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #121228 50%, var(--bg-primary) 100%);
}

#app {
    display: flex;
    height: 100vh;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-2px); }
    75% { transform: translateY(2px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 115, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(124, 115, 255, 0.5); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 115, 255, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(124, 115, 255, 0); }
}

/* ========== 点击质感效果 ========== */
.clickable {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.clickable:active {
    transform: scale(var(--click-scale));
    transition: transform var(--transition-fast);
}

.press-effect {
    position: relative;
    overflow: hidden;
}

.press-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.press-effect:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
}

/* ========== 滑动质感效果 ========== */
.slideable {
    cursor: grab;
    transition: transform var(--transition);
}

.slideable:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.swipe-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    transition: all var(--transition);
}

.swipe-indicator.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* ========== 拖动效果 ========== */
.draggable {
    cursor: grab;
    transition: box-shadow var(--transition), transform var(--transition);
}

.draggable:active {
    cursor: grabbing;
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
}

/* ========== 滚动质感 ========== */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.smooth-scroll::-webkit-scrollbar-track {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.smooth-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 3px;
    transition: transform var(--transition-fast);
}

.smooth-scroll::-webkit-scrollbar-thumb:hover {
    transform: scaleX(1.1);
}

/* ========== 悬停光效 ========== */
.glow-hover {
    position: relative;
}

.glow-hover::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--accent), transparent, var(--accent));
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
}

.glow-hover:hover::before {
    opacity: 0.5;
    animation: borderGlow 2s ease-in-out infinite;
}

/* ========== 微动效卡片 ========== */
.card-hover {
    position: relative;
    transition: all var(--transition);
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 115, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-hover:hover::before {
    opacity: 1;
}

/* ========== 选中高亮效果 ========== */
.selectable {
    transition: all var(--transition);
}

.selectable:hover {
    background: var(--accent-light);
}

.selectable.selected {
    background: var(--accent-light);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(124, 115, 255, 0.2);
}

/* ========== 输入框聚焦效果 ========== */
.input-focus {
    transition: all var(--transition);
}

.input-focus:focus {
    border-color: var(--accent);
    box-shadow: 
        0 0 0 3px var(--accent-light),
        0 0 30px rgba(124, 115, 255, 0.15),
        inset 0 0 20px rgba(124, 115, 255, 0.05);
}

/* ========== 按钮点击效果 ========== */
.btn-click {
    position: relative;
    transition: all var(--transition);
    transform-style: preserve-3d;
}

.btn-click::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.1), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-click:hover::before {
    opacity: 1;
}

.btn-click:active {
    transform: scale(var(--click-scale)) translateY(2px);
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ========== 卡片翻转动画 ========== */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s var(--transition-bounce);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: inherit;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* ========== 数字跳动效果 ========== */
.counter-animate {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.counter-animate.updating {
    animation: bounce 0.3s ease;
}

/* ========== 波纹扩散效果 ========== */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ========== 玻璃态效果 ========== */
.glass {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.sidebar-header h1 span {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background var(--transition);
}

.sidebar-user:hover {
    background: var(--accent-light);
}

.sidebar-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--accent), #5a52e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.3);
    transition: transform var(--transition);
}

.sidebar-user:hover .avatar {
    transform: scale(1.05);
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-user .btn-logout {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: all var(--transition);
}

.sidebar-user .btn-logout:hover {
    background: rgba(248, 113, 113, 0.2);
    color: var(--error);
    border-color: var(--error);
    transform: scale(1.1);
}

.room-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.room-list-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 12px 10px 14px;
    font-weight: 600;
}

.room-item {
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.room-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition);
}

.room-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.room-item.active {
    background: var(--accent-light);
    color: var(--accent);
}

.room-item.active::before {
    transform: scaleY(1);
}

.room-item.active .room-icon {
    color: var(--accent);
}

.room-item .room-icon {
    font-size: 17px;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
    transition: color var(--transition);
}

.room-item .room-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-item .room-badge {
    font-size: 11px;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition);
}

.room-item.active .room-badge {
    background: var(--accent);
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.btn-new-room {
    width: 100%;
    padding: 13px;
    background: linear-gradient(145deg, var(--accent), #5a52e0);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.3);
}

.btn-new-room:hover {
    background: linear-gradient(145deg, var(--accent-hover), #4a42c1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 115, 255, 0.4);
}

.btn-new-room:active {
    transform: translateY(0);
}

/* ========== 主聊天区 ========== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, transparent 100%);
    backdrop-filter: blur(20px);
}

.chat-header .room-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .room-title::before {
    content: '#';
    color: var(--accent);
    font-size: 20px;
}

.chat-header .room-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-left: 24px;
}

.chat-header .member-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 6px 14px;
    border-radius: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header .member-count::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.chat-header .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.message-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column-reverse;
}

.message-group {
    margin-bottom: 24px;
    animation: slideUp 0.3s ease-out;
}

.message-group.other {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.message-group.self {
    display: flex;
    flex-direction: row-reverse;
    gap: 14px;
    align-items: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.message-body {
    max-width: 60%;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.message-group.self .message-meta {
    flex-direction: row-reverse;
}

.message-sender {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.message-group.self .message-sender {
    color: var(--text-primary);
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
}

.message-content {
    padding: 14px 18px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
    transition: all var(--transition);
    position: relative;
}

.message-group.other .message-content {
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border);
    border-top-left-radius: 4px;
}

.message-group.self .message-content {
    background: linear-gradient(145deg, var(--accent) 0%, #5a52e0 100%);
    border-top-right-radius: 4px;
    color: white;
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.3);
}

.message-content:hover {
    transform: scale(1.01);
}

.message-content.code-block {
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 13px;
    background: #0a0a15 !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.message-reply {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(124, 115, 255, 0.1);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    margin-bottom: 8px;
    font-size: 13px;
}

.reply-arrow {
    color: var(--accent);
    font-size: 12px;
}

.reply-sender {
    font-weight: 600;
    color: var(--accent);
}

.reply-content {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    opacity: 0.7;
    transition: all var(--transition);
}

.message-group:hover .message-actions {
    opacity: 1;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.action-btn:active {
    transform: scale(0.95);
}

/* ========== 输入区 ========== */
.input-area {
    padding: 18px 28px;
    border-top: 1px solid var(--border);
    background: linear-gradient(0deg, rgba(26, 26, 46, 0.98) 0%, transparent 100%);
    backdrop-filter: blur(20px);
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

.input-area textarea {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    resize: none;
    min-height: 50px;
    max-height: 180px;
    outline: none;
    transition: all var(--transition);
    line-height: 1.5;
}

.input-area textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light), 0 0 20px rgba(124, 115, 255, 0.2);
}

.input-area textarea::placeholder {
    color: var(--text-muted);
}

.btn-send {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, var(--accent), #5a52e0);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.4);
    color: white;
}

.btn-send:hover {
    background: linear-gradient(145deg, var(--accent-hover), #4a42c1);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(124, 115, 255, 0.5);
}

.btn-send:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-send:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========== 打字指示器 ========== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    border-top-left-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ========== 右侧成员面板 ========== */
.member-panel {
    width: 240px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.member-panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.member-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.member-item {
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition);
}

.member-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.member-item .member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.member-item .member-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-item .online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--success);
}

/* ========== 登录/注册遮罩 ========== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.auth-box {
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px;
    width: 420px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.auth-box h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-box .auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.auth-box .form-group {
    margin-bottom: 18px;
}

.auth-box label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-box input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all var(--transition);
}

.auth-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.auth-box .btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(145deg, var(--accent), #5a52e0);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 12px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.3);
}

.auth-box .btn-auth:hover {
    background: linear-gradient(145deg, var(--accent-hover), #4a42c1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 115, 255, 0.4);
}

.auth-box .auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-box .auth-switch a {
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.auth-box .auth-switch a:hover {
    color: #a78bfa;
    text-decoration: underline;
}

.auth-box .auth-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    color: var(--error);
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    animation: slideUp 0.3s ease-out;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

.modal-box {
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(26, 26, 46, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.modal-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal-box .form-group {
    margin-bottom: 16px;
}

.modal-box label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-box input, .modal-box textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all var(--transition);
}

.modal-box input:focus, .modal-box textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.modal-box .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(145deg, var(--accent), #5a52e0);
    color: white;
    box-shadow: 0 2px 10px rgba(124, 115, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(145deg, var(--accent-hover), #4a42c1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.4);
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* ========== 搜索 ========== */
.search-bar {
    padding: 12px 16px;
}

.search-bar input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a6a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
    transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== 空状态 ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 60px;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
    animation: pulse 3s ease-in-out infinite;
}

.empty-state p {
    font-size: 15px;
    line-height: 1.6;
}

/* ========== 通知提示 ========== */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    animation: slideUp 0.3s ease-out;
    box-shadow: var(--shadow);
}

.notification.success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}

.notification.error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--error);
}

.notification.info {
    background: rgba(124, 115, 255, 0.15);
    border: 1px solid rgba(124, 115, 255, 0.3);
    color: var(--accent);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .member-panel {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-header h1, .sidebar-user .user-info,
    .room-item .room-name, .room-item .room-badge,
    .sidebar-footer .btn-new-room span {
        display: none;
    }
    .sidebar-header {
        padding: 16px;
        text-align: center;
    }
    .sidebar-user {
        padding: 14px;
        justify-content: center;
    }
    .member-panel {
        display: none;
    }
    .message-body {
        max-width: 85%;
    }
    .chat-header {
        padding: 16px;
    }
    .message-area {
        padding: 16px;
    }
    .input-area {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .auth-box {
        width: 90%;
        padding: 32px 24px;
    }
    .modal-box {
        width: 90%;
    }
}

/* ========== 语言菜单 ========== */
.language-menu {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.lang-btn:hover {
    background: var(--bg-input);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.lang-icon {
    font-size: 16px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 140px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
    overflow: hidden;
    transform-origin: top right;
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lang-dropdown.visible {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.lang-option {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInOption 0.2s ease-out forwards;
}

.lang-option:nth-child(1) { animation-delay: 0.05s; }
.lang-option:nth-child(2) { animation-delay: 0.1s; }
.lang-option:nth-child(3) { animation-delay: 0.15s; }
.lang-option:nth-child(4) { animation-delay: 0.2s; }

@keyframes slideInOption {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding-left: 20px;
}

.lang-option.active {
    background: var(--accent-light);
    color: var(--accent);
}

/* ========== 状态指示器 ========== */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.away {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
}

.status-dot.offline {
    background: var(--text-muted);
}

/* ========== 代码查看器面板 ========== */
.coder-panel {
    width: 300px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    animation: slideLeft 0.3s ease-out;
}

.coder-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coder-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.btn-coder-close {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-coder-close:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

.coder-toolbar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.btn-coder-upload {
    width: 100%;
    padding: 12px;
    background: linear-gradient(145deg, var(--accent), #5a52e0);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(124, 115, 255, 0.3);
}

.btn-coder-upload:hover {
    background: linear-gradient(145deg, var(--accent-hover), #4a42c1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 115, 255, 0.4);
}

.coder-file-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.coder-file-item {
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.coder-file-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.coder-file-item .file-icon {
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.coder-file-item:hover .file-icon {
    background: var(--accent-light);
}

.coder-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.coder-file-item .file-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.coder-file-item .file-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    gap: 8px;
}

.coder-file-item .file-lang-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
}

.coder-file-item .btn-file-delete {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition);
    flex-shrink: 0;
}

.coder-file-item:hover .btn-file-delete {
    opacity: 1;
}

.coder-file-item .btn-file-delete:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

/* ========== 代码查看器模态框 ========== */
.coder-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease-out;
}

.coder-viewer-box {
    background: #0a0a15;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 85vw;
    max-width: 1000px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.coder-viewer-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.coder-viewer-filename {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.coder-viewer-filename::before {
    content: '📄';
    font-size: 16px;
}

.coder-viewer-info {
    display: flex;
    gap: 12px;
    flex: 1;
}

.coder-viewer-lang,
.coder-viewer-size,
.coder-viewer-author {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 500;
}

.coder-viewer-lang {
    background: var(--accent-light);
    color: var(--accent);
    text-transform: uppercase;
}

.btn-coder-viewer-close {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.btn-coder-viewer-close:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

.btn-coder-download {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    transition: all var(--transition);
    font-weight: 500;
}

.btn-coder-download::before {
    content: '⬇';
    font-size: 12px;
}

.btn-coder-download:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(124, 115, 255, 0.1);
}

.coder-viewer-content {
    flex: 1;
    overflow: auto;
    padding: 0;
    background: #0d1117;
}

.coder-viewer-content pre {
    margin: 0;
    padding: 0;
    font-family: Consolas, 'Courier New', 'Source Code Pro', 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #d4d4d4;
    min-height: 100%;
    tab-size: 4;
}

.coder-viewer-content pre code {
    display: block;
    white-space: pre;
    padding: 0;
}

/* 行号列表 */
.coder-viewer-content .code-line {
    display: flex;
    min-height: 1.6em;
}

.coder-viewer-content .code-line:hover {
    background: rgba(255, 255, 255, 0.03);
}

.coder-viewer-content .line-number {
    display: inline-block;
    width: 50px;
    min-width: 50px;
    padding: 0 14px 0 8px;
    text-align: right;
    color: #484f58;
    user-select: none;
    flex-shrink: 0;
    font-size: 13px;
    line-height: 1.6;
}

.coder-viewer-content .line-content {
    padding: 0 16px 0 0;
    white-space: pre;
    flex: 1;
    overflow-x: auto;
}

/* ========== 语法高亮 - VS Code Dark ========== */
.hljs-keyword { color: #569cd6; font-weight: 600; }
.hljs-string { color: #ce9178; }
.hljs-comment { color: #6a9955; font-style: italic; }

/* ========== 设置按钮 ========== */
.btn-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-settings:hover {
    background: var(--bg-input);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.settings-icon {
    font-size: 16px;
}

/* ========== 设置面板 ========== */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

.settings-panel {
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(26, 26, 46, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.settings-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-settings-close {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-settings-close:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 16px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.settings-select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-width: 120px;
    transition: all var(--transition);
}

.settings-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ========== 切换开关 ========== */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 28px;
    transition: all var(--transition);
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
}

.settings-toggle input:checked + .toggle-slider {
    background: var(--accent-light);
    border-color: var(--accent);
}

.settings-toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: var(--accent);
}

.settings-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ========== 浅色主题 ========== */
.theme-light {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ed;
    --bg-input: #f0f0f5;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --accent: #007aff;
    --accent-hover: #0056b3;
    --accent-light: rgba(0, 122, 255, 0.1);
    --accent-glow: rgba(0, 122, 255, 0.3);
    --border: #d2d2d7;
    --border-light: #e5e5ea;
}

/* ========== 字体大小 ========== */
.font-size-small .message-content {
    font-size: 13px;
}

.font-size-medium .message-content {
    font-size: 15px;
}

.font-size-large .message-content {
    font-size: 17px;
}

/* ========== 隐藏时间戳 ========== */
.hide-timestamps .message-time {
    display: none;
}
.hljs-number { color: #b5cea8; }
.hljs-function { color: #dcdcaa; }
.hljs-type { color: #4ec9b0; }
.hljs-class { color: #4ec9b0; }
.hljs-operator { color: #d4d4d4; }
.hljs-punctuation { color: #d4d4d4; }
.hljs-variable { color: #9cdcfe; }
.hljs-params { color: #9cdcfe; }
.hljs-meta { color: #569cd6; }
.hljs-builtin { color: #dcdcaa; }
.hljs-regex { color: #d16969; }
.hljs-selector { color: #d7ba7d; }
.hljs-attr { color: #9cdcfe; }
.hljs-tag { color: #569cd6; }
.hljs-name { color: #569cd6; }
.hljs-attr-value { color: #ce9178; }
.hljs-decorator { color: #dcdcaa; }
.hljs-property { color: #9cdcfe; }
.hljs-literal { color: #569cd6; }
.hljs-symbol { color: #4ec9b0; }
.hljs-template-string { color: #ce9178; }
.hljs-section { color: #dcdcaa; font-weight: 600; }
.hljs-title { color: #dcdcaa; }
.hljs-preprocessor { color: #808080; }
.hljs-doctype { color: #808080; }

/* ========== 侧边栏 coder 按钮 ========== */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-coder-toggle {
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-weight: 700;
    font-size: 14px;
}

.btn-coder-toggle:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(124, 115, 255, 0.4);
}

.btn-coder-toggle.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(124, 115, 255, 0.5);
}

.coder-icon {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1;
}

/* ========== 响应式 coder 面板 ========== */
@media (max-width: 768px) {
    .coder-panel {
        width: 100%;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
    }
    .coder-viewer-box {
        width: 95vw;
        height: 90vh;
    }
}