:root {
            --primary-color: #667eea;
            --primary-dark: #5a6cd8;
            --success-color: #28a745;
            --success-dark: #218838;
            --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --card-bg: rgba(255, 255, 255, 0.95);
            --border-radius: 20px;
            --border-radius-small: 8px;
            --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-family);
            background: var(--bg-gradient);
            min-height: 100vh;
            padding: 10px;
            overflow-x: hidden;
        }

        .app-container {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 400px 1fr;
            grid-template-rows: auto 1fr;
            gap: 20px;
            min-height: calc(100vh - 20px);
        }

        .header {
            grid-column: span 2;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            margin-bottom: 20px;
            position: relative;
            padding: 1rem 0;
            border-radius: var(--border-radius);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            position: relative;
        }

        .language-selector {
            z-index: 10;
        }

        .language-selector select {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: var(--border-radius-small);
            font-size: 14px;
            cursor: pointer;
            backdrop-filter: blur(10px);
        }

        .language-selector select option {
            background: #333;
            color: white;
        }

        .header h1 {
            font-size: 1.5rem;
            font-weight: bold;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .logo-link {
            color: inherit;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .logo-link:hover {
            transform: translateY(-2px);
            text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
        }



        .control-panel, .chat-panel {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: clamp(15px, 4vw, 30px);
            box-shadow: var(--shadow);
            backdrop-filter: blur(10px);
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        /* 连接控制区域样式 */
        .connection-controls {
            background: rgba(255, 255, 255, 0.05);
            border-radius: var(--border-radius-small);
            padding: 15px;
            margin-bottom: 15px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .connection-controls.collapsed {
            max-height: 60px;
            overflow: hidden;
        }

        .section-subtitle {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 10px;
            color: #333;
            border-bottom: 1px solid rgba(102, 126, 234, 0.3);
            padding-bottom: 5px;
        }

        .btn-compact {
            padding: 8px 16px;
            font-size: 14px;
            margin-bottom: 8px;
        }

        .connection-toggle {
            text-align: center;
            margin-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 10px;
        }

        .btn-toggle {
            background: transparent;
            border: 1px solid rgba(102, 126, 234, 0.3);
            color: var(--primary-color);
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
            margin: 0 auto;
        }

        .btn-toggle:hover {
            background: rgba(102, 126, 234, 0.1);
            border-color: var(--primary-color);
        }

        .toggle-icon {
            transition: transform 0.3s ease;
        }

        .connection-controls.collapsed .toggle-icon {
            transform: rotate(180deg);
        }

        .section {
            margin-bottom: clamp(15px, 4vw, 30px);
        }

        .section-title {
            font-size: clamp(1.1rem, 3vw, 1.3rem);
            font-weight: 700;
            margin-bottom: 15px;
            color: #333;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 8px;
        }

        .btn {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: clamp(12px, 3vw, 16px) clamp(20px, 4vw, 25px);
            border-radius: 10px;
            font-size: clamp(14px, 2.5vw, 16px);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            margin-bottom: 10px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        .btn:hover:not(:disabled) { 
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn:disabled { 
            background: #ccc; 
            cursor: not-allowed;
            transform: none;
        }

        .btn.success { background: var(--success-color); }
        .btn.success:hover:not(:disabled) { background: var(--success-dark); }

        .fingerprint {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: var(--border-radius-small);
            padding: clamp(10px, 3vw, 16px);
            font-family: 'Courier New', monospace;
            font-weight: bold;
            font-size: clamp(14px, 2.5vw, 16px);
            text-align: center;
            color: #495057;
            letter-spacing: 1px;
            word-break: break-all;
        }

        .role-tabs {
            display: flex;
            background: #e9ecef;
            border-radius: var(--border-radius-small);
            padding: 4px;
            margin-bottom: 15px;
        }

        .role-tab {
            flex: 1;
            padding: clamp(8px, 2vw, 12px);
            text-align: center;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            color: #6c757d;
            font-size: clamp(13px, 2vw, 14px);
            min-height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .role-tab.active {
            background: var(--primary-color);
            color: white;
        }

        .role-content {
            display: none;
        }

        .role-content.active {
            display: block;
        }

        .input-group {
            margin-bottom: 15px;
        }

        .input-group label {
            display: block;
            font-weight: 600;
            margin-bottom: 8px;
            color: #555;
            font-size: clamp(13px, 2vw, 14px);
        }

        textarea {
            width: 100%;
            padding: clamp(10px, 2.5vw, 12px);
            border: 1px solid #ddd;
            border-radius: var(--border-radius-small);
            resize: vertical;
            font-family: inherit;
            font-size: clamp(13px, 2vw, 14px);
            min-height: 80px;
            transition: border-color 0.3s ease;
        }

        textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }

        .input-with-button {
            display: flex;
            gap: 10px;
            align-items: flex-end;
        }

        .input-with-button textarea {
            flex: 1;
        }

        .copy-btn {
            background: #17a2b8;
            color: white;
            border: none;
            padding: clamp(10px, 2.5vw, 12px) clamp(15px, 3vw, 18px);
            border-radius: var(--border-radius-small);
            cursor: pointer;
            font-size: clamp(12px, 2vw, 14px);
            font-weight: 600;
            min-height: 44px;
            min-width: 80px;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .copy-btn:hover {
            background: #138496;
            transform: translateY(-1px);
        }

        .copy-btn:active {
            transform: translateY(0);
        }

        .copy-btn.copied {
            background: var(--success-color);
        }

        .chat-panel {
            background: #f8f9fa;
            border-radius: 15px;
            overflow: hidden;
            min-height: 0;
        }

        .chat-header {
            background: var(--primary-color);
            color: white;
            padding: clamp(12px, 3vw, 20px);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .chat-header h3 {
            font-size: clamp(16px, 3vw, 18px);
            margin: 0;
        }

        #encryption-badge {
            font-size: clamp(12px, 2vw, 14px);
            padding: 4px 8px;
            background: rgba(255,255,255,0.2);
            border-radius: 4px;
            backdrop-filter: blur(10px);
        }

        .messages {
            flex: 1;
            padding: clamp(10px, 3vw, 20px);
            overflow-y: auto;
            background: white;
            min-height: 200px;
            max-height: calc(60vh - 120px);
        }

        .message {
            margin-bottom: 12px;
            padding: clamp(8px, 2vw, 12px) clamp(10px, 3vw, 15px);
            border-radius: 10px;
            max-width: 85%;
            font-size: clamp(13px, 2vw, 14px);
            line-height: 1.4;
            word-wrap: break-word;
        }

        .message.system {
            background: #e3f2fd;
            border: 1px solid #bbdefb;
            max-width: 100%;
        }

        .message.sent {
            background: var(--primary-color);
            color: white;
            margin-left: auto;
        }

        .message.received {
            background: #f1f3f4;
        }

        .message small {
            opacity: 0.7;
            font-size: 0.85em;
        }

        .message-input {
            display: flex;
            gap: 10px;
            padding: 20px;
            background: white;
            border-radius: 0 0 var(--border-radius) var(--border-radius);
            position: relative;
        }

        .message-input input {
            flex: 1;
            padding: 12px 16px;
            border: 2px solid #e0e0e0;
            border-radius: var(--border-radius-small);
            font-size: 16px;
            outline: none;
            transition: border-color 0.3s ease;
        }

        .message-input input:focus {
            border-color: var(--primary-color);
        }

        /* 文件传输相关样式 */
        .file-input-container {
            position: relative;
            display: inline-block;
        }

        .file-btn {
            padding: 12px;
            background: #28a745;
            color: white;
            border: none;
            border-radius: var(--border-radius-small);
            cursor: pointer;
            font-size: 18px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 48px;
        }

        .file-btn:hover:not(:disabled) {
            background: #218838;
            transform: translateY(-2px);
        }

        .file-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        #file-input {
            position: absolute;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            z-index: -1; /* 确保不会阻止按钮点击 */
            pointer-events: none; /* 禁用指针事件，让按钮处理点击 */
        }

        .file-preview {
            position: absolute;
            bottom: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 3px solid var(--primary-color);
            border-radius: var(--border-radius-small);
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            display: none;
            z-index: 1000;
            animation: slideUp 0.3s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .file-preview.show {
            display: block;
        }

        .file-preview::before {
            content: '📎 选择的文件';
            display: block;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 10px;
            font-size: 14px;
        }

        .file-info {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .file-icon {
            font-size: 24px;
        }

        .file-details {
            flex: 1;
        }

        .file-name {
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .file-size {
            font-size: 14px;
            color: #666;
        }

        .file-actions {
            display: flex;
            gap: 10px;
        }

        .file-action-btn {
            padding: 8px 16px;
            border: none;
            border-radius: var(--border-radius-small);
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .send-file-btn {
            background: var(--primary-color);
            color: white;
        }

        .send-file-btn:hover {
            background: var(--primary-dark);
        }

        .cancel-file-btn {
            background: #dc3545;
            color: white;
        }

        .cancel-file-btn:hover {
            background: #c82333;
        }

        /* 文件传输进度 */
        .file-progress {
            margin-top: 10px;
            display: none;
        }

        .file-progress.show {
            display: block;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #e0e0e0;
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 5px;
        }

        .progress-fill {
            height: 100%;
            background: var(--primary-color);
            transition: width 0.3s ease;
            width: 0%;
        }

        .progress-text {
            font-size: 12px;
            color: #666;
            text-align: center;
        }

        /* 文件消息样式 */
        .file-message {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: var(--border-radius-small);
            padding: 15px;
            margin: 10px 0;
            display: flex;
            align-items: center;
            gap: 15px;
            transition: all 0.3s ease;
        }

        .file-message:hover {
            border-color: var(--primary-color);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .file-message-icon {
            font-size: 32px;
            color: var(--primary-color);
        }

        .file-message-info {
            flex: 1;
        }

        .file-message-name {
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .file-message-meta {
            font-size: 14px;
            color: #666;
        }

        .file-download-btn {
            padding: 10px 20px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-small);
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .file-download-btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        /* 文件状态指示器样式 */
        .file-status-indicator {
            font-size: 20px;
            margin-left: 10px;
            transition: all 0.3s ease;
        }

        .file-status-indicator.sending {
            color: #ffc107;
            animation: pulse 1.5s infinite;
        }

        .file-status-indicator.success {
            color: #28a745;
        }

        .file-status-indicator.failed {
            color: #dc3545;
        }

        /* 发送方文件消息样式 */
        .message.sent .file-message {
            background: #e3f2fd;
            border-color: var(--primary-color);
        }

        .message.sent .file-message-icon {
            color: var(--primary-color);
        }

        .send-btn {
            padding: 12px 24px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-small);
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .send-btn:hover:not(:disabled) {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        .send-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .message-input {
                padding: 15px;
                gap: 8px;
            }
            
            .file-btn {
                min-width: 44px;
                padding: 10px;
            }
            
            .file-preview {
                left: -10px;
                right: -10px;
            }
        }

        /* 响应式优化 */
        @media (max-width: 480px) {
            .app-container {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            .header {
                grid-column: span 1;
            }
            .language-selector {
                position: static;
                text-align: center;
                margin-bottom: 10px;
            }
            .input-with-button {
                flex-direction: column;
                align-items: stretch;
            }
            .copy-btn {
                min-width: auto;
            }
            .connection-controls {
                padding: 10px;
            }
            .connection-controls.collapsed {
                max-height: 50px;
            }
            .btn-compact {
                padding: 6px 12px;
                font-size: 13px;
            }
        }

        @media (min-width: 481px) and (max-width: 768px) {
            .app-container {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            .header {
                grid-column: span 1;
            }
            .connection-controls.collapsed {
                max-height: 55px;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .app-container {
                grid-template-columns: 350px 1fr;
                gap: 25px;
                max-width: 1024px;
            }
        }

        @media (min-width: 1441px) {
            body {
                padding: 20px 40px;
            }
            .app-container {
                grid-template-columns: 480px 1fr;
                gap: 40px;
                max-width: 1400px;
            }
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        /* 通知样式 */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 20px;
            border-radius: var(--border-radius-small);
            color: white;
            font-weight: 600;
            z-index: 10000;
            animation: slideInRight 0.3s ease-out;
            max-width: 300px;
        }

        .notification.success {
            background: #28a745;
        }

        .notification.error {
            background: #dc3545;
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(100%);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* 模式选择器样式 */
        .mode-selector {
            margin: 20px 0;
            display: flex;
            justify-content: center;
        }

        .mode-tabs {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .mode-tab {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 15px;
            min-width: 200px;
            backdrop-filter: blur(10px);
            position: relative;
            color: rgba(255, 255, 255, 0.8);
        }

        .mode-tab:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            color: rgba(255, 255, 255, 0.9);
        }

        .mode-tab.active {
            background: linear-gradient(135deg, rgba(74, 144, 226, 0.8), rgba(80, 200, 120, 0.8));
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 12px 35px rgba(74, 144, 226, 0.4);
            transform: translateY(-3px);
            color: white;
        }

        .mode-tab.active .mode-icon {
            opacity: 1;
            transform: scale(1.1);
        }

        .mode-tab.active .mode-title {
            font-weight: 700;
        }

        .mode-tab.active .mode-desc {
            opacity: 0.95;
        }

        .mode-icon {
            font-size: 2rem;
            opacity: 0.9;
        }

        .mode-text {
            flex: 1;
        }

        .mode-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .mode-desc {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .coming-soon {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ff6b6b;
            color: white;
            font-size: 0.7rem;
            padding: 4px 8px;
            border-radius: 12px;
            font-weight: 600;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        /* 身份模式面板样式 */
        .identity-mode-panel {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 30px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(10px);
            height: 100%;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .identity-mode-panel.hidden {
            display: none;
        }

        .identity-mode-panel .section-title {
            margin-bottom: 20px;
            flex-shrink: 0;
        }

        .identity-mode-panel .identity-card {
            flex-shrink: 0;
        }

        .identity-mode-panel .friends-list {
            flex: 1;
            min-height: 120px;
            max-height: none;
        }

        .identity-card {
            display: flex;
            align-items: center;
            gap: 20px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 20px;
            border-radius: 15px;
            border: 2px solid #dee2e6;
            margin-bottom: 30px;
        }

        .identity-avatar {
            font-size: 48px;
            width: 80px;
            height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--primary-color);
            border-radius: 50%;
            color: white;
        }

        .identity-details {
            flex: 1;
            position: relative;
            padding-right: 30px;
        }

        .identity-nickname {
            font-size: 24px;
            font-weight: 700;
            color: #333;
            margin-bottom: 8px;
        }

        .identity-id {
            font-size: 14px;
            color: #666;
            font-family: 'Courier New', monospace;
            background: rgba(102, 126, 234, 0.1);
            padding: 6px 12px;
            border-radius: 8px;
            display: inline-block;
            margin-bottom: 8px;
            cursor: pointer;
            border: 1px solid rgba(102, 126, 234, 0.2);
            transition: all 0.3s ease;
            position: relative;
            word-break: break-all;
        }

        .identity-id:hover {
            background: rgba(102, 126, 234, 0.15);
            border-color: rgba(102, 126, 234, 0.3);
            color: var(--primary-color);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }

        .identity-id:active {
            transform: translateY(0);
            box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
        }

        .identity-id.copied {
            background: rgba(40, 167, 69, 0.15);
            border-color: rgba(40, 167, 69, 0.3);
            color: #28a745;
            animation: copySuccess 0.6s ease;
        }

        .identity-id.selected {
            background: rgba(255, 193, 7, 0.15);
            border-color: rgba(255, 193, 7, 0.3);
            color: #856404;
            animation: selectSuccess 0.6s ease;
        }

        @keyframes copySuccess {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.05);
                background: rgba(40, 167, 69, 0.25);
            }
            100% {
                transform: scale(1);
            }
        }

        @keyframes selectSuccess {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.03);
                background: rgba(255, 193, 7, 0.25);
            }
            100% {
                transform: scale(1);
            }
        }

        .identity-id::after {
            content: '📋';
            position: absolute;
            right: -22px;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0;
            transition: opacity 0.3s ease;
            font-size: 12px;
        }

        .identity-id:hover::after {
            opacity: 0.6;
        }

        .identity-id.copied::after {
            content: '✅';
            opacity: 1;
            animation: checkMark 0.6s ease;
        }

        .identity-id.selected::after {
            content: '🔍';
            opacity: 1;
            animation: selectMark 0.6s ease;
        }

        @keyframes checkMark {
            0% {
                transform: translateY(-50%) scale(0.8);
                opacity: 0;
            }
            50% {
                transform: translateY(-50%) scale(1.2);
                opacity: 1;
            }
            100% {
                transform: translateY(-50%) scale(1);
                opacity: 1;
            }
        }

        @keyframes selectMark {
            0% {
                transform: translateY(-50%) scale(0.8);
                opacity: 0;
            }
            50% {
                transform: translateY(-50%) scale(1.2);
                opacity: 1;
            }
            100% {
                transform: translateY(-50%) scale(1);
                opacity: 1;
            }
        }

        .identity-status {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #28a745;
        }

        .status-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #28a745;
        }

        .status-indicator.offline {
            background: #dc3545;
        }

        /* DHT网络状态样式 */
        .network-status-card {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 20px;
            border-radius: 15px;
            border: 2px solid #dee2e6;
            margin-bottom: 30px;
        }

        .network-status {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 20px;
        }

        .network-status .status-indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        .network-status.offline .status-indicator {
            background: #dc3545;
            animation: none;
        }

        .network-status.connecting .status-indicator {
            background: #ffc107;
        }

        .network-status.online .status-indicator {
            background: #28a745;
        }

        .network-status.error .status-indicator {
            background: #dc3545;
            animation: blink 1s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        @keyframes blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0; }
        }

        .network-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat-item {
            text-align: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 10px;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .stat-label {
            display: block;
            font-size: 12px;
            color: #666;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .stat-value {
            display: block;
            font-size: 24px;
            font-weight: 700;
            color: var(--primary-color);
        }

        /* 节点列表样式 */
        .peers-container {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 20px;
            border-radius: 15px;
            border: 2px solid #dee2e6;
            margin-bottom: 30px;
        }

        .peers-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            font-weight: 600;
            color: #333;
        }

        .peer-count-badge {
            background: var(--primary-color);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 700;
        }

        .peer-list {
            max-height: 300px;
            overflow-y: auto;
        }

        .peer-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 10px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            margin-bottom: 10px;
            transition: all 0.3s ease;
        }

        .peer-item:hover {
            background: rgba(255, 255, 255, 1);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .peer-avatar {
            font-size: 24px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--primary-color);
            border-radius: 50%;
            color: white;
        }

        .peer-info {
            flex: 1;
        }

        .peer-id {
            font-size: 14px;
            font-weight: 600;
            color: #333;
            font-family: 'Courier New', monospace;
            margin-bottom: 4px;
        }

        .peer-status {
            font-size: 12px;
            color: #28a745;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .peer-status::before {
            content: '●';
            font-size: 8px;
        }

        .peer-actions {
            display: flex;
            gap: 8px;
        }

        .peer-connect-btn {
            padding: 6px 12px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .peer-connect-btn:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        .empty-peers {
            text-align: center;
            padding: 40px 20px;
            color: #666;
        }

        .empty-peers .empty-icon {
            font-size: 48px;
            margin-bottom: 15px;
            opacity: 0.5;
        }

        .empty-peers p {
            font-size: 16px;
            margin-bottom: 8px;
        }

        .empty-peers small {
            font-size: 14px;
            opacity: 0.7;
        }



        .friends-count {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .friends-list {
            min-height: 200px;
            max-height: 500px;
            overflow-y: auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px;
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        }

        .empty-friends {
            text-align: center;
            padding: 60px 20px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
            border: 2px dashed rgba(102, 126, 234, 0.2);
            border-radius: 16px;
            margin: 20px;
        }

        .empty-icon {
            font-size: 4rem;
            margin-bottom: 20px;
            opacity: 0.6;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .empty-text {
            font-size: 1.2rem;
            margin-bottom: 12px;
            font-weight: 600;
            color: #333;
        }

        .empty-hint {
            font-size: 0.95rem;
            opacity: 0.7;
            color: #666;
        }

        .friends-items {
            padding: 8px;
        }

        .friend-item {
            display: flex;
            align-items: center;
            padding: 16px;
            margin-bottom: 8px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 12px;
            border: 1px solid rgba(0, 0, 0, 0.06);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .friend-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
        }

        .friend-item:hover {
            background: rgba(255, 255, 255, 1);
            border-color: rgba(102, 126, 234, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        }

        .friend-item:hover::before {
            transform: translateX(100%);
        }

        .friend-avatar-container {
            position: relative;
            margin-right: 16px;
            flex-shrink: 0;
        }

        .friend-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea, #764ba2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            color: white;
            position: relative;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .friend-status {
            position: absolute;
            bottom: -2px;
            right: -2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 3px solid white;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }

        .friend-status.online {
            background: #10b981;
            box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
        }

        .friend-status.offline {
            background: #94a3b8;
        }

        .friend-content {
            flex: 1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            min-width: 0;
        }

        .friend-main {
            flex: 1;
            min-width: 0;
        }

        .friend-name-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
        }

        .friend-name {
            font-weight: 600;
            font-size: 1rem;
            color: #1f2937;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .verified-badge, .unverified-badge {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: bold;
            flex-shrink: 0;
        }

        .verified-badge {
            background: #10b981;
            color: white;
        }

        .unverified-badge {
            background: #f59e0b;
            color: white;
        }

        .friend-last-seen {
            font-size: 0.85rem;
            color: #6b7280;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .friend-meta {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .friend-id-short {
            font-size: 0.75rem;
            color: #9ca3af;
            font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
            background: rgba(156, 163, 175, 0.1);
            padding: 2px 6px;
            border-radius: 4px;
        }

        .friend-actions {
            display: flex;
            gap: 6px;
            align-items: center;
        }

        .action-btn {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: rgba(0, 0, 0, 0.05);
            color: #6b7280;
        }

        .action-btn:hover {
            transform: scale(1.1);
            background: rgba(0, 0, 0, 0.1);
        }

        .chat-btn:hover {
            background: rgba(102, 126, 234, 0.1);
            color: #667eea;
        }

        .verify-btn:hover {
            background: rgba(245, 158, 11, 0.1);
            color: #f59e0b;
        }

        .more-btn:hover {
            background: rgba(107, 114, 128, 0.1);
            color: #374151;
        }

        /* 好友上下文菜单样式 */
        .friend-context-menu {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(0, 0, 0, 0.08);
            padding: 8px;
            z-index: 1000;
            min-width: 180px;
            animation: menuSlideIn 0.2s ease;
        }

        @keyframes menuSlideIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.9rem;
            color: #374151;
        }

        .menu-item:hover {
            background: rgba(102, 126, 234, 0.08);
            color: #667eea;
        }

        .menu-item.danger {
            color: #dc2626;
        }

        .menu-item.danger:hover {
            background: rgba(220, 38, 38, 0.08);
            color: #dc2626;
        }

        .menu-divider {
            height: 1px;
            background: rgba(0, 0, 0, 0.08);
            margin: 4px 0;
        }

        /* 好友资料模态框样式 */
        .friend-profile-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }

        .friend-profile-modal .modal-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
        }

        .friend-profile-modal .modal-content {
            position: relative;
            background: white;
            border-radius: 16px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
            max-width: 400px;
            width: 90%;
            max-height: 80vh;
            overflow: hidden;
        }

        .profile-card {
            padding: 32px;
            text-align: center;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea, #764ba2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: white;
            margin: 0 auto 20px;
            box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
        }

        .profile-info {
            text-align: left;
        }

        .profile-name {
            font-size: 1.25rem;
            font-weight: 700;
            color: #1f2937;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .profile-id, .profile-added, .profile-method {
            font-size: 0.9rem;
            color: #6b7280;
            margin-bottom: 8px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 8px;
            border-left: 3px solid #667eea;
        }

        .modal-actions {
            padding: 20px 32px;
            border-top: 1px solid rgba(0, 0, 0, 0.08);
            display: flex;
            gap: 12px;
        }

        .modal-actions .btn {
            flex: 1;
            margin: 0;
        }

        .btn-danger {
            background: #dc3545 !important;
            color: white !important;
            border: none !important;
        }

        .btn-danger:hover {
            background: #c82333 !important;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .friend-item {
                padding: 12px;
            }
            
            .friend-avatar {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }
            
            .friend-status {
                width: 12px;
                height: 12px;
                border-width: 2px;
            }
            
            .friend-name {
                font-size: 0.9rem;
            }
            
            .friend-last-seen {
                font-size: 0.8rem;
            }
            
            .action-btn {
                width: 28px;
                height: 28px;
            }
            
            .friend-context-menu {
                min-width: 160px;
            }
        }

        .connection-method {
            display: flex;
            gap: 20px;
            margin-bottom: 15px;
        }

        .connection-method label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 0.9rem;
        }

        .connection-method input[type="radio"] {
            margin: 0;
        }

        .friend-select {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            color: white;
            margin-bottom: 10px;
        }

        .friend-select option {
            background: #2c3e50;
            color: white;
        }

        .friend-chat-panel, .invite-friend-panel {
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* 网络诊断UI样式 */
        .diagnostics-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
        }

        .modal-content {
            position: relative;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow: hidden;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid #eee;
            background: var(--primary-color);
            color: white;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 18px;
        }

        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.3s ease;
        }

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .modal-body {
            padding: 20px;
        }

        .diagnostics-grid {
            display: grid;
            gap: 15px;
        }

        .diagnostic-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .diagnostic-label {
            font-weight: 600;
            color: #333;
        }

        .diagnostic-value {
            font-weight: 700;
            padding: 4px 8px;
            border-radius: 4px;
        }

        .diagnostic-value.status-online {
            background: #d4edda;
            color: #155724;
        }

        .diagnostic-value.status-offline {
            background: #f8d7da;
            color: #721c24;
        }

        .diagnostic-value.status-connecting {
            background: #fff3cd;
            color: #856404;
        }

        .diagnostic-value.status-error {
            background: #f8d7da;
            color: #721c24;
        }

        .diagnostic-value.quality-excellent {
            background: #d4edda;
            color: #155724;
        }

        .diagnostic-value.quality-good {
            background: #d1ecf1;
            color: #0c5460;
        }

        .diagnostic-value.quality-fair {
            background: #fff3cd;
            color: #856404;
        }

        .diagnostic-value.quality-poor {
            background: #f8d7da;
            color: #721c24;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid #eee;
            text-align: right;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 14px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .btn-small:hover:not(:disabled) {
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        .btn-small:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        .friend-connection-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .connection-code-container {
            margin: 15px 0;
        }
        
        .connection-code-container textarea {
            width: 100%;
            height: 120px;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-family: monospace;
            font-size: 12px;
            resize: vertical;
            margin-bottom: 10px;
        }
        
        .connection-instructions {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin: 15px 0;
        }
        
        .connection-instructions h4 {
            margin-bottom: 10px;
            color: #333;
        }
        
        .connection-instructions ol {
            margin-left: 20px;
        }
        
        .connection-instructions li {
            margin-bottom: 5px;
            color: #666;
        }
        
        .connection-instructions li strong {
            color: #d32f2f;
            background: #ffebee;
            padding: 2px 4px;
            border-radius: 3px;
        }
        
        .connection-status {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            background: #fff3cd;
            border-radius: 8px;
            margin-top: 15px;
        }
        
        .status-indicator.connecting {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ffc107;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        /* 临时连接样式 */
        .temp-connection-info {
            background: #e3f2fd;
            border: 1px solid #2196f3;
            border-radius: 8px;
            padding: 12px;
            margin: 10px 0;
            font-size: 14px;
        }

        .temp-connection-info p {
            margin: 4px 0;
            color: #1976d2;
        }

        .temp-connection-controls {
            margin: 15px 0;
        }

        .temp-connection-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .btn-start-temp-chat {
            background: linear-gradient(135deg, #4caf50, #45a049);
            color: white;
            border: none;
            min-width: 140px;
        }

        .btn-start-temp-chat:hover {
            background: linear-gradient(135deg, #45a049, #4caf50);
            transform: translateY(-1px);
        }

        .btn-accept-temp-invitation {
            background: linear-gradient(135deg, #2196f3, #1976d2);
            color: white;
            border: none;
            min-width: 140px;
        }

        .btn-accept-temp-invitation:hover {
            background: linear-gradient(135deg, #1976d2, #2196f3);
            transform: translateY(-1px);
        }

        .temp-chat-creator,
        .temp-chat-joiner {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 12px;
            padding: 20px;
            margin: 15px 0;
        }

        .temp-chat-creator h4,
        .temp-chat-joiner h4 {
            color: #333;
            margin-bottom: 15px;
        }

        .btn-secondary {
            background: #6c757d;
            color: white;
            border: none;
            margin-top: 15px;
        }

        .btn-secondary:hover {
            background: #5a6268;
        }

        /* 响应式调整 */
        @media (max-width: 768px) {
            .temp-connection-buttons {
                flex-direction: column;
            }

            .btn-start-temp-chat,
            .btn-accept-temp-invitation {
                width: 100%;
                min-width: auto;
            }
        }

        /* 隐藏模式选择器和匿名模式相关元素 */
        .mode-selector,
        #anonymous-control-panel {
            display: none !important;
        }

        /* 消息发送状态样式 */
        .message-status {
            font-weight: 500;
            margin-left: 8px;
            font-size: 0.9em;
            transition: all 0.3s ease;
            cursor: default;
        }

        .message-status.sending,
        .message-status.pending {
            color: #ff9800;
            animation: pulse 1.5s infinite;
        }

        .message-status.delivered {
            color: #4caf50;
            animation: statusUpdate 0.5s ease;
        }
        
        .message-status.read {
            color: #2196f3;
            animation: statusUpdate 0.5s ease;
        }

        .message-status.failed {
            color: #f44336;
            animation: statusUpdate 0.5s ease, shake 0.5s ease;
        }

        @keyframes pulse {
            0% { opacity: 0.6; }
            50% { opacity: 1; }
            100% { opacity: 0.6; }
        }

        @keyframes statusUpdate {
            0% { 
                transform: scale(0.8);
                opacity: 0.5;
            }
            50% { 
                transform: scale(1.2);
                opacity: 1;
            }
            100% { 
                transform: scale(1);
                opacity: 1;
            }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-2px); }
            75% { transform: translateX(2px); }
        }

        /* 好友响应模态框样式 */
        .friend-info-section {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 12px;
            padding: 20px;
            margin: 15px 0;
        }

        .friend-preview {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 10px;
        }

        .friend-preview .friend-avatar {
            font-size: 32px;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #e3f2fd;
            border-radius: 50%;
            border: 2px solid #2196f3;
        }

        .friend-preview .friend-details {
            flex: 1;
        }

        .friend-preview .friend-name {
            font-weight: 600;
            font-size: 18px;
            color: #333;
            margin-bottom: 4px;
        }

        .friend-preview .friend-id {
            font-family: monospace;
            font-size: 12px;
            color: #666;
            background: #f0f0f0;
            padding: 2px 6px;
            border-radius: 4px;
        }

        .response-steps {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
        }

        .response-steps h4 {
            margin-bottom: 10px;
            color: #856404;
        }

        .response-steps ol {
            margin: 0;
            padding-left: 20px;
        }

        .response-steps li {
            margin-bottom: 5px;
            color: #856404;
        }

        .progress-steps {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin: 20px 0;
        }

        .progress-step {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .progress-step.active {
            background: #fff3cd;
            border-color: #ffeaa7;
        }

        .progress-step.completed {
            background: #d4edda;
            border-color: #c3e6cb;
        }

        .progress-step .step-icon {
            font-size: 20px;
            width: 30px;
            text-align: center;
        }

        .progress-step .step-text {
            flex: 1;
            font-weight: 500;
            color: #333;
        }

        .progress-step .step-status {
            font-size: 16px;
        }

        .response-code-section {
            background: #e8f5e8;
            border: 2px solid #4caf50;
            border-radius: 12px;
            padding: 20px;
            margin: 20px 0;
        }

        .textarea-with-button {
            display: flex;
            gap: 10px;
            align-items: flex-start;
        }

        .textarea-with-button textarea {
            flex: 1;
        }

        .textarea-with-button .btn {
            flex-shrink: 0;
            min-width: 80px;
        }

        /* 好友列表样式 */
        .empty-friends-list {
            text-align: center;
            padding: 40px 20px;
            color: #666;
        }

        .empty-friends-list p:first-child {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #333;
        }

        .empty-friends-list p:last-child {
            font-size: 14px;
            color: #888;
        }

        .friends-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding: 20px 24px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
            border-radius: 16px;
            border: 1px solid rgba(102, 126, 234, 0.15);
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
        }

        .friends-header .section-title {
            margin-bottom: 0;
            border-bottom: none;
            padding-bottom: 0;
            font-size: 1.25rem;
            font-weight: 700;
            color: #1f2937;
            display: flex;
            align-items: center;
            gap: 8px;
        }



        .friend-action-buttons {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .friends-header .btn-send-invitation,
        .friends-header .btn-accept-invitation {
            margin-bottom: 0;
            padding: 10px 16px;
            font-size: 0.85rem;
            font-weight: 600;
            min-height: auto;
            width: auto;
            flex-shrink: 0;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .friends-header .btn-send-invitation {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
        }

        .friends-header .btn-send-invitation:hover {
            background: linear-gradient(135deg, #5a6cd8, #6a5acd);
            transform: translateY(-2px);
            box-shadow: 0 5px 16px rgba(102, 126, 234, 0.4);
        }

        .friends-header .btn-accept-invitation {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
        }

        .friends-header .btn-accept-invitation:hover {
            background: linear-gradient(135deg, #059669, #047857);
            transform: translateY(-2px);
            box-shadow: 0 5px 16px rgba(16, 185, 129, 0.4);
        }

        .friends-items {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .friends-items .friend-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 18px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
            border-radius: 16px;
            border: 1px solid rgba(102, 126, 234, 0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .friends-items .friend-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-color), #7c3aed);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .friends-items .friend-item:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 0.95) 100%);
            border-color: rgba(102, 126, 234, 0.3);
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
        }

        .friends-items .friend-item:hover::before {
            opacity: 1;
        }

        .friends-items .friend-item .friend-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            transition: all 0.3s ease;
            position: relative;
        }

        .friends-items .friend-item:hover .friend-avatar {
            transform: scale(1.05);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
        }

        .friends-items .friend-item .friend-info {
            flex: 1;
            min-width: 0;
        }

        .friends-items .friend-item .friend-name {
            font-size: 17px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .friends-items .friend-item .friend-id {
            font-size: 13px;
            color: #718096;
            font-family: 'Courier New', monospace;
            margin-bottom: 4px;
            background: rgba(102, 126, 234, 0.1);
            padding: 2px 8px;
            border-radius: 6px;
            display: inline-block;
            font-weight: 500;
        }

        .friends-items .friend-item .friend-added-time {
            font-size: 12px;
            color: #a0aec0;
            font-style: italic;
        }

        .friends-items .friend-item .friend-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .btn-sm {
            padding: 8px 16px;
            font-size: 13px;
            border-radius: 8px;
            min-height: auto;
            margin-bottom: 0;
            font-weight: 600;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            border: none;
            cursor: pointer;
        }

        .btn-sm.btn-primary {
            background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        }

        .btn-sm.btn-primary:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, #6d28d9 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .btn-sm.btn-secondary {
            background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
        }

        .btn-sm.btn-secondary:hover {
            background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
        }

        .btn-sm.btn-warning {
            background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
            color: #212529;
            box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
        }

        .btn-sm.btn-warning:hover {
            background: linear-gradient(135deg, #e0a800 0%, #d68910 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
        }

        .verified-badge, .unverified-badge {
            font-size: 12px;
            margin-left: 5px;
        }

        .friend-item.unverified {
            border-left: 3px solid #ffc107;
            background: rgba(255, 193, 7, 0.05);
        }

        .friend-item.verified {
            border-left: 3px solid #28a745;
        }

        .friend-item.unverified .friend-name {
            color: #856404;
        }

        @media (max-width: 768px) {
            .friends-header {
                flex-direction: column;
                align-items: stretch;
                gap: 16px;
                padding: 16px 20px;
            }

            .friends-header .section-title {
                font-size: 1.1rem;
                justify-content: center;
            }

            .friend-action-buttons {
                flex-direction: column;
                width: 100%;
                gap: 8px;
            }

            .friends-header .btn-send-invitation,
            .friends-header .btn-accept-invitation {
                width: 100%;
                justify-content: center;
                padding: 12px 16px;
                font-size: 0.9rem;
            }

            .friends-items .friend-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                padding: 16px;
            }

            .friends-items .friend-item .friend-actions {
                width: 100%;
                justify-content: stretch;
            }

            .friends-items .friend-item .friend-actions .btn-sm {
                flex: 1;
            }
        }