/**
 * 用户信息展示小工具样式 - 仿活跃用户UI设计
 * 创享子主题Clean版 - 用户信息小工具专用样式
 *
 * @since 1.2.0
 * @author 创享子主题
 */

/* ========== CSS变量定义 ========== */
:root {
    --cxzzt-primary-color: #007cba;
    --cxzzt-secondary-color: #ffffff;
    --cxzzt-success-color: #28a745;
    --cxzzt-warning-color: #ffc107;
    --cxzzt-danger-color: #dc3545;
    --cxzzt-info-color: #17a2b8;
    --cxzzt-text-color: #333;
    --cxzzt-text-muted: #666;
    --cxzzt-text-light: #999;
    --cxzzt-border-color: #e1e1e1;
    --cxzzt-border-radius: 12px;
    --cxzzt-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --cxzzt-shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --cxzzt-transition: all 0.3s ease;
    --cxzzt-bg-light: #f8f9fa;
}

/* ========== 模块化标题栏样式 ========== */
.cxzzt-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
}

.cxzzt-title-group {
    flex: 1;
}

.cxzzt-main-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cxzzt-text-color);
    margin: 0;
    line-height: 1.4;
}

.cxzzt-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--cxzzt-text-muted);
    margin-left: 8px;
}

.cxzzt-module-btn {
    background: var(--cxzzt-primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--cxzzt-transition);
    white-space: nowrap;
}

.cxzzt-module-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ========== 模块分离与间距 ========== */

/* 活跃用户模块独立容器 */
.cxzzt-active-users-module {
    margin-bottom: 0; /* 移除底部间距 */
    padding-bottom: 0; /* 移除底部内边距 */
    /* 移除分割线 */
    position: relative;
    overflow: hidden; /* 防止悬停效果影响下方模块 */
}

/* 创作者中心模块独立容器 */
.cxzzt-creator-center-module {
    margin-top: 0; /* 移除顶部间距 */
    margin-bottom: 24px;
    position: relative;
    z-index: 1; /* 确保不受上方模块影响 */
}

/* 收益排行榜模块独立容器 */
.cxzzt-ranking-module {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

/* 底部区域容器 */
.cxzzt-bottom-section {
    margin-top: 0; /* 移除顶部间距 */
    position: relative;
    z-index: 1;
    clear: both; /* 清除浮动影响 */
}

/* 最后一个模块移除底部边距 */
.cxzzt-creator-center-module:last-child,
.cxzzt-ranking-module:last-child {
    margin-bottom: 0;
}

/* ========== 独立标题栏样式（旧版本，保留兼容性） ========== */
.cxzzt-title-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--cxzzt-shadow);
}

.cxzzt-title-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cxzzt-title-bar-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cxzzt-title-bar-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cxzzt-title-bar-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--cxzzt-transition);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cxzzt-title-bar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.cxzzt-title-bar-btn.cxzzt-users-btn {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
}

.cxzzt-title-bar-btn.cxzzt-users-btn:hover {
    background: rgba(52, 152, 219, 0.5);
}

.cxzzt-title-bar-btn.cxzzt-creator-btn {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.5);
}

.cxzzt-title-bar-btn.cxzzt-creator-btn:hover {
    background: rgba(231, 76, 60, 0.5);
}

/* 暗色主题适配 */
.dark-theme {
    --cxzzt-primary-color: #4a9eff;
    --cxzzt-secondary-color: #2a2a2a;
    --cxzzt-text-color: #e1e1e1;
    --cxzzt-text-muted: #999;
    --cxzzt-text-light: #777;
    --cxzzt-border-color: #404040;
    --cxzzt-shadow: 0 2px 12px rgba(0,0,0,0.3);
    --cxzzt-shadow-hover: 0 4px 20px rgba(0,0,0,0.4);
    --cxzzt-bg-light: #1a1a1a;
}

/* ========== 仅针对用户信息小工具的容器背景移除 ========== */
.widget_cxzzt_user_info_widget,
.widget.widget_cxzzt_user_info_widget,
.zib-widget.cxzzt_user_info_widget,
div.zib-widget.cxzzt_user_info_widget {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    /* 添加上下间隔，保持左右无间距 */
    margin: 24px 0 !important;
}

