/* style.css - OCFM样式 (修复版) */
:root {
    /* 主题色 - 修复：主题切换即时生效 */
    --color-primary: #3b82f6;
    --color-secondary: #2563eb;
    --color-success: #00AA00;
    --color-danger: #FF0000;
    --color-warning: #FFF000;
    --color-info: #6366f1;
    
    /* 背景色 */
    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-secondary: #ffffff;
    --color-bg-input: #ffffff;
    --color-bg-overlay: rgba(0, 0, 0, 0.5);
    --color-bg-dark: #1f2937;
    
    /* 文字色 */
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    --color-text-disabled: #d1d5db;
    --color-text-on-primary: #ffffff;
    
    /* 边框色 */
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-border-focus: #3b82f6;
    --color-border-dark: #374151;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 圆角 */
    --radius-0: 0.0rem;
    --radius-sm: 0.375rem;
    --radius-md: 9px;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 99%;
    
    /* 间距 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    
    /* 过渡动画 */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* 层级 */
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
    --z-toast: 80;
}

/* 主题色配置 - 修复：主题切换即时生效 */
[data-theme="red"] {
    --color-primary: #ef4444 !important;
    --color-secondary: #dc2626 !important;
    --color-border-focus: #ef4444 !important;
    --color-bg: #fef2f2;
}

[data-theme="orange"] {
    --color-primary: #f97316 !important;
    --color-secondary: #ea580c !important;
    --color-border-focus: #f97316 !important;
    --color-bg: #fff7ed;
}

[data-theme="yellow"] {
    --color-primary: #f59e0b !important;
    --color-secondary: #d97706 !important;
    --color-border-focus: #f59e0b !important;
    --color-bg: #fffbeb;
}

[data-theme="green"] {
    --color-primary: #10b981 !important;
    --color-secondary: #0d9c6b !important;
    --color-border-focus: #10b981 !important;
    --color-bg: #ecfdf5;
}

[data-theme="blue"] {
    --color-primary: #3b82f6 !important;
    --color-secondary: #2563eb !important;
    --color-border-focus: #3b82f6 !important;
    --color-bg: #eff6ff;
}

[data-theme="cyan"] {
    --color-primary: #06b6d4 !important;
    --color-secondary: #0891b2 !important;
    --color-border-focus: #06b6d4 !important;
    --color-bg: #ecfeff;
}

[data-theme="purple"] {
    --color-primary: #8b5cf6 !important;
    --color-secondary: #7c3aed !important;
    --color-border-focus: #8b5cf6 !important;
    --color-bg: #faf5ff;
}

[data-theme="black"] {
    --color-primary: #1f2937 !important;
    --color-secondary: #111827 !important;
    --color-border-focus: #1f2937 !important;
    --color-bg: #f9fafb;
    --color-text: #1f2937;
    --color-bg-card: #ffffff;
}

[data-theme="white"] {
    --color-primary: #111111 !important;
    --color-secondary: #AAAAAA !important;
    --color-border-focus: #6b7280 !important;
    --color-bg: #ffffff;
    --color-bg-card: #f9fafb;
}

[data-theme="gray"] {
    --color-primary: #000000 !important;
    --color-secondary: #AAAAAA !important;
    --color-border-focus: #AAAAAA !important;
    --color-bg: #EEEEEE;
    --color-text: #000000 !important;
}

/* 主题CSS变量 *//* 主题CSS变量 *//* 主题CSS变量 */
/* 更新现有主题CSS类 */
.theme-red { 
    --color-primary: #ef4444; 
    --color-secondary: #dc2626; 
    --color-bg: #fef2f2;
}

.theme-orange { 
    --color-primary: #f97316; 
    --color-secondary: #ea580c; 
    --color-bg: #fff7ed;
}

.theme-yellow { 
    --color-primary: #f59e0b; 
    --color-secondary: #d97706; 
    --color-bg: #fffbeb;
}

.theme-green { 
    --color-primary: #10b981; 
    --color-secondary: #0d9c6b; 
    --color-bg: #ecfdf5;
}

