/* 用户中心页面样式 */
@import '../design-system.css';

.user-card {
    max-width: 720px;
    margin: 0 auto 40px;
    padding: 32px;
}

.user-profile-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-surface-variant);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--md-sys-color-surface-variant);
    color: var(--deep-orange);
    font-weight: 700;
    font-size: 20px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--deep-orange) 20%, transparent);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-nickname {
    font-size: 18px;
    font-weight: 700;
}

.profile-username {
    color: var(--md-sys-color-outline);
    font-size: 13px;
}

.profile-form .form-group {
    margin-bottom: 18px;
}

.profile-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-form input[type="text"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 10px;
    font-size: 14px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-form input[type="text"]:focus {
    outline: none;
    border-color: var(--deep-orange);
    box-shadow: 0 0 0 3px rgba(155, 71, 0, 0.12);
}

.profile-form .hint {
    font-size: 12px;
    color: var(--md-sys-color-outline);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.status-message {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    margin-top: 12px;
}

.status-message.loading {
    display: block;
    background: rgba(155, 71, 0, 0.08);
    color: var(--deep-orange);
    border-color: rgba(155, 71, 0, 0.2);
}

.status-message.success {
    display: block;
    background: rgba(27, 94, 32, 0.08);
    color: #1B5E20;
    border-color: rgba(27, 94, 32, 0.25);
}

.status-message.error {
    display: block;
    background: rgba(192, 57, 43, 0.08);
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.25);
}

@media (max-width: 640px) {
    .user-card {
        padding: 20px;
    }

    .user-profile-preview {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions button {
        width: 100%;
        justify-content: center;
    }
}
