/* 个人资料页面样式 */
.profile-main {
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.profile-header {
    text-align: center;
    margin-bottom: 50px;
}

.profile-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.profile-header p {
    color: #666;
    font-size: 1.1rem;
}

.profile-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 左侧导航 */
.profile-sidebar {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-item.active:hover {
    transform: none;
}

/* 右侧内容区域 */
.profile-sections {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-section {
    display: none;
    padding: 40px;
    animation: fadeInUp 0.5s ease;
}

.profile-section.active {
    display: block;
}

.section-header {
    margin-bottom: 40px;
    border-bottom: 2px solid #f1f3f4;
    padding-bottom: 20px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

/* 头像区域 */
.avatar-section {
    margin-bottom: 40px;
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.avatar-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#avatarDisplay {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.avatar-info p {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 5px;
}

.avatar-info small {
    color: #999;
    font-size: 0.85rem;
}

/* 表单样式 */
.profile-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 安全设置 */
.security-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.security-info h3 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.security-info p {
    color: #666;
    font-size: 0.9rem;
}

/* 订单列表 */
.orders-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.orders-filters select {
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
}

.orders-list {
    display: grid;
    gap: 20px;
}

.order-item {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-number {
    font-weight: 600;
    color: #2c3e50;
}

.order-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #d1ecf1; color: #0c5460; }
.status-processing { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.order-content h4 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.order-content p {
    color: #666;
    margin-bottom: 10px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.85rem;
}

.order-price {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

/* 活动记录 */
.activity-list {
    display: grid;
    gap: 25px;
}

.activity-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    align-items: start;
}

.activity-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.activity-content h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.activity-content p {
    color: #666;
    margin-bottom: 5px;
}

.activity-time {
    color: #999;
    font-size: 0.85rem;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #f1f3f4;
}

.modal-header h3 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-main {
        padding: 100px 15px 40px;
    }

    .profile-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-sidebar {
        order: 2;
    }

    .profile-sections {
        order: 1;
    }

    .profile-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
    }

    .nav-item {
        white-space: nowrap;
        min-width: 100px;
        text-align: center;
    }

    .profile-section {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .security-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .orders-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile-header h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-danger {
    color: #dc3545;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}