/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00f3ff;
    --primary-glow: rgba(0, 243, 255, 0.6);
    --secondary: #9d4edd;
    --accent: #ff006e;
    --warning: #ffbe0b;
    --success: #00ff88;
    --error: #ff3864;
    --background: #0a0a0f;
    --surface: #13131f;
    --surface-light: #1e1e2f;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c8;
    --text-muted: #6c6c8a;
    --cyber-border: #00f3ff;
    --cyber-glow: rgba(0, 243, 255, 0.4);
    --quantum-blue: #00f3ff;
    --quantum-purple: #9d4edd;
    --quantum-pink: #ff006e;
    --quantum-green: #00ff88;
    --message-sent: #00ff88;
    --message-received: #00a8ff;
}

body {
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 科技背景效果 */
.cyber-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0.1;
    filter: blur(40px);
    animation: float 15s infinite ease-in-out;
}

.shape-1 { width: 300px; height: 300px; top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; top: 60%; left: 80%; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; top: 80%; left: 20%; animation-delay: -10s; }
.shape-4 { width: 150px; height: 150px; top: 30%; left: 70%; animation-delay: -7s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(100px, 50px) rotate(90deg); }
    50% { transform: translate(50px, 100px) rotate(180deg); }
    75% { transform: translate(-50px, 50px) rotate(270deg); }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle 15s infinite linear;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(100px, 100px) rotate(360deg);
        opacity: 0;
    }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scan 3s linear infinite;
    box-shadow: 0 0 10px var(--primary-glow);
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* 加载屏幕 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.cyber-loader {
    text-align: center;
}

.loader-circle {
    width: 100px;
    height: 100px;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

.loader-inner {
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.loader-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    animation: progress 2s ease-in-out infinite;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: var(--primary);
    filter: blur(5px);
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 60%; }
    100% { width: 100%; }
}

.loader-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat {
    display: flex;
    justify-content: space-between;
}

.stat-value {
    color: var(--primary);
}

/* 黑客终端效果 */
.hacker-terminal {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--primary);
    height: 80px;
    overflow: hidden;
    position: relative;
}

.terminal-line {
    margin-bottom: 5px;
    opacity: 0;
    animation: terminalTyping 0.5s forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.5s; }
.terminal-line:nth-child(2) { animation-delay: 1s; }
.terminal-line:nth-child(3) { animation-delay: 1.5s; }
.terminal-line:nth-child(4) { animation-delay: 2s; }

@keyframes terminalTyping {
    to {
        opacity: 1;
    }
}

/* 容器样式 */
.container {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
}

.hidden {
    display: none !important;
}

/* 认证页面样式 */
#auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.auth-card {
    background: rgba(19, 19, 31, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    width: 450px;
    position: relative;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 
        0 0 50px rgba(0, 243, 255, 0.1),
        inset 0 0 50px rgba(0, 243, 255, 0.05);
}

.cyber-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    z-index: -1;
    opacity: 0.5;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.logo-icon i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    position: relative;
    z-index: 2;
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.1;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    margin-bottom: 5px;
    text-shadow: 0 0 20px var(--primary-glow);
}

.tagline {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 1px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.cyber-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.cyber-tab.active {
    color: var(--primary);
}

.tab-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.cyber-tab.active .tab-glow {
    transform: scaleX(1);
    box-shadow: 0 0 10px var(--primary-glow);
}

.tab-badge {
    background: var(--accent);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
    transition: color 0.3s;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 
        0 0 0 2px rgba(0, 243, 255, 0.2),
        inset 0 0 20px rgba(0, 243, 255, 0.05);
}

.input-group input:focus + i {
    color: var(--primary);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    border-radius: 10px;
}

.input-group input:focus ~ .input-scan {
    opacity: 1;
    animation: scanInput 2s infinite;
}

@keyframes scanInput {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.generated-id-display {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.generated-id-display i {
    color: var(--primary);
}

#generated-numeric-id {
    color: var(--primary);
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
}

.cyber-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    color: var(--background);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 1px;
}

.btn-glow {
    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.5s;
}

.cyber-btn:hover .btn-glow {
    left: 100%;
}

.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 5px 20px rgba(0, 243, 255, 0.4),
        0 0 30px rgba(157, 78, 221, 0.3);
}