/* 移除用户信息小工具的伪元素装饰 */
.widget_cxzzt_user_info_widget::before,
.widget_cxzzt_user_info_widget::after,
.zib-widget.cxzzt_user_info_widget::before,
.zib-widget.cxzzt_user_info_widget::after {
    display: none !important;
}

/* ========== 主容器样式 ========== */
.cxzzt-user-info-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--cxzzt-text-color);
    line-height: 1.5;
    /* 移除背景、圆角、内边距和阴影 */
    /* 确保容器内部有适当的间距 */
    margin-top: 0;
    margin-bottom: 0;
}

.cxzzt-user-info-container * {
    box-sizing: border-box;
}

/* ========== 底部区域布局 ========== */
.cxzzt-bottom-section {
    display: flex;
    gap: 20px;
    margin-top: 16px; /* 减少间距，避免与用户模块间隔过大 */
}

.cxzzt-bottom-left {
    flex: 2;
    min-width: 0;
}

.cxzzt-bottom-right {
    flex: 1;
    min-width: 280px;
}

/* ========== 活跃用户区域 ========== */
.cxzzt-active-users-section {
    margin-bottom: 24px;
}

.cxzzt-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cxzzt-section-title-group {
    flex: 1;
}

.cxzzt-section-main-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--cxzzt-text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cxzzt-section-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--cxzzt-text-muted);
    line-height: 1.4;
}

.cxzzt-section-more {
    font-size: 12px;
    color: var(--cxzzt-primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.cxzzt-section-more:hover {
    text-decoration: underline;
}

.cxzzt-active-users-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    position: relative;
    z-index: 2;
    /* 确保网格容器不会影响下方模块 */
    contain: layout style; /* CSS containment 优化性能 */
}

.cxzzt-user-card {
    background: var(--cxzzt-secondary-color);
    border-radius: var(--cxzzt-border-radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--cxzzt-shadow);
    transition: var(--cxzzt-transition);
    position: relative;
    overflow: hidden; /* 保持hidden，防止内容溢出 */
    min-height: 200px;
    display: flex;
    flex-direction: column;
    /* 移除justify-content，使用固定布局 */
    /* 预设边框，避免悬停时尺寸变化 */
    border: 2px solid transparent;
    /* 隔离悬停效果，防止影响其他元素 */
    isolation: isolate;
    contain: layout style; /* CSS containment */
}

.cxzzt-user-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 用户卡片悬停状态 - 仿截图样式 */
.cxzzt-user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 87, 87, 0.3);
    border-color: #ff5757; /* 只改变颜色，不改变尺寸 */
    background: white;
    position: relative;
    /* 保持overflow: hidden，防止布局移位 */
    cursor: pointer !important; /* 强制显示手型光标 */
    transition: all 0.3s ease;
}

/* 悬停状态的顶部红色装饰背景 */
.cxzzt-user-card:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #ff5757 0%, #ff7b7b 100%);
    border-radius: 12px 12px 50% 50%;
    z-index: 1;
    /* 移除高度变化动画，使用透明度动画 */
    animation: cxzzt-bg-fade-in 0.3s ease;
}

/* 真实的个人主页按钮 */
.cxzzt-homepage-button {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    height: 28px;
    background: linear-gradient(135deg, #ff5757 0%, #ff7b7b 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(255, 87, 87, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    /* 默认隐藏 */
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* 悬停时显示按钮 */
.cxzzt-user-card:hover .cxzzt-homepage-button {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    animation: cxzzt-btn-fade-in 0.2s ease 0.1s both;
}

/* 按钮本身的悬停效果 */
.cxzzt-homepage-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 87, 87, 0.4);
}

/* 悬停状态下的头像样式 */
.cxzzt-user-card:hover .cxzzt-user-card-avatar {
    position: relative;
    z-index: 2;
    /* 移除margin-top变化，保持布局稳定 */
    transition: all 0.3s ease;
}