.theme-blue { 
    --color-primary: #3b82f6; 
    --color-secondary: #2563eb; 
    --color-bg: #eff6ff;
}

.theme-cyan { 
    --color-primary: #06b6d4; 
    --color-secondary: #0891b2; 
    --color-bg: #ecfeff;
}

.theme-purple { 
    --color-primary: #8b5cf6; 
    --color-secondary: #7c3aed; 
    --color-bg: #faf5ff;
}

.theme-black { 
    --color-primary: #1f2937; 
    --color-secondary: #111827; 
    --color-bg: #f9fafb;
}

.theme-white { 
    --color-primary: #6b7280; 
    --color-secondary: #4b5563; 
    --color-bg: #ffffff;
}

.theme-gray { 
    --color-primary: #6b7280; 
    --color-secondary: #4b5563; 
    --color-bg: #f3f4f6;
}
        
        /* 人脸128维盐值遮罩层 */
        .face-registration {
            text-align: center;
            padding: 20px;
        }
        .detection-box {
            position: absolute;
            border: 2px solid #00ff00;
            border-radius: 5px;
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { border-color: #00ff00; }
            50% { border-color: #00cc00; }
            100% { border-color: #00ff00; }
        }
        
        /* 地理定位地图 */
        .location-map {
            height: 200px;
            width: 100%;
            border-radius: 8px;
            margin: 10px 0;
        }

        /* 修复：加载状态指示器 */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            backdrop-filter: blur(5px);
        }
        
        .loading-overlay.hidden {
            display: none;
        }
/* 主题CSS变量 *//* 主题CSS变量 *//* 主题CSS变量 */

/* 语言方向配置 - 修复：语言切换即时生效 */
[data-lang="en"], [data-lang="kr"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Arial', sans-serif;
    direction: ltr;
}

[data-lang="kr"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif;
    direction: ltr;
}

[data-lang="zh"] {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    direction: ltr;
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* 未读消息徽章样式 */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-card);
    z-index: 2;
    animation: pulse 2s infinite;
}

/* 有未读消息的会员卡片样式 */
.member-card.has-unread {
    border-left: 3px solid var(--color-primary);
    background: rgba(59, 130, 246, 0.05);
}

.member-card.has-unread:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--color-secondary);
}

/* 未读消息指示器 */
.unread-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
    animation: fadeIn 0.5s ease;
}

.unread-indicator i {
    font-size: 0.7rem;
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
}

/* 新消息通知动画 */
@keyframes newMessage {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.new-message-notification {
    animation: newMessage 0.5s ease-out;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .unread-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: -3px;
        right: -3px;
    }
    
    .unread-indicator {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
}

/* 消息提醒样式 */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    margin-right: 10px;
    transition: all 0.3s ease;
}

.notification-bell:hover {
    background: var(--color-primary);
    color: white;
}

.bell-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-card);
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

.notification-bell:hover .notification-dropdown {
    display: block;
}

.dropdown-header {
    padding: 10px 15px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.dropdown-header button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.dropdown-content {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--color-bg);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--color-primary);
}

.notification-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.notification-content {
    flex: 1;
}

.notification-user {
    font-weight: bold;
    margin-bottom: 5px;
}

.notification-preview {
    color: var(--color-text-light);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* 未读消息徽章样式增强 */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-card);
    z-index: 2;
    animation: pulse 2s infinite;
}

/* 消息提醒动画 */
@keyframes messagePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.new-message-notification {
    animation: messagePulse 0.5s ease-in-out 3;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 80px;
        left: 10px;
        right: 10px;
        width: auto;
    }
    
    .notification-bell {
        margin-right: 5px;
    }
}

/* 添加body滚动锁定类 */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 或者使用更兼容的方案 */
body.scroll-locked {
    overflow: hidden;
    position: relative;
    height: 100vh;
}

/* 设置项确权样式 */
.setting-item {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    border-top-right-radius: 99%;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    background: var(--color-bg);
}

.setting-item.unlocked {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}

