/**
 * "我的"页面样式
 * Profile/My Page Styles
 * 创建日期: 2025-09-30
 * 版本: 2.0
 */

/* ============================================
   CSS 变量定义
   ============================================ */
:root {
    /* 我的页面专用颜色 */
    --my-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --my-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --my-warning: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    --my-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --my-info: linear-gradient(135deg, #22c1c3 0%, #fdbb2d 100%);
    --my-accent: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --my-gray: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
    
    /* 间距 */
    --my-space-xs: 4px;
    --my-space-sm: 8px;
    --my-space-md: 16px;
    --my-space-lg: 24px;
    --my-space-xl: 32px;
    --my-space-2xl: 48px;
    
    /* 圆角 */
    --my-radius-sm: 8px;
    --my-radius-md: 12px;
    --my-radius-lg: 16px;
    --my-radius-xl: 20px;
    --my-radius-full: 9999px;
    
    /* 阴影 */
    --my-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --my-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --my-shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --my-shadow-xl: 0 12px 32px rgba(0,0,0,0.2);
}

/* ============================================
   页面容器
   ============================================ */
.my-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--my-space-lg);
    animation: fadeIn 0.5s ease-in-out;
}

/* ============================================
   页面头部
   ============================================ */
.my-header {
    text-align: center;
    margin-bottom: var(--my-space-xl);
}

.my-header-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: var(--my-space-md);
}

.my-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 var(--my-space-sm) 0;
}

.my-header-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 var(--my-space-xs) 0;
    font-weight: 500;
}

.my-header-description {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* ============================================
   用户信息头部卡片
   ============================================ */
.my-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px;
    border-radius: var(--my-radius-xl);
    margin-bottom: var(--my-space-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--my-shadow-lg);
    min-height: auto;
}

/* 背景装饰圆形 */
.my-header-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--my-radius-full);
    opacity: 0.3;
}

.my-header-card::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--my-radius-full);
    opacity: 0.2;
}

.my-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--my-space-lg);
}

/* 用户头像 */
.my-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--my-radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.my-avatar i {
    color: white;
}

/* 用户信息 */
.my-info {
    flex: 1;
}

.my-info h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: white;
}

.my-info p {
    opacity: 0.9;
    margin: 0;
    font-size: 14px;
}

/* ============================================
   功能菜单区域
   ============================================ */
.my-section {
    margin-bottom: var(--my-space-xl);
}

.my-section h3 {
    color: #1f2937;
    margin-bottom: var(--my-space-lg);
    font-size: 24px;
    font-weight: 700;
}

.my-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--my-space-md);
}

/* 菜单项 */
.my-menu-item {
    background: white;
    border-radius: var(--my-radius-lg);
    padding: var(--my-space-lg);
    box-shadow: var(--my-shadow-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.my-menu-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--my-shadow-xl);
    border-color: rgba(102, 126, 234, 0.3);
}

.my-menu-item:active {
    transform: translateY(-2px);
}

/* 菜单图标 */
.my-menu-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--my-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--my-space-md);
    font-size: 24px;
    transition: transform 0.3s ease;
}

.my-menu-item:hover .my-menu-icon {
    transform: scale(1.1);
}

/* 不同主题的菜单图标 */
.my-menu-icon.bg-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.my-menu-icon.bg-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.my-menu-icon.bg-orange {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    color: #374151;
}

.my-menu-icon.bg-red {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.my-menu-icon.bg-purple {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #374151;
}

.my-menu-icon.bg-yellow {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    color: #374151;
}

.my-menu-icon.bg-teal {
    background: linear-gradient(135deg, #22c1c3 0%, #fdbb2d 100%);
    color: white;
}

.my-menu-icon.bg-indigo {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #374151;
}

.my-menu-icon.bg-cyan {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
}

.my-menu-icon.bg-gray {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
    color: white;
}

/* 菜单文字 */
.my-menu-text {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    display: block;
}

/* 未读徽章 */
.my-menu-item .badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* 应用更新红点 */
.profile-update-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    animation: profile-update-pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(235, 51, 73, 0.4);
}

@keyframes profile-update-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* ============================================
   未登录状态
   ============================================ */
.my-login-prompt {
    text-align: center;
    padding: var(--my-space-2xl) var(--my-space-lg);
    background: white;
    border-radius: var(--my-radius-xl);
    box-shadow: var(--my-shadow-md);
    max-width: 400px;
    margin: 0 auto;
}

.my-login-icon {
    margin-bottom: var(--my-space-lg);
}

.my-login-icon i {
    font-size: 64px;
    color: #9ca3af;
}

.my-login-prompt h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 var(--my-space-md) 0;
}

.my-login-prompt p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 var(--my-space-xl) 0;
}

.my-login-btn {
    display: inline-block;
    padding: var(--my-space-md) var(--my-space-2xl);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--my-radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.my-login-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--my-shadow-lg);
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板 */
@media (max-width: 1024px) {
    .my-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--my-space-md);
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .my-page {
        padding: var(--my-space-md);
    }
    
    .my-header h1 {
        font-size: 24px;
    }
    
    .my-header-subtitle {
        font-size: 16px;
    }
    
    .my-header-card {
        padding: var(--my-space-lg);
    }
    
    .my-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .my-info h2 {
        font-size: 20px;
    }
    
    .my-stats {
        justify-content: center;
        gap: var(--my-space-md);
    }
    
    .my-stat-value {
        font-size: 18px;
    }
    
    .my-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--my-space-sm);
    }
    
    .my-menu-item {
        padding: var(--my-space-sm) var(--my-space-xs);
    }
    
    .my-menu-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-bottom: var(--my-space-sm);
    }
    
    .my-menu-text {
        font-size: 11px;
    }
}

/* 小屏幕移动端 */
@media (max-width: 480px) {
    .my-header h1 {
        font-size: 20px;
    }
    
    .my-header-card::before,
    .my-header-card::after {
        display: none;
    }
    
    .my-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .my-info h2 {
        font-size: 18px;
    }
    
    .my-section h3 {
        font-size: 20px;
    }
}


/* ============================================
   应用更新对话框样式
   ============================================ */

/* 版本文本（显示在应用更新按钮下方） */
.my-version-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    display: block;
}

/* 更新对话框遮罩 */
.update-dialog-overlay {
    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: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

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

/* 更新对话框主体 */
.update-dialog {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

/* 对话框头部 */
.update-dialog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.update-dialog-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.update-dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.update-dialog-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 对话框主体内容 */
.update-dialog-body {
    padding: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.update-info {
    background: #f7f7f7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.update-info p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
}

.update-info strong {
    color: #667eea;
    font-weight: 600;
}

.update-message {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin: 16px 0;
}

/* 更新日志 */
.update-log {
    margin-top: 16px;
}

.update-log h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.update-log ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-log li {
    background: #f0f4ff;
    border-left: 3px solid #667eea;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
}

/* 对话框底部按钮 */
.update-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.update-btn-primary,
.update-btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.update-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

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

.update-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.update-btn-secondary:hover {
    background: #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .update-dialog {
        width: 95%;
        max-width: none;
    }
    
    .update-dialog-header {
        padding: 16px;
    }
    
    .update-dialog-header h3 {
        font-size: 18px;
    }
    
    .update-dialog-body {
        padding: 16px;
    }
    
    .update-dialog-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
    }
    
    .update-btn-primary,
    .update-btn-secondary {
        width: 100%;
    }
}