.cxzzt-user-card:hover .cxzzt-user-card-avatar img {
    border-color: white; /* 只改变颜色，不改变尺寸 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 悬停状态下的用户名高亮 */
.cxzzt-user-card:hover .cxzzt-user-card-name {
    color: #333;
    font-weight: 700;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

/* 悬停状态下的标签样式 */
.cxzzt-user-card:hover .cxzzt-user-card-badges {
    position: relative;
    z-index: 2;
}

/* 悬停状态下的统计区域 */
.cxzzt-user-card:hover .cxzzt-user-card-stats {
    position: relative;
    z-index: 2;
    margin-bottom: 12px; /* 保持原始边距 */
    transition: all 0.3s ease;
}

/* 悬停状态下的统计数值高亮 */
.cxzzt-user-card:hover .cxzzt-stat-value {
    color: #ff5757;
    font-weight: 700;
    transition: all 0.3s ease;
}

/* 悬停状态下的用户描述 - 不隐藏，保持高度稳定 */
.cxzzt-user-card:hover .cxzzt-user-card-description {
    /* 不使用display:none，改为透明度和z-index控制 */
    opacity: 0;
    z-index: 0; /* 让底部按钮覆盖在上方 */
    transition: opacity 0.3s ease;
}

.cxzzt-user-card-avatar {
    position: relative;
    margin: 10px auto 12px; /* 预设top margin，避免悬停时变化 */
    width: 60px;
    height: 60px;
}

.cxzzt-user-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--cxzzt-border-color); /* 预设4px边框 */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cxzzt-user-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--cxzzt-text-color);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 用户标签容器 */
.cxzzt-user-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

/* 用户徽章样式 */
.cxzzt-user-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    color: white;
}

/* 用户角色标签（会员等级） */
.cxzzt-user-role-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    background: var(--cxzzt-info-color);
    color: white;
}

/* 会员等级特殊样式 */
.cxzzt-user-role-tag.membership-normal {
    background: #6c757d;
    color: white;
}

.cxzzt-user-role-tag.membership-basic {
    background: #28a745;
    color: white;
}

.cxzzt-user-role-tag.membership-silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.cxzzt-user-role-tag.membership-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.cxzzt-user-role-tag.membership-platinum {
    background: linear-gradient(135deg, #e5e4e2, #f8f8ff);
    color: #333;
}

.cxzzt-user-role-tag.membership-diamond {
    background: linear-gradient(135deg, #b9f2ff, #00bfff);
    color: #333;
}

.cxzzt-user-role-tag.membership-premium {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.cxzzt-user-role-tag.membership-admin {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.cxzzt-user-role-tag.membership-editor {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
}

.cxzzt-user-role-tag.membership-author {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

.cxzzt-user-role-tag.membership-contributor {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
    color: #333;
}

.cxzzt-user-role-tag.membership-default {
    background: var(--cxzzt-info-color);
    color: white;
}

/* 徽章颜色样式 */
.cxzzt-user-badge.badge-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.cxzzt-user-badge.badge-red {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.cxzzt-user-badge.badge-green {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.cxzzt-user-badge.badge-blue {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

.cxzzt-user-badge.badge-purple {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
}

.cxzzt-user-badge.badge-orange {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
    color: #333;
}

/* 统计数据容器 */
.cxzzt-user-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--cxzzt-border-color);
    border-bottom: 1px solid var(--cxzzt-border-color);
}

/* 统计项目 */
.cxzzt-user-stat-item {
    text-align: center;
    position: relative;
}

/* 统计项目之间的分割线 */
.cxzzt-user-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background-color: #e1e1e1;
}

/* 统计标签 */
.cxzzt-stat-label {
    font-size: 10px;
    color: var(--cxzzt-text-light);
    margin-bottom: 2px;
    line-height: 1.2;
}

/* 统计数值 */
.cxzzt-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--cxzzt-text-color);
    line-height: 1.2;
}

/* 用户描述 */
.cxzzt-user-card-description {
    font-size: 11px;
    color: var(--cxzzt-text-muted);
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    line-height: 1.3;
    border-top: 1px solid #e1e1e1;
    /* 为悬停状态准备 */
    position: relative;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cxzzt-no-data {
    text-align: center;
    color: var(--cxzzt-text-muted);
    padding: 40px 20px;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* ========== 创作者中心样式 ========== */
.cxzzt-creator-center {
    background: var(--cxzzt-secondary-color);
    border-radius: var(--cxzzt-border-radius);
    padding: 20px;
    box-shadow: var(--cxzzt-shadow);
    height: fit-content;
    /* 保护样式，防止受上方模块影响 */
    position: relative;
    z-index: 1;
    isolation: isolate;
    contain: layout style;
}

.cxzzt-creator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cxzzt-creator-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--cxzzt-text-color);
}

.cxzzt-creator-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--cxzzt-transition);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.cxzzt-creator-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cxzzt-creator-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cxzzt-creator-main {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    position: relative;
}

/* 添加装饰性背景元素 */
.cxzzt-creator-main::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -8px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    z-index: 0;
}

.cxzzt-creator-main::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 119, 198, 0.08) 0%, rgba(120, 219, 255, 0.08) 100%);
    border-radius: 50%;
    z-index: 0;
}