.setting-item.unlocked input {
    color:#00AA00 !important;
	border:1px solid #00AA00 !important;
	font-weight:bold;
}

.setting-item.locked {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
}

.setting-item.locked input {
    color:red !important;
	border:1px solid red !important;
	font-weight:bold;
}

.setting-vote-panel {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.vote-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.vote-stat {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.vote-stat.down button,
.vote-stat.down span {
  color: var(--color-danger);
  font-size:16px !important; 
  font-weight:bold !important; 
}

.vote-stat.up button,
.vote-stat.up span{
  color: var(--color-success);
  font-size:16px !important; 
  font-weight:bold !important; 
}

.btn-vote {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.85rem;
}

.btn-vote-up:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.btn-vote-down:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.btn-vote.active {
    font-weight: bold;
}

.btn-vote-up.active {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

.btn-vote-down.active {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

.vote-count {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.vote-percent {
    font-size: 0.8rem;
    color: var(--color-text-light);
    min-width: 40px;
}

.vote-total {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.vote-status {
    text-align: center;
    font-size: 0.85rem;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
}

.status-locked {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
	font-weight:bold !important; 
}

.status-unlocked {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
	font-weight:bold !important; 
}

/* 移动端优化 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-touch-callout: none;
    }
}

/* 应用主容器 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-normal);
}

/* 顶部导航栏 - 修复布局 */
.app-header {
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-normal);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-bg-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color var(--transition-normal);
    text-decoration: none;
}

.logo i {
    font-size: 1.5rem;
    transition: transform var(--transition-normal);
}

.logo:hover i {
    transform: rotate(15deg);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    transition: color var(--transition-normal);
}

.stat-item i {
    color: var(--color-primary);
    font-size: 0.9rem;
    transition: color var(--transition-normal);
}

/* 退出按钮 */
.btn-logout, .btn-profile {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    color: var(--color-text-on-primary);
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-height: 32px;
}

.btn-logout {
    background: linear-gradient(135deg, var(--color-danger), #dc2626);
}

.btn-logout:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-profile {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.btn-profile:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
}

.btn-logout i, .btn-profile i {
    font-size: 0.8rem;
    transition: transform var(--transition-normal);
}

.btn-logout:hover i, .btn-profile:hover i {
    transform: scale(1.1);
}

/* 右侧操作按钮区 */
.header-right {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.action-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--color-border);
    min-width: 60px;
    flex: 1 0 auto;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    text-decoration: none;
    min-height: 44px;
}

.action-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn i {
    font-size: 1rem;
    transition: transform var(--transition-normal);
}

.action-btn:hover i {
    transform: scale(1.1);
}

.action-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 按钮颜色 */
.btn-login { 
    background: linear-gradient(135deg, #10b981, #0d9c6b); 
    color: var(--color-text-on-primary); 
    border: none; 
}
.btn-login:hover { 
    background: linear-gradient(135deg, #0d9c6b, #0a7f55); 
}

.btn-search { 
    background: linear-gradient(135deg, #f59e0b, #d97706); 
    color: var(--color-text-on-primary); 
    border: none; 
}
.btn-search:hover { 
    background: linear-gradient(135deg, #d97706, #b45309); 
}

/* 统计按钮样式 */
.btn-stats {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: var(--color-text-on-primary);
    border: none;
}
.btn-stats:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.btn-settings { 
    background: linear-gradient(135deg, #ff0088, #ff0000); 
    color: var(--color-text-on-primary); 
    border: none; 
}
.btn-settings:hover { 
    background: linear-gradient(135deg, #ff0000, #ff0088); 
}

/* 排序面板 */
.sort-panel {
    background: var(--color-bg-secondary);/**/
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
    position: sticky;
    top: 0px;
    z-index: var(--z-sticky);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

/* 修改排序选项容器为横向三分布局 */
.sort-options {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: nowrap; /* 禁止换行 */
    justify-content: space-between; /* 三等分分布 */
    align-items: stretch;
    width: 100%;
}

/* 修改排序选项项为三等分宽度 */
.sort-option {
    display: flex;
    align-items: center;
    flex: 1; /* 等分宽度 */
    min-width: 0; /* 允许缩小 */
}

.sort-option input[type="radio"] {
    display: none;
}

.sort-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    width: 100%; /* 占满容器宽度 */
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    color: var(--color-text);
    height: 100%; /* 等高排列 */
    min-height: 44px; /* 触摸友好高度 */
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-option label:hover {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sort-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text-on-primary);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.sort-option label i {
    font-size: 0.9rem;
    transition: transform var(--transition-normal);
    flex-shrink: 0; /* 防止图标被压缩 */
}

.sort-option input[type="radio"]:checked + label i {
    transform: scale(1.2);
}


/* 主内容区 */
.main-content {
    flex: 1;
    padding: 0 var(--space-lg) var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-normal);
}

/* 会员卡片布局 - 解决UI变形问题 */
.member-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-md);
    display: flex;
    align-items: stretch;
    gap: var(--space-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-height: 100px;
    width: 100%;
    animation: cardAppear 0.3s ease;
    box-shadow: var(--shadow-sm);
    border-top-right-radius: 99%; 
	box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
}

.member-card[data-user-id] {
    /* 为有未读消息的卡片添加特殊样式 */
}

.member-card.has-unread {
    border-left: 3px solid var(--color-primary);
    background: rgba(59, 130, 246, 0.05);
}

.member-card.has-unread:hover {
    background: rgba(59, 130, 246, 0.1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.member-card:active {
    transform: translateY(0);
}

/* 修复：会员头像区域 */
.member-avatar {
    position: absolute;
    width: 60px;
    height: 60px;
    min-width: 60px;
	box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.5) !important;
    border-radius: 99% !important;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--color-primary);
    transition: all var(--transition-normal);
    display: block;
}

/* 修复头像加载失败时的样式 */
.member-avatar img:before {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    color: var(--color-text);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: bold;
}

/* 添加加载状态样式 */
.avatar-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.member-card:hover .member-avatar img {
    transform: scale(1.05);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
}

.online-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--color-success), #0d9c6b);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
    }
}

/* 修复：会员信息区域 */
.member-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: var(--space-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
    gap: var(--space-sm);
    min-width: 0;
}

.member-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text);
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.member-id {
    font-size: 0.8rem;
    color: var(--color-text-light);
    background: var(--color-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.member-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
    margin-top: var(--space-xs);
}

.member-stats .stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
    padding: 2px 0;
}

.member-stats i {
    font-size: 0.8rem;
    color: var(--color-primary);
    min-width: 16px;
    text-align: center;
}

/* 修复：会员操作按钮区域 - 确保按钮完整显示 */
.member-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-shrink: 0;
    min-width: 150px;
    justify-content: center;
    align-self: center;
}

.member-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-md) !important;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 16px;
    white-space: nowrap;
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    height: 50px;
    text-align: center;
    color: var(--color-text-on-primary);
    border-top-left-radius: 99% !important;
	box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.5) !important;
}

.member-actions .btn i {
    font-size: 16px;
    margin-right: var(--space-xs);
    flex-shrink: 0;
}

.btn-chat {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: var(--color-text-on-primary);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-chat:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-chat:active {
    transform: translateY(0);
}

.btn-details {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: var(--color-text-on-primary);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-details:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-details:active {
    transform: translateY(0);
}

/* 通用按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: var(--radius-full);
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text-on-primary);
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
    height: auto;
    min-height: 28px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--color-text-secondary);
    gap: var(--space-md);
    width: 100%;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin: var(--space-md) 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 修复：滚动加载指示器 */
.scroll-loading {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin: var(--space-md) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    transition: all var(--transition-normal);
}

.scroll-loading.hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.scroll-loading .spinner {
    width: 30px;
    height: 30px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
    color: var(--color-text-secondary);
    gap: var(--space-md);
    width: 100%;
    animation: fadeIn var(--transition-normal);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin: var(--space-md) 0;
}

.empty-state i {
    font-size: 3rem;
    color: var(--color-border);
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.empty-state:hover i {
    transform: scale(1.1);
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
    animation: slideUp var(--transition-normal);
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
    color: var(--color-text-light);
    animation: slideUp var(--transition-normal) 0.1s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 全屏遮罩层样式 ==================== */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: overlayFadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes overlayFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.overlay-content {
    background: var(--color-bg-secondary);
    border-radius: 0;
    max-width: 500px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    animation: overlaySlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-xl);
    border: 0px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: relative;
		/* 防止滚动穿透 */
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
}

@keyframes overlaySlideUp {
    from { 
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 1;
    height: 50px;
	border-radius:5px;
	border-top-left-radius:101%;
}

.overlay-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.overlay-header h2 i {
    font-size: 1.3rem;
    flex-shrink: 0;
	color:var(--color-primary);
}

.overlay-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--color-text-on-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.overlay-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.overlay-close:active {
    transform: rotate(90deg) scale(1);
}

.overlay-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(100% - 50px);
    flex: 1;
    -webkit-overflow-scrolling: touch;
		/* 防止滚动穿透 */
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
}

/* 修复：聊天界面样式 */
#overlayChat .overlay-content {
    max-width: 500px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
		/* 防止滚动穿透 */
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
}

#overlayChat .overlay-body {
	padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
		/* 防止滚动穿透 */
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
}

/* 修复：聊天用户信息 */
.chat-user-info {
	background-color: rgba(255, 255, 255, 0.1) !important; 
    height: 20px;
}

.user-avatar-small {
    max-width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 0px solid var(--color-primary);
    background: var(--color-bg);
}

/* 修复聊天窗口头像显示 */
.user-avatar-small img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 99%;
}

.user-status {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    font-weight: 500;
}

.user-status i {
    font-size: 0.7rem;
    margin-right: var(--space-xs);
    color: var(--color-success);
}

.user-status[data-status="offline"] i {
    color: var(--color-text-light);
}

/* 修复：聊天容器 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-bg);
    overflow: hidden;
    flex: 1;
    position: relative;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    min-height: 200px;
    position: relative;
		/* 防止滚动穿透 */
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
}

.chat-message {
    max-width: 85%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    position: relative;
    animation: messageSlideIn 0.3s ease;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    box-shadow: var(--shadow-sm);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-me {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text-on-primary);
    border-bottom-right-radius: var(--radius-0);
    margin-left: auto;
}

.message-other {
    align-self: flex-start;
    background: var(--color-bg-secondary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: var(--radius-0);
    margin-right: auto;
}

.message-content {
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 0.95rem;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

/* 修复：聊天图片消息样式 */
.chat-image-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.chat-image-message img {
    max-width: 300px;
    max-height: 300px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform var(--transition-normal);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.message-me .chat-image-message img {
    border-color: rgba(255, 255, 255, 0.3);
}

.chat-image-message img:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.image-caption button {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

/* 修复：聊天文件消息样式 */
.message-other .chat-file-message {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.message-time {
    font-size: 0.7rem;
    text-align: right;
    margin-top: var(--space-xs);
    opacity: 0.7;
    font-weight: 500;
}

.message-other .message-time {
    color: var(--color-text-secondary);
}

.message-me .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* 修复：聊天工具栏 */
.chat-toolbar {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    justify-content: flex-start;
    align-items: center;
}

.chat-toolbar-btn {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-normal);
    color: var(--color-text);
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.chat-toolbar-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.chat-toolbar-btn:active {
    transform: translateY(0);
}

.chat-toolbar-btn i {
    font-size: 0.9rem;
}

/* 修复：聊天输入区 */
.chat-input {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
    position: relative;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-normal);
    background: var(--color-bg-input);
    color: var(--color-text);
    min-height: 44px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    border-radius: 9px !important;
}

.chat-input input:focus {
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-input input:disabled {
    background: var(--color-bg);
    color: var(--color-text-disabled);
    cursor: not-allowed;
}

.chat-input button {
    padding: var(--space-sm) var(--space-lg);
    white-space: nowrap;
    min-width: 80px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text-on-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.chat-input button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
}

.chat-input button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 用户详情样式 */
.user-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    animation: fadeIn var(--transition-normal);
}

.detail-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.detail-avatar img {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal);
    display: block;
}

.detail-avatar img:hover {
    transform: scale(1.05);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.detail-info h3 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--transition-normal);
    align-items: center;
    min-height: 44px;
}

.detail-item i {
    color:var(--color-primary);
}

.detail-item:hover {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-primary);
    padding: var(--space-sm) var(--space-md);
}

.detail-label {
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex: 1;
}

.detail-label i {
    color: var(--color-primary);
    font-size: 0.8rem;
    min-width: 16px;
    text-align: center;
}

.detail-value {
    color: var(--color-text);
    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
    flex: 2;
    font-size: 0.95rem;
    line-height: 1.4;
    padding-left: var(--space-sm);
}

/* 表单样式 */
.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--color-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--color-bg-input);
    color: var(--color-text);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--color-bg);
    color: var(--color-text-disabled);
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.4;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
    display: block;
    line-height: 1.3;
}

