/* 个人主页样式 */

.profile-main {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
}

/* 个人主页头部 */
.profile-header {
    margin-bottom: 30px;
}

.profile-cover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 24px var(--shadow);
    position: relative;
    overflow: hidden;
}

.profile-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.profile-avatar-section {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.avatar-display {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.avatar-display:hover {
    transform: scale(1.05);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--white);
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar-edit-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.profile-username {
    font-size: 32px;
    font-weight: 700;
    margin: 15px 0 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-email {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* 编辑区域 */
.profile-edit-section {
    margin-bottom: 30px;
}

.profile-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.edit-group {
    margin-bottom: 25px;
}

.edit-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

/* 头像选择器 */
.avatar-selector {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.avatar-preview {
    flex-shrink: 0;
}

.avatar-preview-display {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    box-shadow: 0 4px 12px var(--shadow);
    border: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.avatar-preview-display.selected {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.avatar-options {
    flex: 1;
    min-width: 300px;
}

.avatar-hint {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: var(--secondary-color);
    border-radius: 12px;
}

.avatar-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 6px var(--shadow);
}

.avatar-item:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.avatar-item.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 4px 16px var(--shadow-hover);
}

.avatar-custom {
    margin-top: 15px;
}

.custom-avatar-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-avatar-input {
    padding: 12px;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    transition: all 0.3s ease;
    font-family: inherit;
}

.custom-avatar-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.2);
}

.custom-avatar-hint {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

/* 输入框 */
.edit-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.edit-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.2);
}

.edit-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* 按钮组 */
.edit-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--secondary-color);
}

.save-btn,
.cancel-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.save-btn {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.4);
}

.save-btn:hover {
    background: #ff9fb3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.6);
}

.cancel-btn {
    background: var(--secondary-color);
    color: var(--text-color);
}

.cancel-btn:hover {
    background: #d4d4e6;
    transform: translateY(-2px);
}

/* 统计信息 */
.profile-stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.stat-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-main {
        padding: 20px 0;
    }
    
    .profile-cover {
        padding: 30px 20px;
    }
    
    .profile-username {
        font-size: 24px;
    }
    
    .avatar-display {
        width: 100px;
        height: 100px;
        font-size: 50px;
    }
    
    .avatar-selector {
        flex-direction: column;
    }
    
    .avatar-options {
        width: 100%;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 8px;
    }
    
    .avatar-item {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-actions {
        flex-direction: column;
    }
}