.cyber-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.cyber-btn:disabled:hover {
    box-shadow: none !important;
}

.cyber-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
}

.cyber-message.error {
    background: rgba(255, 56, 100, 0.1);
    border-color: rgba(255, 56, 100, 0.3);
    color: var(--error);
}

.cyber-message.success {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--success);
}

.system-status {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-indicator.secure {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.status-indicator.sync {
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* 聊天界面样式 */
#chat-container {
    display: flex;
    height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 350px;
    background: rgba(19, 19, 31, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
}

.cyber-sidebar-border {
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-container {
    position: relative;
}

#user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--surface);
    box-shadow: 0 0 10px var(--success);
    z-index: 2;
}

.status-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid var(--success);
    border-radius: 50%;
    animation: statusRing 2s linear infinite;
}

@keyframes statusRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    font-size: 16px;
}

.user-numeric-id {
    font-size: 12px;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    margin-top: 2px;
}

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

.cyber-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-icon-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.search-bar {
    padding: 15px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    z-index: 2;
}

.search-container input {
    flex: 1;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.2);
}

.cyber-search-btn {
    position: absolute;
    right: 5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: var(--background);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-glow);
}

.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 15px;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
}

.tab-panel {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-panel.active {
    display: flex;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.list-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    min-height: 60px;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.list-item.active {
    background: rgba(0, 243, 255, 0.1);
    border-left: 3px solid var(--primary);
}

.list-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.list-item-info {
    flex: 1;
}

.list-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.list-item-last-msg {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.list-item-time {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
}

.list-item-actions {
    display: flex;
    gap: 5px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
}

.connection-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid var(--success);
    animation: connectionPulse 2s infinite;
}

@keyframes connectionPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.5); }
}

.signal-bars {
    display: flex;
    align-items: end;
    gap: 2px;
    margin-left: auto;
}

.signal-bars .bar {
    width: 3px;
    background: var(--success);
    border-radius: 1px;
}

.signal-bars .bar:nth-child(1) { height: 4px; animation: signal 1s infinite; }
.signal-bars .bar:nth-child(2) { height: 6px; animation: signal 1s infinite 0.2s; }
.signal-bars .bar:nth-child(3) { height: 8px; animation: signal 1s infinite 0.4s; }
.signal-bars .bar:nth-child(4) { height: 10px; animation: signal 1s infinite 0.6s; }

@keyframes signal {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 聊天区域样式 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.5);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(19, 19, 31, 0.9);
    backdrop-filter: blur(20px);
}

#chat-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.chat-status {
    display: flex;
    gap: 15px;
}

#online-status {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-status {
    font-size: 12px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-status i {
    animation: typing 1s infinite;
}

@keyframes typing {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.group-members-count {
    font-size: 12px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.05);
}

.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    position: relative;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    animation: orbit 3s linear infinite;
}

.orbit-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow);
}

@keyframes orbit {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.welcome-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    max-width: 400px;
}

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

.feature i {
    font-size: 20px;
    color: var(--primary);
}

.feature span {
    font-size: 12px;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    animation: messageAppear 0.3s ease-out;
    border: 2px solid;
    line-height: 1.4;
}

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

.message-bubble.sent {
    align-self: flex-end;
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--message-sent);
    border-bottom-right-radius: 5px;
    color: var(--text-primary);
}

.message-bubble.received {
    align-self: flex-start;
    background: rgba(0, 168, 255, 0.1);
    border-color: var(--message-received);
    border-bottom-left-radius: 5px;
    color: var(--text-primary);
}

.message-sender {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary);
}

.message-content {
    margin-bottom: 5px;
    line-height: 1.4;
}

.message-time {
    font-size: 10px;
    text-align: right;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Orbitron', monospace;
}

.message-input-container {
    display: flex;
    align-items: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(19, 19, 31, 0.9);
    backdrop-filter: blur(20px);
}

.input-actions {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

#message-input {
    width: 100%;
    padding: 15px 20px 15px 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s;
}

#message-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 
        0 0 0 2px rgba(0, 243, 255, 0.2),
        inset 0 0 20px rgba(0, 243, 255, 0.05);
}

.input-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
}

#message-input:focus ~ .input-effects {
    opacity: 0.3;
    animation: inputGlow 2s infinite;
}