/* 头像上传样式 */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.avatar-preview {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-bg), var(--color-border));
    border: 3px dashed var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-style: solid;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-normal);
    display: block;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-on-primary);
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: var(--radius-full);
}

.avatar-preview:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-overlay i {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.avatar-upload-overlay span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* 消息通知 */
.notification {
    background: #000;
    position: fixed;
    bottom: 25px;
    right: 20px;
    padding: var(--space-md) var(--space-lg);
    border-radius: 29%;
    font-weight: 500;
    z-index: var(--z-toast);
    animation: notificationSlideIn 0.3s ease, notificationFadeOut 0.3s ease 3.7s forwards;
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    word-wrap: break-word;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: 50px;
    font-size: 18px !important;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

.notification i {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.notification.success {
    color: #00FF00;
    border-left: 6px solid #00FF00;
}

.notification.error {
    color: #FFFFFF;
    border-left: 6px solid #FF0000;
}

.notification.warning {
    color: #FFF000;
    border-left: 6px solid #FFF000;
}

.notification.info {
    color: red;
    border-left: 6px solid var(--color-info);
}

/* 搜索结果显示 */
.search-result {
    margin-top: var(--space-lg);
    animation: fadeIn var(--transition-normal);
}

.search-result-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    animation: slideIn 0.3s ease;
    transition: all var(--transition-normal);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-avatar img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--color-primary);
    transition: transform var(--transition-normal);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: block;
}

.search-result-card:hover .result-avatar img {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.result-info {
    flex: 1;
    min-width: 0;
    padding: var(--space-sm) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-info h4 {
    margin: 0 0 var(--space-xs) 0;
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.result-details {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-xs);
}

.result-details p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    line-height: 1.4;
}

.result-details i {
    color: var(--color-primary);
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.result-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
    align-items: center;
    margin-left: auto;
}

.result-actions .btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text-on-primary);
    box-shadow: var(--shadow-sm);
}