.cxzzt-creator-title-text {
    font-size: 14px;
    color: var(--cxzzt-text-color);
    margin-bottom: 6px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.cxzzt-creator-big-number {
    font-size: 32px;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 6px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.cxzzt-currency {
    font-size: 18px;
    margin-left: 4px;
}

.cxzzt-creator-desc {
    font-size: 12px;
    color: var(--cxzzt-text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.cxzzt-creator-action-btn {
    background: #333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--cxzzt-transition);
    position: relative;
    z-index: 1;
}

.cxzzt-creator-action-btn:hover {
    background: #555;
}

.cxzzt-creator-cards {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.cxzzt-creator-card {
    padding: 16px 12px;
    border-radius: var(--cxzzt-border-radius);
    position: relative;
    overflow: hidden;
    transition: var(--cxzzt-transition);
    flex: 1;
    min-width: 0;
    text-align: center;
}

.cxzzt-creator-card.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.cxzzt-creator-card.red {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.cxzzt-creator-card.yellow {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.cxzzt-creator-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--cxzzt-shadow-hover);
}

.cxzzt-creator-card-icon {
    font-size: 16px;
    margin-bottom: 4px;
}

.cxzzt-creator-card-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.cxzzt-creator-card-desc {
    font-size: 10px;
    opacity: 0.8;
    margin-bottom: 6px;
    line-height: 1.2;
}

.cxzzt-creator-card-number {
    font-size: 18px;
    font-weight: 700;
}

.cxzzt-creator-card-unit {
    font-size: 12px;
    font-weight: normal;
}

.cxzzt-creator-notice {
    margin-top: 16px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--cxzzt-border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cxzzt-creator-notice-icon {
    font-size: 14px;
    color: #ffd700;
}

.cxzzt-creator-notice-text {
    font-size: 11px;
    color: white;
    line-height: 1.3;
}

/* ========== 排行榜样式 ========== */
.cxzzt-ranking-section {
    background: var(--cxzzt-secondary-color);
    border-radius: var(--cxzzt-border-radius);
    padding: 16px;
    box-shadow: var(--cxzzt-shadow);
    height: fit-content;
}

.cxzzt-ranking-header {
    margin-bottom: 16px;
}

.cxzzt-ranking-title-group {
    text-align: left;
}

.cxzzt-ranking-main-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cxzzt-text-color);
    margin-bottom: 4px;
}

.cxzzt-ranking-subtitle {
    font-size: 12px;
    color: var(--cxzzt-text-muted);
}

/* .cxzzt-ranking-list 背景已移除 */

.cxzzt-ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--cxzzt-border-color);
    transition: var(--cxzzt-transition);
}

.cxzzt-ranking-item:last-child {
    border-bottom: none;
}

.cxzzt-ranking-item:hover {
    background: var(--cxzzt-bg-light);
}

.cxzzt-rank-number {
    width: 24px;
    height: 24px;
    background: var(--cxzzt-border-color);
    color: var(--cxzzt-text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.cxzzt-rank-top1 .cxzzt-rank-number {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.cxzzt-rank-top2 .cxzzt-rank-number {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.cxzzt-rank-top3 .cxzzt-rank-number {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: white;
}

.cxzzt-user-avatar-wrapper {
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

.cxzzt-user-avatar-wrapper img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.cxzzt-online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--cxzzt-success-color);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.cxzzt-ranking-details {
    flex: 1;
    min-width: 0;
}

.cxzzt-user-name {
    display: block;
    color: var(--cxzzt-text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cxzzt-user-name:hover {
    color: var(--cxzzt-primary-color);
    text-decoration: none;
}

.cxzzt-ranking-value {
    font-size: 12px;
    color: var(--cxzzt-text-muted);
}

.cxzzt-ranking-value .highlight {
    color: var(--cxzzt-primary-color);
    font-weight: 600;
}

/* ========== 排行榜特殊样式 ========== */
.cxzzt-rank-number {
    width: 24px;
    height: 24px;
    background: var(--cxzzt-border-color);
    color: var(--cxzzt-text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.cxzzt-rank-top1 .cxzzt-rank-number {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.cxzzt-rank-top2 .cxzzt-rank-number {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.cxzzt-rank-top3 .cxzzt-rank-number {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: white;
}

/* ========== 交互按钮样式 ========== */
.cxzzt-user-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.cxzzt-btn {
    padding: 4px 8px;
    border: 1px solid var(--cxzzt-border-color);
    border-radius: 4px;
    background: transparent;
    color: var(--cxzzt-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: var(--cxzzt-transition);
    text-decoration: none;
    display: inline-block;
}

.cxzzt-btn:hover {
    background: var(--cxzzt-primary-color);
    color: white;
    border-color: var(--cxzzt-primary-color);
}

.cxzzt-btn-follow:hover {
    background: var(--cxzzt-success-color);
    border-color: var(--cxzzt-success-color);
}

/* ========== 无数据状态 ========== */
.cxzzt-no-data {
    text-align: center;
    color: var(--cxzzt-text-muted);
    font-size: 14px;
    padding: 20px;
    margin: 0;
}

/* ========== 错误状态 ========== */
.cxzzt-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: var(--cxzzt-border-radius);
    border: 1px solid #f5c6cb;
    text-align: center;
    font-size: 14px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    /* 小工具容器在移动端的间距调整 */
    .widget_cxzzt_user_info_widget,
    .widget.widget_cxzzt_user_info_widget,
    .zib-widget.cxzzt_user_info_widget,
    div.zib-widget.cxzzt_user_info_widget {
        margin: 20px 0 !important;
    }

    /* 独立标题栏响应式 */
    .cxzzt-title-bar {
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .cxzzt-title-bar-content {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .cxzzt-title-bar-text {
        font-size: 16px;
    }

    .cxzzt-title-bar-buttons {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .cxzzt-title-bar-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* 移除容器内边距 */

    .cxzzt-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cxzzt-section-main-title {
        font-size: 16px;
    }

    .cxzzt-active-users-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .cxzzt-user-card {
        padding: 12px;
    }

    .cxzzt-user-card-avatar {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }

    .cxzzt-user-card-name {
        font-size: 13px;
    }

    .cxzzt-user-card-badges {
        gap: 3px;
        margin-bottom: 10px;
    }

    .cxzzt-user-badge,
    .cxzzt-user-role-tag {
        font-size: 9px;
        padding: 1px 5px;
    }

    .cxzzt-user-card-stats {
        gap: 6px;
        margin-bottom: 10px;
    }

    .cxzzt-stat-label {
        font-size: 9px;
    }

    .cxzzt-stat-value {
        font-size: 11px;
    }

    .cxzzt-user-card-description {
        font-size: 10px;
    }

    .cxzzt-creator-center {
        padding: 16px;
    }

    .cxzzt-bottom-section {
        flex-direction: column;
        gap: 16px;
    }

    .cxzzt-bottom-right {
        min-width: auto;
    }

    .cxzzt-creator-content {
        flex-direction: column;
        gap: 16px;
    }

    .cxzzt-creator-cards {
        flex-direction: row;
        min-width: auto;
    }

    .cxzzt-creator-card {
        flex: 1;
        padding: 10px;
    }

    .cxzzt-creator-big-number {
        font-size: 28px;
    }

    .cxzzt-ranking-item {
        padding: 10px 12px;
    }

    .cxzzt-user-avatar-wrapper img {
        width: 32px;
        height: 32px;
    }

    .cxzzt-rank-number {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    /* 小工具容器在小屏幕设备上的间距调整 */
    .widget_cxzzt_user_info_widget,
    .widget.widget_cxzzt_user_info_widget,
    .zib-widget.cxzzt_user_info_widget,
    div.zib-widget.cxzzt_user_info_widget {
        margin: 16px 0 !important;
    }

    .cxzzt-section-main-title {
        font-size: 14px;
    }

    .cxzzt-section-subtitle {
        font-size: 11px;
    }

    .cxzzt-active-users-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .cxzzt-user-card {
        padding: 10px;
    }

    .cxzzt-user-card-avatar {
        width: 40px;
        height: 40px;
        margin-bottom: 6px;
    }

    .cxzzt-user-card-name {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .cxzzt-user-card-badges {
        gap: 2px;
        margin-bottom: 8px;
    }

    .cxzzt-user-badge,
    .cxzzt-user-role-tag {
        font-size: 8px;
        padding: 1px 4px;
    }

    .cxzzt-user-card-stats {
        gap: 4px;
        margin-bottom: 8px;
    }

    .cxzzt-stat-label {
        font-size: 8px;
    }

    .cxzzt-stat-value {
        font-size: 10px;
    }

    .cxzzt-user-card-description {
        font-size: 9px;
        margin-top: 2px;
    }

    .cxzzt-creator-center {
        padding: 12px;
    }

    .cxzzt-creator-title {
        font-size: 16px;
    }

    .cxzzt-creator-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .cxzzt-creator-big-number {
        font-size: 24px;
    }

    .cxzzt-creator-cards {
        flex-direction: row;
        gap: 8px;
    }

    .cxzzt-creator-card {
        padding: 8px 6px;
        font-size: 12px;
    }

    .cxzzt-creator-card-label {
        font-size: 12px;
    }

    .cxzzt-creator-card-number {
        font-size: 16px;
    }

    .cxzzt-creator-notice {
        padding: 6px 10px;
    }

    .cxzzt-creator-notice-text {
        font-size: 10px;
    }
}

/* ========== 悬停动画效果 ========== */

/* 顶部装饰的淡入动画 - 不改变高度 */
@keyframes cxzzt-bg-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 底部按钮的淡入动画 - 不影响布局 */
@keyframes cxzzt-btn-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cxzzt-user-card:hover::before {
        height: 50px;
    }

    .cxzzt-user-card-avatar {
        margin-top: 8px; /* 调整默认margin */
    }
}

@media (max-width: 480px) {
    .cxzzt-user-card:hover::before {
        height: 40px;
    }

    .cxzzt-user-card-avatar {
        margin-top: 5px; /* 调整默认margin */
    }

    .cxzzt-user-card:hover::after {
        height: 24px;
        font-size: 10px;
    }
}

/* ========== JavaScript 交互样式 ========== */

/* 用户卡片点击反馈 */
.cxzzt-user-card:active {
    transform: translateY(0px) scale(0.98);
    transition: all 0.1s ease;
}

/* 选中状态的动画效果 */
.cxzzt-user-card.active {
    animation: cxzzt-card-select 0.3s ease;
}

@keyframes cxzzt-card-select {
    0% {
        transform: translateY(-2px) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.02);
    }
    100% {
        transform: translateY(-1px) scale(1);
    }
}

/* 多选模式下的选中计数器 */
.cxzzt-selected-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--cxzzt-primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: var(--cxzzt-shadow-hover);
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cxzzt-selected-counter.show {
    transform: translateY(0);
    opacity: 1;
}
