/* ===== 头像框样式 ===== */
.avatar-frame {
    position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
    z-index: 2;
}
.avatar-frame.simple-silver {
    border: 3px solid #c0c0c0;
    box-shadow: 0 0 6px rgba(192,192,192,0.4);
}
.avatar-frame.warm-gold {
    border: 3px solid #d4a843;
    box-shadow: 0 0 8px rgba(212,168,67,0.5);
}
.avatar-frame.emerald {
    border: 3px solid #2dd4a0;
    box-shadow: 0 0 8px rgba(45,212,160,0.4);
}
.avatar-frame.galaxy-purple {
    border: 3px solid transparent;
    background: linear-gradient(135deg, #a855f7, #6366f1, #ec4899) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: frame-rotate 3s linear infinite;
}
.avatar-frame.flame-red {
    border: 3px solid transparent;
    background: linear-gradient(135deg, #ff4d4f, #fa8c16, #ff4d4f) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: frame-pulse 1.5s ease-in-out infinite;
}
.avatar-frame.aurora {
    border: 3px solid transparent;
    background: conic-gradient(from var(--aurora-angle, 0deg), #ff4d4f, #fa8c16, #fadb14, #52c41a, #1890ff, #722ed1, #ff4d4f) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: frame-aurora 2s linear infinite;
}
@keyframes frame-rotate {
    to { filter: hue-rotate(360deg); }
}
@keyframes frame-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255,77,79,0.4); }
    50% { box-shadow: 0 0 16px rgba(255,77,79,0.8); }
}
@keyframes frame-aurora {
    to { --aurora-angle: 360deg; }
}
@property --aurora-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ===== 称号样式 ===== */
.user-title-badge {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 0.72em; font-weight: 700; line-height: 1.4;
}
.user-title-badge.iron {
    background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.3);
}
.user-title-badge.strategy {
    background: rgba(59,130,246,0.12); color: #3b82f6; border: 1px solid rgba(59,130,246,0.3);
}
.user-title-badge.builder {
    background: rgba(34,197,94,0.12); color: #22c55e; border: 1px solid rgba(34,197,94,0.3);
}
.user-title-badge.legend-gold {
    background: linear-gradient(135deg, rgba(212,168,67,0.15), rgba(255,200,50,0.1));
    color: #d4a843; border: 1px solid rgba(212,168,67,0.4);
    text-shadow: 0 0 8px rgba(212,168,67,0.3);
}
.user-title-badge.commander-rainbow {
    background: linear-gradient(135deg, rgba(255,77,79,0.1), rgba(59,130,246,0.1), rgba(168,85,247,0.1));
    color: transparent;
    background-clip: text; -webkit-background-clip: text;
    border: 1px solid rgba(168,85,247,0.3);
    animation: title-rainbow 3s linear infinite;
}
.user-title-badge.commander-rainbow::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    background: linear-gradient(90deg, #ff4d4f, #fa8c16, #fadb14, #52c41a, #1890ff, #722ed1, #ff4d4f);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: title-rainbow-shift 3s linear infinite;
}
.user-title-badge.commander-rainbow {
    position: relative;
}
@keyframes title-rainbow-shift {
    to { background-position: -200% 0; }
}
.toast-msg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.78);
    color: #fff;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 0.92em;
    font-weight: 600;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s;
    text-align: center;
}
.toast-msg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }



/* ===== 头像框图片叠加 ===== */
.pc-avatar.avatar-framed {
    position: relative;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50%;
}
/* 头像本体：圆形裁切，z-index低于框 */
.pc-avatar.avatar-framed .av-inner {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}
.pc-avatar.avatar-framed .av-inner-text {
    position: relative;
    z-index: 1;
}
/* PNG头像框：绝对定位覆盖在头像上方 */
.avatar-frame-img {
    position: absolute !important;
    inset: -4px;
    width: calc(100% + 8px) !important;
    height: calc(100% + 8px) !important;
    pointer-events: none;
    z-index: 3;
    object-fit: contain;
    border-radius: 0;
}
/* SVG头像框：绝对定位覆盖在头像上方 */
.avatar-frame-svg {
    position: absolute !important;
    inset: -5px;
    width: calc(100% + 10px) !important;
    height: calc(100% + 10px) !important;
    pointer-events: none;
    z-index: 3;
    object-fit: contain;
    border-radius: 0;
}

/* 帖子详情中头像框稍大 */
.detail-author .avatar-frame-img {
    inset: -6px;
    width: calc(100% + 12px) !important;
    height: calc(100% + 12px) !important;
}
.detail-author .avatar-frame-svg {
    inset: -7px;
    width: calc(100% + 14px) !important;
    height: calc(100% + 14px) !important;
}