.result-actions .btn-small:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
}

.result-actions .btn-small:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.result-actions .btn-small i {
    font-size: 0.8rem;
    margin-right: var(--space-xs);
}

.search-result-empty {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    color: var(--color-text-light);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    animation: fadeIn var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    box-shadow: var(--shadow-sm);
}

.search-result-empty i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    color: var(--color-border);
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.search-result-empty:hover i {
    transform: scale(1.1);
    opacity: 0.7;
}

.search-result-empty p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

/* 标签页样式 */
.tab-container {
    width: 100%;
}

.tab-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-sm);
}

.tab-btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all var(--transition-normal);
    color: var(--color-text);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-primary);
}

.tab-btn.active {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border-bottom: 2px solid var(--color-primary);
}

.tab-content {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.tab-content.active {
    display: block;
}

/* 人脸识别相关样式 */
/* 人脸识别相关样式 */
.face-registration, .face-login {
    text-align: center;
    padding: var(--space-md) 0;
}

/* 圆形摄像头区域 - 占屏幕宽度91% */
.video-container {
	width: 100vw; /* 占屏幕宽度91% */
	max-width: 500px; /* 最大宽度限制 */
	aspect-ratio: 1 / 1; /* 保持正方形 */
	position: relative;
	overflow: hidden;
	margin: 0 auto;
    background: #000;
}
.video-container video,
.video-container canvas {
	position: absolute;
	top: 0;
	left: 0;
	object-fit: cover;
	/*transform: scaleX(-1); 镜像 */
}
.video-container video {
	z-index: 1;
}
.video-container canvas {
	z-index: 99;
}
.video-container span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 999;
	font-size:18px;
	color:white;
}
/* 定义关键帧动画 */       
@keyframes border-pulse {
	0%, 100% { 
		border-color: var(--color-primary);
		box-shadow: 
			var(--shadow-lg),
			inset 0 0 40px rgba(247, 131, 172, 0.4);
	}
	50% { 
		border-color: var(--color-bg);
		box-shadow: 
			var(--shadow-lg),
			inset 0 0 50px rgba(247, 131, 172, 0.6);
	}
}
/* 强制圆形 */
.video-container,
.video-container video,
.video-container canvas {
	border-radius: 50% !important;
	border: 3px solid red; /* 初始边框颜色 */
	animation: border-pulse 3s infinite;
	aspect-ratio: 1 / 1; /* 保持正方形 */
	width: 100% !important;
	height: 100% !important;
}

