/**
 * ATACAJUNTO APP - Perfil 页面样式
 * css/pages/perfil.css
 * 
 * 包含: perfil.php, meus_dados.php 的样式
 */

/* ===========================
   个人中心页面 - 移动端
   =========================== */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 24px 16px;
    padding-top: calc(60px + var(--safe-area-top));
    color: var(--text-white);
    position: relative;
}

/* 无背景图时 profile-header 显示橙色渐变 */
/* 不需要额外规则，默认已有渐变背景 */

/* 有背景图时的头部样式 - 使用负margin上移到背景区域 */
/*在类移动端 16：9 显示器中的头像显示位置*/
.profile-header.with-background {
    background: transparent;
    position: relative;
    z-index: 2;
    margin-top: -230px;
    pointer-events: none;
}

/* 头部内的元素恢复点击 */
.profile-header.with-background .profile-avatar,
.profile-header.with-background .profile-name,
.profile-header.with-background .profile-username {
    pointer-events: auto;
}

/* 响应式调整 - 768px+ 背景320px 电脑显示器中头像显示位置 小屏幕*/
@media (min-width: 768px) {
    .profile-header.with-background {
        margin-top: -220px;
    }
}

/* 响应式调整 - 1024px+ 背景360px 电脑显示器中头像显示位置 */
@media (min-width: 1024px) {
    .profile-header.with-background {
        margin-top: -300px;
    }
}

/* 菜单按钮默认样式（无背景时使用） */
.profile-header > .profile-menu-btn {
    position: absolute;
    top: calc(16px + var(--safe-area-top));
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--text-white);
    z-index: 10;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* 添加封面按钮 - 无背景时显示在头部左上角 */
.profile-header > .profile-add-cover-btn {
    position: absolute;
    top: calc(16px + var(--safe-area-top));
    left: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.profile-header > .profile-add-cover-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 有背景时隐藏头部的菜单按钮（使用背景区域的按钮） */
.profile-header.with-background > .profile-menu-btn {
    display: none;
}

.profile-header > .profile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 14px;
    opacity: 0.85;
}

.profile-content {
    padding: 16px;
    position: relative;
    z-index: 3;
}

/* Perfil 页面 - 积分卡片区域减少 padding */
.profile-content--cards {
    padding: 12px 0 16px;
}

.profile-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.profile-info-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

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

.profile-info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: var(--primary-alpha);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
}

.profile-info-content {
    flex: 1;
}

.profile-info-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.profile-info-value {
    font-size: 15px;
    color: var(--text-primary);
}

/* ===========================
   Profile 菜单列表
   =========================== */
.profile-menu-list {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast);
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item:active {
    background-color: var(--bg-light);
}

.profile-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: var(--primary-alpha);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 14px;
}

.profile-menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.profile-menu-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.profile-menu-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===========================
   右侧滑出菜单
   =========================== */
.slide-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.slide-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.slide-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85%;
    background-color: var(--bg-white);
    z-index: 2001;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.slide-menu.active {
    transform: translateX(0);
}

.slide-menu-header {
    padding: 20px 16px;
    padding-top: calc(20px + var(--safe-area-top));
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slide-menu-title {
    font-size: 18px;
    font-weight: 600;
}

.slide-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
}

.slide-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.slide-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.slide-menu-item:active {
    background-color: var(--bg-light);
}

.slide-menu-item i {
    width: 24px;
    font-size: 18px;
    color: var(--text-secondary);
}

.slide-menu-item span {
    font-size: 15px;
}

.slide-menu-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 8px 0;
}

.slide-menu-footer {
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
    border-top: 1px solid var(--border-light);
}

/* ===========================
   桌面端适配
   =========================== */
@media (min-width: 769px) {
    .profile-header {
        padding: 40px 24px;
        padding-top: 80px;
    }
    
    .profile-menu-btn {
        top: 24px;
        right: 24px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .profile-username {
        font-size: 16px;
    }
    
    .profile-content {
        max-width: 30%;
        margin: -10px 0 0 0px;
        padding: 30px;
    }
    
    .profile-info-item {
        padding: 16px 20px;
    }
    
    .profile-info-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .profile-info-value {
        font-size: 16px;
    }
    
    /* Profile 菜单列表 - 桌面端 */
    .profile-menu-item {
        padding: 18px 20px;
    }
    
    .profile-menu-item:hover {
        background-color: var(--bg-light);
    }
    
    .profile-menu-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .profile-menu-title {
        font-size: 17px;
    }
    
    .profile-menu-desc {
        font-size: 14px;
    }
    
    /* 滑出菜单 - 桌面端 */
    .slide-menu {
        width: 320px;
    }
    
    .slide-menu-header {
        padding: 24px 20px;
    }
    
    .slide-menu-item {
        padding: 16px 24px;
    }
    
    .slide-menu-item:hover {
        background-color: var(--bg-light);
    }
}