@keyframes inputGlow {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.encryption-indicator {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--primary);
    background: rgba(0, 243, 255, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.cyber-send-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--background);
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s;
}

.cyber-send-btn:hover .send-glow {
    left: 100%;
}

.cyber-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-glow);
}

.cyber-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.send-pulse {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    opacity: 0;
    animation: sendPulse 2s infinite;
}

@keyframes sendPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* 信息面板样式 */
.info-panel {
    width: 300px;
    background: rgba(19, 19, 31, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.contact-info {
    text-align: center;
    margin-bottom: 30px;
}

.contact-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

#panel-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.contact-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--surface);
    z-index: 2;
}

.quantum-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    animation: quantumRing 3s linear infinite;
}

@keyframes quantumRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#panel-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.status-offline {
    color: var(--text-muted);
    font-size: 12px;
}

.status-online {
    color: var(--success);
    font-size: 12px;
}

.security-level {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    justify-content: center;
}

.security-level i {
    color: var(--primary);
}

.panel-section {
    margin-bottom: 25px;
}

.panel-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
}

.member-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.member-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid var(--primary);
}

.member-name {
    flex: 1;
    font-size: 12px;
}

.member-role {
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(0, 243, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-files {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px;
}

.security-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cyber-modal {
    background: rgba(19, 19, 31, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 20px;
    width: 480px;
    max-width: 90%;
    position: relative;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 
        0 0 50px rgba(0, 243, 255, 0.2),
        inset 0 0 50px rgba(0, 243, 255, 0.05);
}

.modal-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    z-index: -1;
    opacity: 0.5;
    animation: borderGlow 3s ease-in-out infinite;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.modal-input-group {
    margin-bottom: 20px;
}

.modal-input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.modal-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 
        0 0 0 2px rgba(0, 243, 255, 0.2),
        inset 0 0 20px rgba(0, 243, 255, 0.05);
}

.user-id-display {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.user-id-display p {
    margin: 0;
}

#display-numeric-id {
    font-family: 'Orbitron', monospace;
    color: var(--primary);
    font-weight: 600;
}

.id-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Rajdhani', sans-serif;
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--background);
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.3);
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.user-search-result {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-search-result:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
    transform: translateX(5px);
}

.user-search-result img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.add-user-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 6px;
    color: var(--background);
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-user-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-glow);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 14px;
}

/* 状态菜单 */
.status-menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(19, 19, 31, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    padding: 10px;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
}

.status-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.status-option.active {
    background: rgba(0, 243, 255, 0.1);
}

.status-indicator.away {
    background: var(--warning);
}

.status-indicator.busy {
    background: var(--error);
}

.status-indicator.invisible {
    background: var(--text-muted);
}

/* 通知系统 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cyber-notification {
    background: rgba(19, 19, 31, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 300px;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 243, 255, 0.1);
    animation: notificationSlide 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cyber-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.cyber-notification.success::before {
    background: var(--success);
}

.cyber-notification.error::before {
    background: var(--error);
}

.cyber-notification.warning::before {
    background: var(--warning);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.notification-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 系统终端 */
.terminal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 500px;
    height: 300px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary);
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--primary);
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
    font-size: 14px;
}

.terminal-body {
    height: calc(100% - 45px);
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--primary);
    line-height: 1.4;
}

.terminal-line {
    margin-bottom: 5px;
}

.terminal-input {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid rgba(0, 243, 255, 0.3);
}

.prompt {
    color: var(--primary);
    font-family: 'Courier New', monospace;
    margin-right: 8px;
}

#terminal-cmd {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 243, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 300px;
    }
    
    .info-panel {
        position: fixed;
        top: 0;
        right: -300px;
        bottom: 0;
        transition: right 0.3s ease;
    }
    
    .info-panel.active {
        right: 0;
    }
    
    .terminal {
        width: 90%;
        right: 5%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
    
    .chat-area {
        display: none;
    }
    
    .chat-area.active {
        display: flex;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .auth-card {
        width: 95%;
        padding: 30px 20px;
    }
    
    .terminal {
        width: 95%;
        right: 2.5%;
        height: 250px;
    }
    
    .input-group input,
    .modal-input,
    #message-input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}