.success-message {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
}

.error-message {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
}

/* 地理位置地图 */
.location-map {
    height: 200px;
    width: 100%;
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.location-mini-map {
    height: 120px;
    width: 100%;
    border-radius: var(--radius-md);
    margin: var(--space-xs) 0;
    overflow: hidden;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.location-info {
    padding: var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin: var(--space-sm) 0;
    color: var(--color-text);
    font-size: 0.9rem;
}

/* 修复：加载状态指示器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: var(--space-md);
    color: var(--color-text-secondary);
    font-size: 1rem;
}

/* 修复：滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: var(--radius-full);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

/* 修复：表单验证样式 */
input:invalid, textarea:invalid, select:invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input:valid, textarea:valid, select:valid {
    border-color: var(--color-success);
}

/* 修复：无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 修复：高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --color-text: #000000;
        --color-bg: #ffffff;
    }
}

/* 修复：深色模式支持 */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --color-bg: #1a202c;
        --color-bg-secondary: #2d3748;
        --color-text: #e2e8f0;
        --color-text-secondary: #a0aec0;
        --color-border: #4a5568;
    }
}

/* 打印样式 */
@media print {
    .app-header,
    .sort-panel,
    .action-buttons,
    .overlay-close,
    .chat-input,
    .notification {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .member-card {
        break-inside: avoid;
        page-break-inside: avoid;
		position: relative;
    }
}

/* 修复：IE11兼容性 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .app-container {
        display: block;
    }
    
    .members-list {
        display: block;
    }
    
    .member-card {
        display: block;
        margin-bottom: var(--space-md);
		position: relative;
    }
}

/* 修复：触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .member-card:hover {
        transform: none;
    }
    
    .action-btn:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* 增加触摸目标大小 */
    .btn, .action-btn, .member-actions .btn {
        min-height: 50px;
        min-width: 50px;
		border-radius:50px;
    }
}

