/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

/* 主布局 */
.wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    background-color: #34495e;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sidebar-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sidebar-header .sidebar-subtitle {
    font-size: 12px;
    color: #bdc3c7;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header .sidebar-subtitle {
    display: none;
}

.sidebar.collapsed .sidebar-header h3 {
    font-size: 16px;
}

.sidebar-header i {
    margin-right: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0 20px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav .nav {
    width: 100%;
}

.sidebar-nav .nav-item {
    position: relative;
}

.sidebar-nav .nav-link {
    color: #ecf0f1;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.sidebar-nav .nav-link span {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar-nav .nav-link:hover {
    background-color: #34495e;
    border-left-color: #3498db;
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background-color: #3498db;
    border-left-color: #2980b9;
    color: #fff;
}

.sidebar-nav .nav-link i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* 侧边栏容器样式 */
.sidebar-container {
    width: 250px;
    transition: all 0.3s ease;
}

.wrapper:has(.sidebar.collapsed) .sidebar-container {
    width: 60px;
}

/* 导航分组标题样式 */
.sidebar-nav .nav-group-header {
    color: #95a5a6;
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 20px 0 8px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-nav .nav-group-header:first-child {
    border-top: none;
    margin-top: 0;
}

.sidebar-nav .nav-group-header span {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav .nav-group-header {
    display: none;
}

.sidebar-nav .nav-group-header i {
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.7;
}

/* 主内容区域 */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部导航栏 */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-name {
    margin-right: 15px;
    font-weight: 500;
    color: #333;
}

.user-info .dropdown-toggle {
    color: #333;
    text-decoration: none;
}

.user-info .dropdown-toggle:hover {
    color: #3498db;
}

/* 页面内容 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f7fa;
}

.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* 统计卡片 */
.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-right: 20px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.card-body {
    padding: 24px;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.table tbody td {
    vertical-align: middle;
    text-align: center;
}

.table-hover tbody tr:hover {
    background-color: #f5f7fa;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-success {
    background-color: #10b981;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-warning {
    background-color: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: #06b6d4;
    color: #ffffff;
}

.btn-info:hover {
    background-color: #0891b2;
}

.btn-light {
    background-color: #f1f5f9;
    color: #374151;
}

.btn-light:hover {
    background-color: #e2e8f0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    width: 100%;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-label {
    font-weight: normal;
    color: #4b5563;
    cursor: pointer;
}

.form-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    display: block;
}

/* 分页样式 */
.pagination {
    margin-top: 24px;
    justify-content: center;
    display: flex;
    gap: 8px;
}

.page-link {
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.page-link:hover {
    color: #3b82f6;
    background-color: #f8fafc;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.page-item.active .page-link {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #ffffff;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box .form-control {
    flex: 1;
    max-width: 350px;
    min-width: 200px;
}

.search-box .btn {
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        z-index: 1000;
        height: 100vh;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main {
        margin-left: 0;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box .form-control {
        max-width: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页面加载动画 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.page-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 消息提示 */
.alert {
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.alert-error {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.alert-warning {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.alert-info {
    color: #0369a1;
    background-color: #e0f2fe;
    border-color: #bae6fd;
}

/* 通知容器样式 */
.notifications-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 350px;
    width: 100%;
}

.notifications-container .alert {
    margin-bottom: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 操作日志页面样式 */
.log-level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.log-level.success {
    background-color: #d4edda;
    color: #155724;
}

.log-level.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* 数据备份页面样式 */
.backup-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.backup-status.success {
    background-color: #d4edda;
    color: #155724;
}

.backup-status.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.backup-status.running {
    background-color: #fff3cd;
    color: #856404;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1a1;
}

/* 隐藏类 */
.hidden {
    display: none;
}

/* 显示类 */
.visible {
    display: block;
}

/* 图片上传预览样式 */
.image-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

.image-upload-preview .image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
}

.image-upload-preview .image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-preview .image-preview-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-preview .image-preview-item .delete-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* 隐藏原始文件输入 */
input[type="file"] {
    display: none;
}

/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 400px;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.login-body {
    padding: 30px 20px;
}

.login-page .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-page .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-page .alert {
    margin-bottom: 20px;
    border-radius: 6px;
    padding: 12px;
}

.login-page .form-check {
    margin-bottom: 20px;
}

.login-page .form-check-label {
    color: #666;
    font-size: 14px;
}

.login-page .forgot-password {
    text-align: center;
    margin-top: 15px;
}

.login-page .forgot-password a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.login-page .forgot-password a:hover {
    text-decoration: underline;
}

.login-error {
    display: none;
}

.login-error.show {
    display: block;
}

/* 回滚页面样式 */
#rollbackProgressBar {
    width: 0%;
    transition: width 0.3s ease;
}

.step-actions button.hidden {
    display: none;
}

/* 回滚向导样式 */
.rollback-wizard {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 24px;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 3px solid #fff;
}

.step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.step.active .step-label {
    color: #3b82f6;
    font-weight: 600;
}

.step.completed .step-number {
    background-color: #10b981;
    color: #fff;
}

.step.completed .step-label {
    color: #10b981;
}

.step-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-panel.active {
    display: block;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.step-actions .btn {
    min-width: 120px;
}

.step-actions .btn-prev {
    background-color: #e2e8f0;
    color: #374151;
}

.step-actions .btn-prev:hover {
    background-color: #cbd5e1;
    color: #1f2937;
}

/* 用户头像样式 */
.user-avatar-sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background-color: #f1f5f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-avatar-sm:hover {
    transform: scale(1.1);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-avatar-md {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background-color: #f1f5f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    background-color: #f1f5f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* 用户信息单元格 */
.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.user-info-cell .user-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
}

.user-info-cell .user-phone {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* 排行榜样式 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background-color: #f1f5f9;
    transform: translateX(4px);
}

.ranking-item.rank-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
}

.ranking-item.rank-2 {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #94a3b8;
}

.ranking-item.rank-3 {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #f87171;
}

.ranking-item .rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

.ranking-item .rank .rank-number {
    font-size: 14px;
}

.ranking-item .avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-item .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-item .avatar i {
    font-size: 18px;
    color: #9ca3af;
}

.ranking-item .info {
    flex: 1;
    min-width: 0;
}

.ranking-item .info .name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item .info .team,
.ranking-item .info .members {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item .profit {
    font-weight: 600;
    color: #10b981;
    font-size: 14px;
    white-space: nowrap;
}

/* 等级分布样式 */
.level-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-item .level-name {
    width: 80px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
    flex-shrink: 0;
}

.level-item .level-bar {
    flex: 1;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.level-item .level-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.level-item .level-count {
    width: 50px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
    flex-shrink: 0;
}

/* 图片懒加载占位符 */
.img-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #9ca3af;
    font-size: 12px;
}

/* 图片加载动画 */
.img-loading {
    position: relative;
    overflow: hidden;
}

.img-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 图片加载失败样式 */
.img-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fef2f2;
    color: #ef4444;
    font-size: 12px;
}

.img-error::before {
    content: '\f06e';
    font-family: 'FontAwesome';
    margin-right: 4px;
}

/* 响应式图片 */
@media (max-width: 1200px) {
    .user-avatar-sm {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .ranking-item .avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}

@media (max-width: 992px) {
    .user-info-cell {
        gap: 8px;
    }
    
    .user-info-cell .user-name {
        font-size: 13px;
    }
    
    .user-info-cell .user-phone {
        font-size: 11px;
    }
    
    .ranking-item {
        padding: 10px;
        gap: 10px;
    }
    
    .ranking-item .info .name {
        font-size: 13px;
    }
    
    .ranking-item .profit {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .user-avatar-sm {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    
    .user-info-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .ranking-item .avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .ranking-item .rank {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .ranking-item .avatar i {
        font-size: 14px;
    }
    
    .level-item .level-name {
        width: 60px;
        font-size: 12px;
    }
    
    .level-item .level-count {
        width: 40px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .user-avatar-sm {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        border-width: 1px;
    }
    
    .ranking-item {
        padding: 8px;
        gap: 8px;
    }
    
    .ranking-item .avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    
    .ranking-item .info .name {
        font-size: 12px;
    }
    
    .ranking-item .info .team,
    .ranking-item .info .members {
        font-size: 11px;
    }
    
    .ranking-item .profit {
        font-size: 12px;
    }
}

/* 排行榜点击展开样式 */
.ranking-item.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-item.clickable:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-item .expand-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.ranking-item .expand-icon i {
    font-size: 12px;
}

/* 团队成员容器样式 */
.team-members-container {
    display: none;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-top: -8px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.members-loading,
.members-empty,
.members-error {
    text-align: center;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
}

.members-error {
    color: #ef4444;
}

/* 内联成员列表样式 */
.inline-member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.member-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar i {
    font-size: 14px;
    color: #9ca3af;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
}

.view-all-members {
    text-align: center;
    padding: 10px;
    color: #3b82f6;
    cursor: pointer;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
}

.view-all-members:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 超小头像样式 */
.user-avatar-xs {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background-color: #f1f5f9;
}