/* ==========================================
   👤 个人资料页面样式
   ========================================== */

/* ==========================================
   📄 页面布局
   ========================================== */
.profile-page {
    min-height: calc(100vh - 160px);
    background: #f8f9fa;
    padding: 30px 20px;
}

.profile-container {
    max-width: 980px;
    margin: 0 auto;
}

/* ==========================================
   📸 统一个人资料卡片
   ========================================== */
.profile-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    border-bottom: 1px solid #f1f3f4;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

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

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

.profile-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.profile-info p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0;
}

/* ==========================================
   📋 导航标签页
   ========================================== */
.profile-nav {
    display: flex;
    padding: 0;
    margin-bottom: 0;
    gap: 5px;
    background: #f8f9fa;
    border-bottom: 1px solid #f1f3f4;
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

.nav-tab:hover {
    background: #f0f2f5;
    color: #667eea;
}

.nav-tab.active {
    color: #667eea;
    background: white;
    border-bottom: 3px solid #667eea;
    box-shadow: none;
}

.nav-tab i {
    font-size: 1.1rem;
}

/* ==========================================
   📝 内容区域
   ========================================== */
.profile-content {
    background: white;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

/* ==========================================
   📝 表单样式
   ========================================== */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #f1f3f4;
}

.save-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ==========================================
   🖼️ 设计网格
   ========================================== */
.designs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.designs-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ==========================================
   🖼️ 设计卡片样式
   ========================================== */
.design-card {
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.design-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.design-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #f1f3f4;
}

.design-info {
    padding: 15px;
}

.design-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.design-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.design-style {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f4f8;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4a5568;
}

/* ==========================================
   📱 响应式样式
   ========================================== */
@media (max-width: 768px) {
    .profile-page {
        padding: 15px;
    }
    
    .profile-card {
        border-radius: 10px;
    }
    
    .profile-header-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
        gap: 15px;
    }
    
    .profile-info h1 {
        font-size: 1.6rem;
    }
    
    .profile-nav {
        padding: 0;
    }
    
    .nav-tab {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .tab-content {
        padding: 20px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        justify-content: center;
    }
    
    .designs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .designs-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
    
    .profile-info h1 {
        font-size: 1.4rem;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .designs-grid {
        grid-template-columns: 1fr;
    }
    
    .designs-controls {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
}

/* ==========================================
   📝 消息提示
   ========================================== */
.profile-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.profile-message.success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.profile-message.error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.profile-message.info {
    background-color: #cfe2ff;
    color: #084298;
    border: 1px solid #b6d4fe;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   📭 空状态
   ========================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.empty-icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.empty-icon i {
    font-size: 2rem;
    color: #667eea;
}

.empty-state h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 25px;
    color: #666;
}

.empty-state .cta-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-state .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 30px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

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