/* 修复：加载动画优化 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.member-card {
    animation: fadeInUp 0.6s ease;
	position: relative;
}

/* 修复：骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* 修复：错误边界样式 */
.error-boundary {
    padding: var(--space-xl);
    text-align: center;
    background: var(--color-bg);
    border: 1px solid var(--color-danger);
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
}

.error-boundary h3 {
    color: var(--color-danger);
    margin-bottom: var(--space-md);
}

.error-boundary pre {
    background: var(--color-bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    text-align: left;
    font-size: 0.8rem;
}

/* 修复：主题切换平滑过渡 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 修复：焦点样式 */
button:focus-visible,
/*input:focus-visible,*/
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 修复：禁用状态样式 */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 修复：选择文本样式 */
::selection {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
}

/* 修复：占位符文本样式 */
::placeholder {
    color: var(--color-text-light);
    opacity: 1;
}

/* 修复：滚动行为 */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* 修复：最后确保所有修复生效 */
body {
    font-family: inherit;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* 确保所有交互元素都有正确的手型光标 */
button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"] {
    cursor: pointer;
}

/* 修复：确保所有表单元素继承字体 */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* 修复：确保链接颜色一致 */
a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 修复：确保代码块样式 */
code {
    background: var(--color-bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* 修复：确保引号样式 */
blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-md);
    margin-left: 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

/* 修复：确保列表样式 */
ul, ol {
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-xs);
}

/* 修复：确保表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-md);
}

th, td {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    text-align: left;
}

th {
    background: var(--color-bg-secondary);
    font-weight: 600;
}

/* 修复：确保标题层次结构 */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--space-md);
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* 修复：确保段落间距 */
p {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

/* 修复：确保水平规则样式 */
hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-lg) 0;
}

