/* --- 收藏列表 --- */
body.theme-ethereal .favorites-empty__link {
	border-color: var(--iris);
	color: var(--iris);
}
body.theme-ethereal .favorites-empty__link:hover {
	background: var(--iris);
	color: #fff;
}
body.theme-ethereal .favorites-batch-btn:hover,
body.theme-ethereal .favorites-batch-btn.active {
	border-color: var(--iris);
	color: var(--iris);
}


/* 收藏列表分页 */
.favorites-pagination {
    margin-top: 2rem;
}
.favorites-page-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    display: inline-block;
    margin: 0 3px;
    text-decoration: none;
}
.favorites-page-btn:hover,
.favorites-page-btn.active {
    border-color: var(--accent);
    color: var(--accent);
}
.favorites-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* 收藏加载中 */
.favorites-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 14px;
}


/* 移动端：用户菜单响应式 */
@media (max-width: 768px) {
    .user-pill__name {
        display: none;
    }
    .user-pill {
        padding: 4px;
    }
    .user-pill__avatar {
        width: 30px;
        height: 30px;
    }
}


/* 用户头像悬浮下拉菜单 */
.user-pill__caret {
    font-size: 10px;
    line-height: 1;
    margin-left: 2px;
    opacity: 0.85;
    transition: transform 0.25s ease;
}

.user-menu__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card, rgba(26, 24, 21, 0.96));
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.35));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1100;
}


/* 透明桥接区：避免鼠标从头像移动到菜单时悬浮断开 */
.user-menu__dropdown::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.user-menu:hover .user-menu__dropdown,
.user-menu:focus-within .user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu:hover .user-pill__caret {
    transform: rotate(180deg);
}

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.18s ease, color 0.18s ease;
}

.user-menu__item:hover,
.user-menu__item:focus-visible {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent);
    outline: none;
}

.user-menu__icon {
    width: 18px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}

.user-menu__divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--border-light);
}

.user-menu__item--logout {
    color: var(--color-error, #ef4444);
}
.user-menu__item--logout:hover,
.user-menu__item--logout:focus-visible {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-error, #ef4444);
}

/* ============================================================
   消息提示
   ============================================================ */

.submission-message {
    display: none;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 14px;
}
.submission-message.error {
    display: block;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--error);
}
.submission-message.success {
    display: block;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}
#pose-submit-limit-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

/* ============================================================
   预览模态
   ============================================================ */

.preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.preview-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}
.preview-modal__close {
    position: sticky;
    top: 12px;
    right: 12px;
    float: right;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.preview-modal__close:hover {
    background: rgba(255,255,255,0.2);
}
.preview-modal__body {
    padding: 2rem;
}
.preview-content {
    color: var(--text-primary);
}

/* ============================================================
   我的提交列表页
   ============================================================ */

.my-submissions {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}
.my-submissions__header {
    text-align: center;
    margin-bottom: 2rem;
}
.my-submissions__title {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.my-submissions__filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.my-submissions__filter {
    padding: 6px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.my-submissions__filter:hover,
.my-submissions__filter.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
}
.submission-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    background: var(--bg-card);
    transition: border-color 0.2s;
}
.submission-item:hover {
    border-color: var(--border-color);
}
.submission-item__thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary);
}
.submission-item__info {
    flex: 1;
    min-width: 0;
}
.submission-item__title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.submission-item__meta {
    color: var(--text-muted);
    font-size: 12px;
}
.submission-item__status {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}
.submission-item__status--pending {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}
.submission-item__status--approved {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}
.submission-item__status--rejected {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}
.submission-item__reason {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}
.my-submissions__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.my-submissions__pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
}
.my-submissions__page-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
}
.my-submissions__page-btn:hover,
.my-submissions__page-btn.active {
    border-color: var(--accent);
    color: var(--accent);
}
.my-submissions__page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================
   个人中心页 (profile-page)
   ============================================================ */

.profile-page {
    padding: 2.5rem 0 4rem;
}
.profile-page__header {
    text-align: center;
    margin-bottom: 2rem;
}
.profile-page__title {
    color: var(--text-primary);
    font-size: 2rem;
    margin: 0 0 0.5rem;
}
.profile-page__subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}


/* 自适应双栏布局 */
.profile-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}
.profile-sidebar {
    position: static; /* 防御：单栏下绝不 sticky，避免与下方内容穿模；sticky 仅在 ≥1024px 双栏时启用 */
    min-width: 0;
    display: flex; /* 让头像卡片与下方资料表单模块纵向排列并留出间距 */
    flex-direction: column;
    gap: var(--spacing-lg);
}
.profile-main {
    min-width: 0;
}
.profile-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.profile-notice {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
}
.profile-notice--success {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}
.profile-notice--error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}


