/* 我的页面样式 */

/* 主要内容区域 */
.main-content {
    margin-top: 0;
    margin-bottom: 60px;
    padding: 16px;
    min-height: calc(100vh - 60px);
    background: linear-gradient(180deg, #F7FAFC 0%, #EDF2F7 100%);
}

/* 用户信息卡片 */
.user-info-card {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 20px;
    padding: 32px 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.user-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.4);
}

.user-avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.user-avatar-large .avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.user-avatar-large .avatar-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.user-nickname {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 功能菜单 */
.menu-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05), transparent);
    transition: width 0.3s ease;
}

.menu-item:hover::before {
    width: 100%;
}

.menu-item:hover {
    transform: translateX(4px);
    background-color: rgba(102, 126, 234, 0.03);
}

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

.menu-feather-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: all 0.3s ease;
}

.menu-icon {
    font-size: 20px;
    margin-right: 16px;
    color: #667EEA;
    width: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-arrow {
    font-size: 18px;
    color: #A0AEC0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #2D3748;
}

.menu-arrow {
    font-size: 18px;
    color: #A0AEC0;
    transition: all 0.3s ease;
}

.menu-item:hover .menu-arrow {
    transform: translateX(4px);
    color: #667EEA;
}

/* 已购课程区域 */
.my-courses-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 24px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 2px;
}

/* 已购课程列表 */
.my-courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 已购课程卡片 */
.my-course-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    flex-direction: column;
}

.my-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.my-course-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.my-course-card:hover .my-course-cover {
    transform: scale(1.05);
}

.my-course-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.my-course-title {
    font-size: 16px;
    font-weight: 600;
    color: #2D3748;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.my-course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: #718096;
}

.my-course-progress {
    margin-top: auto;
}

.progress-bar {
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667EEA 0%, #764BA2 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.progress-text {
    font-size: 12px;
    color: #718096;
    text-align: right;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #F7FAFC;
    border-radius: 12px;
    border: 2px dashed rgba(102, 126, 234, 0.2);
}

.empty-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #A0AEC0;
    opacity: 0.5;
}

.empty-feather-icon {
    width: 64px;
    height: 64px;
    fill: #A0AEC0;
    opacity: 0.5;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
    color: #718096;
    margin-bottom: 24px;
    line-height: 1.5;
}

.go-home-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.go-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    opacity: 0.95;
}

/* 设置按钮 */
.settings-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.settings-icon {
    width: 20px;
    height: 20px;
    fill: white;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 退出登录按钮 */
.logout-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #FC8181 0%, #F56565 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.3);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 129, 129, 0.4);
    opacity: 0.95;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 12px;
    }
    
    .user-info-card {
        padding: 24px 16px;
        margin-bottom: 16px;
    }
    
    .user-avatar-large {
        width: 100px;
        height: 100px;
        margin-bottom: 16px;
    }
    
    .user-nickname {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .user-stats {
        gap: 24px;
        padding-top: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .menu-item {
        padding: 16px;
    }
    
    .menu-text {
        font-size: 15px;
    }
    
    .my-courses-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .my-courses-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .my-course-card {
        margin-bottom: 0;
    }
    
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }
    
    .empty-text {
        font-size: 14px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .user-info-card {
        padding: 20px 12px;
    }
    
    .user-avatar-large {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }
    
    .user-nickname {
        font-size: 18px;
    }
    
    .user-vip-status {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .user-stats {
        gap: 16px;
    }
    
    .stat-item {
        gap: 2px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .menu-item {
        padding: 14px 12px;
    }
    
    .menu-icon {
        font-size: 18px;
        margin-right: 12px;
    }
    
    .menu-text {
        font-size: 14px;
    }
    
    .my-courses-list {
        gap: 12px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667EEA;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 加载状态 */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #718096;
    font-size: 14px;
    gap: 12px;
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #48BB78 0%, #38A169 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.4);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 错误提示 */
.error-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #FC8181 0%, #F56565 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(252, 129, 129, 0.4);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}