/* 
 * GAMX-UI - 用户界面组件样式
 * 版本: 1.0.0
 * 描述: 提供所有与用户界面相关的样式定义，包括用户信息区、用户详情面板、账号设置等
 */

/* ---------- 1. 用户信息区域 ---------- */
.user-section {
    margin-top: auto; /* 推到底部 */
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0; /* 防止被压缩 */
}

.user-profile {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.username {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: inline-block;
}

/* ---------- 2. 用户详情遮罩层 ---------- */
.user-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-detail-overlay.show {
    display: flex;
    opacity: 1;
}

.user-detail-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

.user-detail-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- 3. 用户详情面板 ---------- */
.user-detail-panel {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.user-detail-overlay.show .user-detail-panel {
    transform: translateY(0);
}

.user-detail-panel .detail-content {
    padding: 35px;
}

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

.user-detail-panel .section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.user-detail-panel .info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 三栏布局 */
    gap: 15px;
}

.user-detail-panel .info-item {
    margin-bottom: 15px;
}

.user-detail-panel .item-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.user-detail-panel .item-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* ---------- 4. 用户资料头部 ---------- */
.user-detail-panel .profile-header {
    background: linear-gradient(135deg, var(--primary-color, #1976d2), var(--secondary-color, #2196f3));
    padding: 30px;
    display: flex;
    flex-direction: column; /* 改为纵向布局 */
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 头像和基本信息区域 */
.user-detail-panel .profile-header-top {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px; /* 与统计信息分开 */
}

.user-detail-panel .profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-detail-panel .profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-detail-panel .profile-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.user-detail-panel .profile-info .user-id {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.user-detail-panel .profile-info .user-id span {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* ---------- 5. 用户状态样式 ---------- */
.user-online-status {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
}

/* 状态指示器圆点 */
.user-online-status span.status-online,
.user-online-status span.status-inactive,
.user-online-status span.status-offline {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

/* 状态文本样式 */
.user-online-status span:not(.status-online):not(.status-inactive):not(.status-offline) {
    display: inline;
    white-space: nowrap;
}

.user-online-status .status-online {
    background-color: #4caf50; /* 绿色 - 在线 */
}

.user-online-status .status-inactive {
    background-color: #ff9800; /* 橙色 - 非活跃 */
}

.user-online-status .status-offline {
    background-color: #9e9e9e; /* 灰色 - 离线 */
}

/* ---------- 6. 用户资料统计信息 ---------- */
.user-detail-panel .profile-stats {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-top: 15px;
    margin-left: 0;
}

.user-detail-panel .stat {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 110px;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
}

.user-detail-panel .stat .label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
    white-space: nowrap;
}

.user-detail-panel .stat .value {
    font-size: 14px;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 7. 社交账号样式 ---------- */
.user-detail-panel .social-accounts {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-detail-panel .social-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    background-color: #e0e0e0;
    transition: all 0.2s ease;
    cursor: default; /* 改为默认鼠标样式，不再显示为可点击 */
}

.user-detail-panel .social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 增加悬停时的阴影效果 */
}

/* 移除点击激活状态 */
.user-detail-panel .social-icon.active {
    box-shadow: none;
}

.user-detail-panel .social-icon.google {
    background-color: #dd4b39;
}

.user-detail-panel .social-icon.facebook {
    background-color: #3b5998;
}

.user-detail-panel .social-icon.twitter {
    background-color: #1da1f2;
}

.user-detail-panel .social-icon.weixin {
    background-color: #07c160;
}

.user-detail-panel .social-icon.weibo {
    background-color: #e6162d;
}

.user-detail-panel .social-icon.qq {
    background-color: #12b7f5;
}

/* 社交账号详情区域样式 */
.user-detail-panel .social-account-detail {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 14px;
    color: #333;
    display: none; /* 默认隐藏 */
}

.social-account-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.account-header {
    background: linear-gradient(135deg, #3b76ef, #1976d2);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

.account-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.account-platform {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.close-detail {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s;
}

.close-detail:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.account-info {
    padding: 15px;
}

.info-row {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.info-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.info-label {
    width: 80px;
    font-size: 13px;
    color: #666;
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* 社交图标列表样式 */
.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-detail-panel .social-account-detail.visible,
.user-detail-panel .social-account-detail[style*="display: block"] {
    display: block;
}

/* ---------- 8. 状态标签样式 ---------- */
.user-detail-panel .empty-text, .user-detail-panel .loading-text {
    text-align: center;
    color: #999;
    padding: 15px;
    font-style: italic;
}

.user-detail-panel .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.user-detail-panel .status-badge.active {
    background-color: #e6f7ed;
    color: #1cbd6d;
}

.user-detail-panel .status-badge.blocked {
    background-color: #fee8e7;
    color: #f44336;
}

/* ---------- 9. 账号设置面板样式 ---------- */
.settings-description {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    font-size: 14px;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 覆盖整个头像区域 */
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 50%; /* 圆形，匹配头像 */
}

.avatar-edit-overlay:hover {
    opacity: 1 !important; /* 确保hover时显示 */
    background: rgba(0, 0, 0, 0.7); /* 更深的遮罩颜色 */
}

.profile-picture {
    position: relative;
    overflow: hidden;
}

.profile-picture:hover .avatar-edit-overlay {
    opacity: 0.9;
}

.avatar-edit-overlay i {
    margin-bottom: 6px;
    font-size: 20px;
    color: #fff;
}

/* ---------- 9.1 头像选择器弹窗 ---------- */
.avatar-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: none;
}

.avatar-picker-modal.show {
    display: block;
}

.avatar-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.avatar-picker-dialog {
    position: relative;
    width: 760px;
    max-width: calc(100vw - 32px);
    margin: 70px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.avatar-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}

.avatar-picker-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2f3542;
}

.avatar-picker-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #8892a0;
    cursor: pointer;
}

.avatar-picker-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 16px 0;
}

.avatar-picker-tab {
    border: none;
    background: #f4f6f8;
    color: #65707f;
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 13px;
}

.avatar-picker-tab.active {
    background: #3b76ef;
    color: #fff;
}

.avatar-picker-content {
    padding: 14px 16px;
}

.avatar-picker-panel {
    display: none;
}

.avatar-picker-panel.active {
    display: block;
}

.avatar-picker-grid {
    max-height: 360px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 10px;
    padding: 2px;
}

.avatar-picker-item {
    border: 1px solid #e9edf3;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-picker-item:hover {
    border-color: #9eb7f6;
    box-shadow: 0 2px 6px rgba(59, 118, 239, 0.15);
}

.avatar-picker-item.selected {
    border-color: #3b76ef;
    box-shadow: 0 0 0 2px rgba(59, 118, 239, 0.2);
}

.avatar-picker-item img {
    width: 100%;
    height: 56px;
    object-fit: contain;
}

.avatar-upload-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 16px 2px;
}

.avatar-upload-dropzone {
    width: 100%;
    min-height: 130px;
    border: 2px dashed #d5dbe5;
    border-radius: 10px;
    background: #fafbfe;
    color: #6f7b8b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.avatar-upload-dropzone i {
    font-size: 22px;
}

.avatar-upload-dropzone span {
    font-size: 13px;
}

.avatar-upload-dropzone.dragover {
    border-color: #3b76ef;
    background: rgba(59, 118, 239, 0.08);
    color: #2f5fd4;
}

.avatar-upload-hint {
    margin: 0;
    font-size: 12px;
    color: #8d98a6;
}

.avatar-picker-footer {
    border-top: 1px solid #eee;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.settings-content {
    padding: 20px 35px 35px;
}

/* ---------- 10. 表单样式 ---------- */
.form-row {
    margin-bottom: 20px;
}

.form-group {
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #3b76ef;
    box-shadow: 0 0 0 2px rgba(59, 118, 239, 0.2);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* ---------- 11. 密码输入框样式 ---------- */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.toggle-password:hover {
    color: #666;
}

/* ---------- 12. 设置标签页样式 ---------- */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-tab {
    padding: 12px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.settings-tab:hover {
    color: #3b76ef;
}

.settings-tab.active {
    color: #3b76ef;
    border-bottom-color: #3b76ef;
    font-weight: 500;
}

.settings-tab i {
    font-size: 15px;
}

/* 标签页内容样式 */
.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ---------- 13. Toast消息提示样式 ---------- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    font-size: 14px;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: #4caf50;
}

.toast.error {
    background-color: #f44336;
}

.toast.warning {
    background-color: #ff9800;
}

.toast.info {
    background-color: #2196f3;
}

/* 等级期限样式 */
.expired {
    color: #e53935;
    font-weight: bold;
}

.expiring-soon {
    color: #ff9800;
    font-weight: bold;
} 