/* 用户信息卡片 */
.profile-card {
    padding: 2rem 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.profile-card__avatar {
    flex-shrink: 0;
}
.profile-card__avatar-img {
    border-radius: 50%;
    border: 3px solid var(--accent);
    display: block;
    background: var(--bg-secondary);
}
/* 头像悬停浮层：鼠标划过头像时淡入"更换头像"图标+文字，点击唤起文件选择 */
.profile-card__avatar {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.profile-card__avatar-overlay {
    position: absolute;
    inset: 3px; /* 内缩 3px 让浮层落在头像描边内侧 */
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    line-height: 1.2;
}
.profile-card__avatar:hover .profile-card__avatar-overlay,
.profile-card__avatar-overlay:focus-visible {
    opacity: 1;
}
.profile-card__avatar-overlay-text {
    font-size: 11px;
    font-weight: 600;
}
.profile-card__avatar-input { display: none; }
.profile-card__info {
    flex: 1;
    min-width: 260px;
}
.profile-card__name {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    font-size: 1.4rem;
}
.profile-card__meta {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.profile-card__dot {
    opacity: 0.6;
}
.profile-card__bio {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0.25rem 0 1rem;
}
.profile-card__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.profile-card__link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.profile-card__link:hover {
    background: var(--accent);
    color: var(--bg-primary);
}
.profile-card__link--alt {
    color: var(--text-secondary);
    border-color: var(--border-light);
}
.profile-card__link--alt:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* 桌面双栏布局（权威定义，置于后加载文件中以避免被先加载的 layout.css 覆盖回单栏）。
   侧栏 sticky 固定、主区独立滚动；grid align-items:start + align-self:start 保证 sticky 可正常滚动；z-index 防御穿模。 */
@media (min-width: 1024px) {
    .profile-layout {
        grid-template-columns: 320px 1fr;
        align-items: start;
    }
    .profile-sidebar {
        position: sticky;
        top: 90px;
        align-self: start;
        z-index: 2;
    }
    .profile-sidebar .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-sidebar .profile-card__info {
        min-width: 0;
    }
    .profile-sidebar .profile-card__meta {
        justify-content: center;
    }
    .profile-sidebar .profile-card__actions {
        justify-content: center;
    }
    .profile-sidebar .profile-card__avatar-img {
        width: 104px;
        height: 104px;
    }
    .profile-favorites .pose-grid .pose-card {
        min-width: 180px;
    }
}


/* 表单区域 */
.profile-form-wrap {
    padding: 2rem 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.profile-form-wrap__header {
    margin-bottom: 1.5rem;
}
.profile-form-wrap__title {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}
.profile-form-wrap__hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%; /* 表单已移至 320px 侧栏，铺满列宽；右栏 max-width:640px 约束不再适用 */
}
.profile-form__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-form__label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}
.profile-form input[type="text"],
.profile-form input[type="url"],
.profile-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.profile-form input[type="text"]:focus,
.profile-form input[type="url"]:focus,
.profile-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.profile-form textarea {
    resize: vertical;
    line-height: 1.6;
    min-height: 100px;
}
.profile-form__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 0.5rem;
}
.profile-form__submit {
    align-self: flex-end; /* 修复：HTML 未包 footer，按钮被 flex 默认 stretch 拉成整行宽；改为自适应宽并右对齐 */
    width: auto;
    min-width: 140px;
    padding: 10px 24px;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-form__submit:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-glow);
}

/* 资料表单模块位于侧栏头像卡片下方时的样式优化：
   与上方居中头像卡片视觉呼应（标题/复选框居中、主按钮铺满窄栏），整体读作一组。 */
.profile-sidebar .profile-form-wrap {
    box-sizing: border-box;
}
.profile-sidebar .profile-form-wrap__header {
    text-align: center;
}
.profile-sidebar .profile-form__submit {
    align-self: stretch; /* 窄栏下铺满比右对齐更协调 */
    width: 100%;
}


/* 个人中心 - 我的收藏 */
.profile-favorites {
    padding: 1.75rem 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.profile-favorites__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 1.25rem;
}
.profile-favorites__title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}
.profile-favorites__count {
    color: var(--text-muted);
    font-size: 13px;
}
.profile-favorites__more {
    margin-left: auto;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.profile-favorites__more:hover {
    text-decoration: underline;
}
.profile-favorites__empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}


/* 网格在个人中心内铺满、靠左 */
.profile-favorites .pose-grid {
    padding: 0;
    justify-content: flex-start;
}

