.user-center-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 80vh;
    background: var(--secondary-bg);
    padding: 40px 0;
}
.user-center-sidebar {
    width: 180px;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,100,0.08);
    margin-right: 32px;
    padding: 24px 0 24px 0;
    position: sticky;
    height: fit-content;
    top: 70px;
}
.user-center-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.user-center-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 1.08em;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: left;
}
.user-center-menu-btn.active, .user-center-menu-btn:hover {
    background: var(--primary-color);
    color: #fff;
}
.user-center-content {
    flex: 1;
    max-width: 900px;
    min-width: 600px;
    margin: 0;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,100,0.08);
    padding: 36px 32px 32px 32px;
}
.user-center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.user-center-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-form {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
.profile-form-group {
    margin-bottom: 14px;
}
.profile-form-group label {
    width: 80px;
    font-weight: 700;
    color: var(--text-color);
    flex-shrink: 0;
}
.profile-form-group .profile-form-field-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-form-group input[type="text"],
.profile-form-group input[type="email"],
.profile-form-group select {
    width: fit-content;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1em;
    box-sizing: border-box;
}
.profile-form-group input[type="text"]:focus,
.profile-form-group input[type="email"]:focus,
.profile-form-group input[type="url"]:focus,
.profile-form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
    outline: none;
}
.profile-form-group input[type="text"][disabled],
.profile-form-group input[type="email"][disabled],
.profile-form-group input[type="url"][disabled],
.profile-form-group select[disabled] {
    background: var(--input-bg);
    color: #aaa;
    cursor: not-allowed;
}

.profile-form button {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: background 0.2s;
    display: block;
    width: auto;
    min-width: 120px;
}

.profile-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}
.profile-form-group input[type="url"] {
    flex:1;
    width:fit-content;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1em;
}
.profile-form-group button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: background 0.2s;
    width: auto;
    min-width: 60px;
    padding: 6px 18px;
}
.profile-form-group button:hover {
    background: var(--primary-dark, #6b36b3);
}
.profile-form img {
    margin-top: 8px;
    box-shadow: 0 1px 4px rgba(60,60,100,0.08);
}
.profile-form img.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 8px;
    box-shadow: 0 1px 4px rgba(60,60,100,0.08);
}
.profile-form img.bg-preview {
    width: 280px;
    height: 115px;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 8px;
    box-shadow: 0 1px 4px rgba(60,60,100,0.08);
}
.profile-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 6px;
    min-width: 80px;
}
.profile-btn:hover {
    background: var(--btn-bg-hover, #3fc6fa);
}
#password-strength {
    margin-top: 2px;
    font-size: 0.98em;
}
/* 新密码输入框美化 */
.profile-form-group input[type="password"]#new_password {
    width: 220px;
    min-width: 120px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    background: var(--input-bg, #fff);
    color: var(--text-color, #333);
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.profile-form-group input[type="password"]#new_password:focus {
    border-color: var(--btn-bg-hover, #3fc6fa);
    box-shadow: 0 0 0 2px rgba(124, 63, 204, 0.12);
}
[data-theme="dark"] .profile-form-group input[type="password"]#new_password {
    background: #232323;
    color: #e1e1e1;
    border-color: #7c8cf8;
}
@media (max-width: 900px) {
    .user-center-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }
    .user-center-sidebar {
        flex-direction: row;
        width: 100%;
        margin: 0 0 18px 0;
        border-radius: 12px;
        padding: 0 0 0 0;
        box-shadow: none;
        background: none;
    }
    .user-center-menu {
        flex-direction: row;
        gap: 0;
        width: 100%;
    }
    .user-center-menu-btn {
        flex: 1;
        border-radius: 6px 6px 0 0;
        justify-content: center;
        padding: 12px 0;
        font-size: 1em;
    }
    .user-center-content {
        max-width: 100vw;
        min-width: 0;
        padding: 18px 6vw 18px 6vw;
        border-radius: 12px;
    }
}
[data-theme="dark"] .user-center-sidebar,
[data-theme="dark"] .user-center-content {
    background: var(--bg-color);
}

.user-comment-card {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(60,60,100,0.08);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: background 0.2s, color 0.2s;
}
.user-comment-card a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}
.user-comment-card a:hover {
    color: var(--link-hover-color, #3fc6fa);
}
.user-comment-card .custom-emoji {
    vertical-align: -4px;
    margin: 0 2px;
}
.user-comment-card .comment-date {
    color: var(--secondary-text-color, #aaa);
}
[data-theme='dark'] .user-comment-card {
    /* 深色模式下的背景和边框 */
    background: var(--bg-color-dark, #232323);
    border-color: var(--border-color-dark, #333);
    color: var(--text-color-dark, #e1e1e1);
}