/* 我的页面样式 */

.main-content {
    background: var(--bg-color);
    padding-top: 0 !important;
}

/* 客服未读消息角标 */
.service-unread-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    background: #FF4757;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
}

/* 用户卡片 */
.user-card {
    background: linear-gradient(135deg, #64B5F6 0%, #FFFFFF 100%);
    padding: 16px;
    margin-bottom: 8px;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar-link {
    text-decoration: none;
    flex-shrink: 0;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.user-avatar:active {
    transform: scale(0.95);
}

.login-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.user-header.logged-in {
    cursor: default;
}

.user-info-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-nickname {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 6em;
    flex-shrink: 0;
}

.user-phone {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-id-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0;
}

.user-id-label,
.user-invite-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.user-id-label span,
.user-invite-label span {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.copy-invite-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 2px;
    vertical-align: middle;
}

.copy-invite-btn .material-symbols-outlined {
    font-size: 12px;
    color: #90CAF9;
}

.copy-invite-btn:hover {
    background: rgba(144, 202, 249, 0.2);
    transform: scale(1.05);
}

.copy-invite-btn:active {
    background: rgba(144, 202, 249, 0.3);
    transform: scale(0.95);
}

.balance-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: white;
    letter-spacing: 3px;
}

/* 菜单区域 */
.menu-section {
    padding: 12px 16px;
    margin-bottom: 8px;
}

.menu-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.menu-item:active {
    transform: scale(0.95);
}

.menu-icon {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.menu-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* 信息按钮 */
.info-button {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin-bottom: 20px;
}

.info-button svg {
    transition: transform 0.2s;
}

.info-button:active svg {
    transform: scale(0.95);
}

/* 响应式调整 */
@media (max-width: 375px) {
    .menu-grid {
        gap: 14px;
        padding: 14px;
    }
    
    .menu-icon {
    position: relative;
        width: 44px;
        height: 44px;
    }
    
    .menu-label {
        font-size: 11px;
    }
}

/* 5列布局（常用功能） */
.menu-section:first-of-type .menu-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* 确保某些区域有更好的间距 */
.menu-section:last-of-type {
    margin-bottom: 16px;
}


/* 用户徽章样式 */
.user-badges {
    display: flex;
    gap: 8px;
    margin-top: 0;
    flex-wrap: wrap;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    vertical-align: middle;
}

.badge-verified {
    background: rgba(76, 175, 80, 0.9);
}

.badge-invite {
    background: rgba(66, 165, 245, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.badge-unverified {
    background: rgba(158, 158, 158, 0.7);
}

/* 代理等级样式 */
.badge-agent {
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* 团长等级样式 */
.badge-team {
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 银牌代理 */
.agent-silver {
    background: linear-gradient(135deg, #b8c5d0, #d4dce4, #b8c5d0);
    background-size: 200% 200%;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

@keyframes shimmer-silver {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.agent-silver {
    animation: shimmer-silver 3s ease-in-out infinite;
}

/* 金牌代理 */
.agent-gold {
    background: linear-gradient(135deg, #f9d423, #ffd700, #f9d423);
    background-size: 200% 200%;
    color: #8B4513;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

@keyframes shimmer-gold {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.agent-gold {
    animation: shimmer-gold 2.5s ease-in-out infinite;
}

/* 钻石代理 */
.agent-diamond {
    background: linear-gradient(135deg, #ffc0cb, #ffb6c1, #ffc0cb);
    background-size: 200% 200%;
    color: #c2185b;
    box-shadow: 0 2px 8px rgba(255, 192, 203, 0.5);
}

@keyframes shimmer-diamond {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.agent-diamond {
    animation: shimmer-diamond 2s ease-in-out infinite;
}

/* 黑钻代理 */
.agent-black-diamond {
    background: linear-gradient(135deg, #2c3e50, #34495e, #2c3e50);
    background-size: 200% 200%;
    color: #ecf0f1;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.6);
}

@keyframes shimmer-black-diamond {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.agent-black-diamond {
    animation: shimmer-black-diamond 2s ease-in-out infinite;
}

/* 渠道合伙人 */
.agent-partner {
    background: linear-gradient(135deg, #f093fb, #f5576c, #ffd200, #4facfe, #00f2fe, #f093fb);
    background-size: 300% 300%;
    color: white;
    box-shadow: 0 2px 12px rgba(241, 39, 17, 0.5);
    font-weight: 700;
}

@keyframes shimmer-partner {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.agent-partner {
    animation: shimmer-partner 3s linear infinite;
}

/* 普通团长 - 灰白色 */
.team-normal {
    background: linear-gradient(135deg, #E8EAF6, #C5CAE9, #E8EAF6);
    background-size: 200% 200%;
    color: #5C6BC0;
    box-shadow: 0 2px 8px rgba(197, 202, 233, 0.4);
    border: 1px solid rgba(197, 202, 233, 0.6);
}

@keyframes shimmer-team-normal {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.team-normal {
    animation: shimmer-team-normal 3s ease-in-out infinite;
}

/* 中级团长 - 青色 */
.team-intermediate {
    background: linear-gradient(135deg, #B2EBF2, #4DD0E1, #B2EBF2);
    background-size: 200% 200%;
    color: #006064;
    box-shadow: 0 2px 8px rgba(77, 208, 225, 0.4);
    border: 1px solid rgba(77, 208, 225, 0.5);
}

@keyframes shimmer-team-intermediate {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.team-intermediate {
    animation: shimmer-team-intermediate 2.8s ease-in-out infinite;
}

/* 高级团长 - 紫色 */
.team-advanced {
    background: linear-gradient(135deg, #CE93D8, #AB47BC, #CE93D8);
    background-size: 200% 200%;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(171, 71, 188, 0.5);
    border: 1px solid rgba(171, 71, 188, 0.6);
}

@keyframes shimmer-team-advanced {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.team-advanced {
    animation: shimmer-team-advanced 2.5s ease-in-out infinite;
}

/* 超级团长 - 金色 */
.team-super {
    background: linear-gradient(135deg, #FFD54F, #FFC107, #FFB300, #FFC107, #FFD54F);
    background-size: 300% 300%;
    color: #F57C00;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.6);
    border: 1px solid rgba(255, 193, 7, 0.7);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

@keyframes shimmer-team-super {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.team-super {
    animation: shimmer-team-super 2.2s linear infinite;
}

/* 渠道团长 - 彩虹渐变 */
.team-channel {
    background: linear-gradient(135deg, #E8EAF6, #B2EBF2, #4DD0E1, #CE93D8, #AB47BC, #FFD54F, #FFC107, #B2EBF2);
    background-size: 400% 400%;
    color: #FFFFFF;
    box-shadow: 0 3px 12px rgba(171, 71, 188, 0.7);
    border: 1px solid rgba(171, 71, 188, 0.6);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes shimmer-team-channel {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.team-channel {
    animation: shimmer-team-channel 3s linear infinite;
}

/* 用户额外信息样式 */
.user-extra-info {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    margin-top: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* 管理后台表格样式 */
.status-verified {
    color: #4CAF50;
    font-weight: 600;
}

.status-unverified {
    color: #9E9E9E;
}

.status-active {
    color: #4CAF50;
}

.status-inactive {
    color: #F44336;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.user-phone {
    font-size: 12px;
    color: #999;
}

/* 邀请弹窗样式 */
.invite-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.invite-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.invite-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.invite-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.invite-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.invite-modal-close:hover {
    background: #e0e0e0;
}

.invite-modal-close:active {
    transform: scale(0.95);
}

.invite-modal-body {
    padding: 20px;
}

.invite-info {
    text-align: center;
    padding: 20px 0;
}

.invite-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.invite-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.invite-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.invite-code-section,
.invite-link-section {
    margin-top: 24px;
}

.invite-code-label,
.invite-link-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.invite-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #42A5F5, #E3F2FD);
    border-radius: 12px;
    padding: 16px;
}

.invite-code-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
    letter-spacing: 4px;
}

.invite-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 12px;
}

.invite-link-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #666;
    outline: none;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #42A5F5;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.copy-btn:hover {
    background: #f0f0f0;
}

.copy-btn:active {
    transform: scale(0.95);
}

.invite-tips {
    margin-top: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.tips-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    padding-left: 16px;
    position: relative;
}

.tips-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #42A5F5;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 设置密码弹窗样式 */
.set-password-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.set-password-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.set-password-modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.set-password-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.set-password-modal-body {
    padding: 20px;
}

.password-info {
    text-align: center;
    padding: 20px 0;
}

.password-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.password-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.password-form {
    margin-top: 20px;
}

.password-form .form-group {
    margin-bottom: 16px;
}

.password-form .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.password-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-form .form-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.password-form .form-input:focus {
    border-color: #42A5F5;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.1);
}

.password-form .toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-form .toggle-password:hover {
    color: #42A5F5;
}

.password-form .submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #42A5F5, #E3F2FD);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.password-form .submit-btn:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.password-form .submit-btn:active {
    transform: scale(0.98);
}

.password-tips {
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.password-tips .tips-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.password-tips .tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-tips .tips-list li {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    padding-left: 16px;
    position: relative;
}

.password-tips .tips-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #42A5F5;
    font-weight: bold;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .invite-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .invite-modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }
    
    .invite-code-text {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .invite-link-input {
        font-size: 11px;
    }

    .set-password-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .set-password-modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }
}

/* 数据更新动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}