/* 最后的质量保证检查 */
@media (min-resolution: 192dpi) {
    /* 高DPI屏幕优化 */
    .logo i,
    .action-btn i,
    .member-stats i {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 未读消息徽章 */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-card);
    z-index: 2;
    animation: pulse 2s infinite;
}



/*移动768px适配*/
@media (max-width: 768px) {
/* 排序面板 *//* 768px *//* 开始 */
    .sort-options {
        gap: var(--space-xs); /* 移动端更小间距 */
    }
    
    .sort-option label {
        padding: var(--space-sm);
        font-size: 0.85rem;
        min-height: 40px;
    }
    
    .sort-option label i {
        font-size: 0.8rem;
    }
/* 排序面板 *//* 768px *//* 结束 */


	/* 防止滚动穿透 */
	.fullscreen-overlay {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .overlay-body {
		overscroll-behavior-y: contain;
    }
	/* 防止iOS弹性滚动 */
    body.scroll-locked {
        overscroll-behavior-y: none;
    }

    .app-header {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn i {
        margin: 0;
    }  
    
    .main-content {
        padding: 0 var(--space-sm) var(--space-lg);
    }
    
    .members-list {
        grid-template-columns: 1fr;
    }
    
    /* 移动端会员卡片布局 */
    .member-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: var(--space-sm);
        padding: var(--space-md);
		position: relative;
    }
    
    .member-avatar {
        margin: 0 auto;
    }
    
    .member-info {
        padding-right: 0;
        text-align: center;
    }
    
    .member-header {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .member-stats {
        justify-content: center;
    }
    
    .member-actions {
        min-width: 100%;
        justify-content: center;
        margin-top: var(--space-sm);
        flex-direction: row;
    }
    
    .member-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .notification {
        left: var(--space-sm);
        right: var(--space-sm);
        max-width: none;
    }
    
    .overlay-content {
		max-width: 500px;
		width: 100%;
		max-height: 100vh;
		/* 防止滚动穿透 */
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
    }
}


/*移动480px适配*/
.status-message {
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== Redis统计样式 ==================== */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    height: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    overflow-y: auto;
    flex: 1;
    padding: var(--space-sm);
}

.stats-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.stats-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.stats-card-header i {
    font-size: 1.2rem;
    color: var(--color-primary);
}

.stats-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 600;
}

.stats-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    text-align: right;
}

/* 数值颜色根据状态变化 */
.stat-value[data-status="good"] {
    color: var(--color-success);
}

.stat-value[data-status="warning"] {
    color: var(--color-warning);
}

.stat-value[data-status="danger"] {
    color: var(--color-danger);
}

/* 加载动画 */
.stats-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
    color: var(--color-text-light);
}

.stats-loading .spinner {
    width: 30px;
    height: 30px;
}

/* 错误状态 */
.stats-error {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-danger);
}

.stats-error i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}
/* 确保所有修复在文档加载后应用 */
document.addEventListener('DOMContentLoaded', function() {
    console.log('✅ style.css 所有修复已应用');
});