/* ========================================
   小彡AI v2 - 主样式表
   ======================================== */

/* CSS 变量动画支持 - 必须在最前面定义 */
@property --bg-gradient-color1 {
    syntax: '<color>';
    inherits: false;
    initial-value: #1e1e30;
}

@property --bg-gradient-color2 {
    syntax: '<color>';
    inherits: false;
    initial-value: #12121a;
}

@property --bg-gradient-color3 {
    syntax: '<color>';
    inherits: false;
    initial-value: #06060a;
}

@property --bg-gradient-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 180deg;
}

/* ========================================
   入场动画
   ======================================== */
/* ========================================
   入场动画 — 清新温暖风格
   ======================================== */

.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: var(--page-bg, #12121a);
    overflow: hidden;
}

/* 背景浮动光球 */
.welcome-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(50px);
    animation: orbFloat 8s ease-in-out infinite;
}

.welcome-orb-1 {
    width: 250px; height: 250px;
    background: var(--accent-color, #c084fc);
    top: 10%; left: 15%;
    animation-delay: 0s;
}

.welcome-orb-2 {
    width: 200px; height: 200px;
    background: #f48fb1;
    top: 60%; right: 10%;
    animation-delay: -2s;
}

.welcome-orb-3 {
    width: 150px; height: 150px;
    background: #90caf9;
    bottom: 15%; left: 25%;
    animation-delay: -4s;
}

.welcome-orb-4 {
    width: 120px; height: 120px;
    background: #80cbc4;
    top: 20%; right: 25%;
    animation-delay: -6s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.1); }
    66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* 左右幕布 */
.welcome-left, .welcome-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: var(--page-bg, #12121a);
    transition: transform 0.8s var(--ease-spring-strong);
    will-change: transform;
    z-index: 2;
}

.welcome-left {
    left: 0;
}

.welcome-right {
    right: 0;
}

.welcome-overlay.opening .welcome-left {
    transform: translateX(-102%);
}

.welcome-overlay.opening .welcome-right {
    transform: translateX(102%);
}

/* 中心内容 */
.welcome-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.7s var(--ease-jelly);
}

.welcome-overlay.show .welcome-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.welcome-overlay.opening .welcome-content {
    opacity: 0;
    transform: scale(1.05);
    transition: all 0.3s ease-out;
}

/* 头像 */
.welcome-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.15);
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 品牌名 */
.welcome-brand {
    font-size: clamp(32px, 7vw, 48px);
    font-weight: 200;
    color: var(--text-primary);
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.welcome-version {
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color, #c084fc), #f48fb1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Slogan */
.welcome-slogan {
    font-size: clamp(12px, 2.5vw, 14px);
    color: var(--text-tertiary);
    font-style: italic;
    letter-spacing: 0.2em;
    font-weight: 300;
}

/* 进入按钮 */
.welcome-enter-btn {
    display: none;
    margin: 32px auto 0;
    padding: 12px 40px;
    border: none;
    border-radius: 24px;
    background: var(--accent-color, #c084fc);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.35s var(--ease-bounce);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.welcome-enter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

.welcome-enter-btn:active {
    transform: scale(0.95);
}

.welcome-enter-btn.visible {
    display: block;
    animation: welcomeBtnIn 0.5s var(--ease-jelly) both;
}

@keyframes welcomeBtnIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 隐藏状态 */
.welcome-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease 0.3s;
}

/* ========================================
   主题切换过渡 — 颜色平滑渐变
   ======================================== */
body,
.top-nav,
.messages-container,
.chat-input-area,
.emotion-bar,
.input-status,
.bubble-default,
.bubble-rounded,
.bubble-minimal,
.message-bubble,
.questions-panel,
.plus-menu,
.modal-card,
.toast,
.settings-section,
.settings-group-title,
.ban-bar {
    transition: background-color 0.5s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   移动端触摸反馈 — .touch-active 镜像 :active
   ======================================== */
.nav-btn.touch-active { transform: scale(0.82); }
.emotion-tag.touch-active { transform: scale(0.85); }
.questions-btn.touch-active { transform: scale(0.82); }
.questions-close.touch-active { transform: scale(0.85); }
.question-chip.touch-active { transform: scale(0.85); }
.plus-btn.touch-active { transform: scale(0.8); }
.send-btn.active.touch-active { transform: scale(0.78); }
.send-btn.interrupting.touch-active { transform: scale(0.78); }
.menu-item.touch-active { transform: scale(0.85); }
.action-btn.touch-active { transform: scale(0.9); }
.modal-btn.touch-active { transform: scale(0.92); }
.modal-close.touch-active { transform: scale(0.85); }
.back-btn.touch-active { transform: scale(0.85); }
.theme-option.touch-active { transform: scale(0.85); }
.toggle-btn.touch-active { transform: scale(0.85); }
.nickname-save-btn.touch-active { transform: scale(0.9); }
.avatar-upload-btn.touch-active,
.avatar-remove-btn.touch-active { transform: scale(0.9); }
.welcome-enter-btn.touch-active { transform: scale(0.92); }

/* 设置开关控制的动效禁用 */
.no-animation *,
.no-animation *::before,
.no-animation *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

.no-transition *,
.no-transition *::before,
.no-transition *::after {
    transition-duration: 0s !important;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-y pinch-zoom;
    font-size: var(--fs-16);
}

body {
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    background-color: #12121a;
}

/* 去除移动端点击闪白高亮 + 焦点轮廓白闪 */
button, label, a, [role="button"] {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* 渐变背景层 - 用于平滑过渡 */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: opacity 0.5s ease;
}

#bgLayer1 {
    opacity: 1;
}

#bgLayer2 {
    opacity: 0;
}

/* 触摸涟漪 */
#rippleContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 粒子动画 canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.touch-ripple {
    position: fixed;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.4s ease-out forwards;
    pointer-events: none;
    will-change: transform, opacity;
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* 页面切换 */
.page {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    transition: width 0.4s var(--ease-spring), max-width 0.4s var(--ease-spring), height 0.4s var(--ease-spring), border-radius 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-smooth);
}

.page.active {
    display: flex;
}

/* ========================================
   顶部导航栏
   ======================================== */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    transition: background 0.4s var(--ease-smooth);
}

.nav-left {
    flex: 1;
}

.app-title {
    font-size: var(--fs-16);
    font-weight: 600;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-center {
    flex: 2;
    text-align: center;
}

.app-slogan {
    font-size: var(--fs-11);
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--ease-bounce), background 0.2s ease, color 0.2s ease;
    will-change: transform;
}

.nav-btn:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.82);
}

/* ========================================
   EMO模式情绪标签栏
   ======================================== */
.emotion-bar {
    display: none;
    padding: 10px 16px;
    background: var(--emotion-bar-bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.emotion-bar::-webkit-scrollbar {
    display: none;
}

.emotion-bar.active {
    display: block;
}

.emotion-tags {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.emotion-tag {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--emotion-tag-border);
    background: var(--emotion-tag-bg);
    color: var(--emotion-tag-text);
    font-size: var(--fs-13);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.emotion-tag:hover {
    background: var(--emotion-tag-hover-bg);
    border-color: var(--emotion-tag-hover-border);
    color: var(--emotion-tag-hover-text);
    transform: translateY(-3px) scale(1.03);
}

.emotion-tag:active {
    transform: scale(0.85);
}

.emotion-tag.selected {
    background: var(--emotion-tag-active-bg);
    border-color: var(--emotion-tag-active-border);
    color: var(--emotion-tag-active-text);
    box-shadow: 0 0 12px var(--emotion-glow);
}

/* ========================================
   预设问题区域
   ======================================== */
.quick-questions {
    padding: 12px 16px;
    background: var(--questions-bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    overflow: hidden;
}

.questions-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.questions-scroll::-webkit-scrollbar {
    display: none;
}

/* 预设问题按钮 */
.questions-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.questions-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    transform: scale(1.1);
}

.questions-btn:active {
    transform: scale(0.82);
}

.questions-btn.active {
    transform: rotate(180deg);
}

/* 预设问题面板 */
.questions-panel {
    position: absolute;
    bottom: 70px;
    left: 16px;
    right: 16px;
    max-height: 300px;
    background: var(--menu-bg);
    border-radius: 16px;
    border: 1px solid var(--menu-border);
    box-shadow: 0 8px 32px var(--shadow-heavy);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.92);
    transition: opacity 0.3s var(--ease-jelly), transform 0.35s var(--ease-jelly), visibility 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    will-change: transform, opacity;
}

.questions-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.questions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.questions-title {
    font-size: var(--fs-14);
    font-weight: 600;
    color: var(--text-primary);
}

.questions-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s var(--ease-bounce), background 0.2s ease, color 0.2s ease;
}

.questions-close:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}

.questions-close:active {
    transform: scale(0.85);
}

.questions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.question-chip {
    padding: 8px 14px;
    border-radius: 16px;
    border: 1px solid var(--chip-border);
    background: var(--chip-bg);
    color: var(--chip-text);
    font-size: var(--fs-12);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.question-chip:hover {
    background: var(--chip-hover-bg);
    border-color: var(--chip-hover-border);
    color: var(--chip-hover-text);
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.question-chip:active {
    transform: scale(0.85);
}

/* ========================================
   对话消息区域
   ======================================== */
.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: var(--messages-bg);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    justify-content: flex-end;
}

/* 消息项 */
.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    align-items: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

/* 消息头像 */
.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--menu-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-avatar svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
}

.message.user .message-avatar {
    background: var(--accent-color);
}

.message.user .message-avatar svg {
    color: white;
}

/* 消息气泡 */
.message-bubble {
    padding: 12px 16px;
    font-size: var(--fs-14);
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    position: relative;
}

/* 圆角气泡样式 - 短信风格 */
.bubble-round .message-bubble {
    border-radius: 18px;
}

.bubble-round .message.user .message-bubble {
    border-bottom-right-radius: 4px;
}

.bubble-round .message.assistant .message-bubble {
    border-bottom-left-radius: 4px;
}

/* 方角气泡样式 - 短信风格 */
.bubble-square .message-bubble {
    border-radius: 8px;
}

/* 用户消息 - 短信风格 */
.message.user .message-bubble {
    background: var(--user-bubble-bg);
    color: var(--user-bubble-text);
}

/* AI消息 - 短信风格 */
.message.assistant .message-bubble {
    background: var(--assistant-bubble-bg);
    color: var(--assistant-bubble-text);
}

.message.assistant .message-bubble strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* 代码块样式 */
.message-bubble code {
    display: block;
    background: #1e1e2e;
    color: #a6e3a1;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 8px 0;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 300px;
    white-space: pre;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}
.message-bubble code::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.message-bubble code::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}
.message-bubble code::-webkit-scrollbar-track {
    background: transparent;
}

/* 消息时间戳 */
.message-time {
    font-size: var(--fs-11);
    color: var(--text-tertiary);
    margin-top: 4px;
    text-align: right;
}

.message.assistant .message-time {
    text-align: left;
}

/* 思考指示器 - 气泡样式 */
.thinking-indicator {
    display: flex;
    gap: 10px;
    max-width: 85%;
    align-items: flex-start;
}

.thinking-indicator .thinking-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--menu-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
}

.thinking-indicator .thinking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thinking-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.thinking-bubble {
    background: var(--assistant-bubble-bg);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 52px;
}

.thinking-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.thinking-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: thinkingBounce 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ========== 思考动画 - 19种随机样式 ========== */

.thinking-bubble-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    min-width: 60px;
    flex-shrink: 0;
}

.thinking-text {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 6px;
    letter-spacing: 0.5px;
    transition: opacity 0.15s ease;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

.thinking-text.fade-out {
    opacity: 0;
}

/* AI免责声明 */
.ai-disclaimer {
    font-size: var(--fs-11);
    color: var(--text-tertiary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-light);
}

.error-report-btn {
    color: #ff6b6b;
    position: relative;
}

.error-report-btn:hover {
    background: rgba(255, 100, 100, 0.15);
    color: #ff6b6b;
}

.error-report-btn::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

/* Error Report Modal */
.error-report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.error-report-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.error-report-card {
    background: var(--modal-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 16px 48px var(--shadow-heavy);
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s var(--ease-spring-strong), opacity 0.25s ease;
}

.error-report-overlay.active .error-report-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.error-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.error-report-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.error-report-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--btn-ghost);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-report-body {
    padding: 16px 20px;
}

.error-report-info {
    margin-bottom: 12px;
}

.error-report-label {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-report-detail {
    font-size: 13px;
    color: #ff6b6b;
    background: rgba(255, 100, 100, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 100, 100, 0.15);
    word-break: break-all;
}

.error-report-field {
    margin-bottom: 12px;
}

.error-report-field label {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 500;
}

.error-report-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.error-report-input:focus {
    border-color: var(--accent-color);
}

.error-report-footer {
    display: flex;
    gap: 8px;
    padding: 12px 20px 16px;
    justify-content: flex-end;
}

.error-report-cancel {
    padding: 8px 16px;
    background: var(--btn-ghost);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.error-report-submit {
    padding: 8px 16px;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce);
}

.error-report-submit:hover {
    transform: scale(1.02);
}

.error-report-submit:active {
    transform: scale(0.98);
}

.error-report-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
    will-change: transform;
    transform-origin: center center;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.error-report-inline-msg {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

.error-report-inline-msg.warn {
    display: block;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.25);
    color: #ff9800;
}

.error-report-inline-msg.error {
    display: block;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.25);
    color: #ff6b6b;
}

/* ========================================
   动画系统 - 120fps GPU加速
   ======================================== */

/* 弹性缓动：快速出发，自然减速 */
:root {
    --ease-spring: cubic-bezier(0.22, 1.0, 0.36, 1.0);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1.0);
    --ease-jelly: cubic-bezier(0.25, 1.25, 0.5, 1.08);
    --ease-squish: cubic-bezier(0.36, 0.07, 0.19, 1.56);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1.0);
    --ease-out-expo: cubic-bezier(0.16, 1.0, 0.3, 1.0);
    --ease-spring-strong: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-spring-out: cubic-bezier(0.34, 1.56, 0.64, 1.0);
    --ease-smooth-out: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

:root {
    --fs-10: 10px;
    --fs-11: 11px;
    --fs-12: 12px;
    --fs-13: 13px;
    --fs-14: 14px;
    --fs-15: 15px;
    --fs-16: 16px;
    --fs-18: 18px;
    --fs-32: 32px;
    --fs-56: 56px;
}



/* 消息动画 — JS弹簧引擎驱动，CSS不参与 */
.message {
    will-change: transform, opacity;
}

.message.user, .message.assistant {
    animation: none;
}

/* 涟漪效果 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: width, height, opacity;
}

/* 思考指示器动画 */
@keyframes thinkingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.thinking-indicator {
    will-change: transform, opacity;
    animation: thinkingFadeIn 0.3s var(--ease-spring) both;
}

@keyframes thinkingFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   输入区域
   ======================================== */
.input-area {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--input-area-bg);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    transition: background 0.4s var(--ease-smooth);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    position: relative;
}

.questions-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.questions-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    transform: scale(1.1);
}

.questions-btn:active {
    transform: scale(0.82);
}

.questions-btn.active {
    transform: rotate(180deg);
}

.chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 100px;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font-size: var(--fs-14);
    font-family: inherit;
    resize: none;
    outline: none;
    overflow: hidden;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.chat-input::placeholder {
    color: var(--input-placeholder);
}

.chat-input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

.input-btn-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.plus-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.plus-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    transform: scale(1.12);
}

.plus-btn:active {
    transform: scale(0.8);
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--send-btn-bg);
    color: var(--send-btn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--ease-spring), opacity 0.3s ease, box-shadow 0.3s ease;
    opacity: 0.5;
    pointer-events: none;
    will-change: transform;
}

.send-btn.active {
    opacity: 1;
    pointer-events: auto;
}

.send-btn.active:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.send-btn.active:active {
    transform: scale(0.78);
}

/* 中断按钮状态 — 红色停止图标 */
.send-btn.interrupting {
    background: #ef4444;
    color: #fff;
    opacity: 1;
    pointer-events: auto;
    animation: interruptPulse 1s ease-in-out infinite;
}

.send-btn.interrupting:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.send-btn.interrupting:active {
    transform: scale(0.78);
}

@keyframes interruptPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.input-status {
    font-size: var(--fs-12);
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 8px;
    min-height: 16px;
}

/* ========================================
   +菜单弹窗
   ======================================== */
.plus-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: var(--menu-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid var(--menu-border);
    box-shadow: 0 8px 32px var(--shadow-heavy);
    padding: 16px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: opacity 0.3s var(--ease-jelly), transform 0.35s var(--ease-jelly), visibility 0.3s;
    max-width: 280px;
    will-change: transform, opacity;
}

.plus-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu-item {
    transition: transform 0.3s var(--ease-bounce), background 0.2s ease;
}

.menu-item:hover {
    transform: scale(1.05);
}

.menu-item:active {
    transform: scale(0.85);
}

.menu-item.emo-active {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
    border-color: var(--accent-color);
}

.menu-item.emo-active .menu-icon {
    color: var(--accent-color);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
    background: var(--menu-item-hover);
}

.menu-item:active {
    transform: scale(0.85);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--menu-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    transition: transform 0.3s var(--ease-bounce), background 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:hover .menu-icon {
    transform: scale(1.12);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.menu-label {
    font-size: var(--fs-11);
    font-weight: 500;
}

/* ========================================
   设置页面
   ======================================== */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    transition: background 0.4s var(--ease-smooth);
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s var(--ease-bounce), background 0.2s ease, color 0.2s ease;
}

.back-btn:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}

.back-btn:active {
    transform: scale(0.85);
}

.settings-title {
    font-size: var(--fs-18);
    font-weight: 600;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-spacer {
    width: 36px;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.settings-section {
    background: var(--section-bg);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 16px;
    margin-bottom: 16px;
}

.section-title {
    font-size: var(--fs-15);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* 主题选择网格 */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.theme-option:hover {
    background: var(--menu-item-hover);
    transform: scale(1.08);
    box-shadow: 0 4px 16px var(--shadow-color);
}

.theme-option:active {
    transform: scale(0.85);
}

.theme-option.selected {
    border-color: var(--accent-color);
}

.theme-preview {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    transition: transform 0.3s var(--ease-bounce), box-shadow 0.2s ease;
    pointer-events: none;
}

.theme-option.selected .theme-preview {
    transform: scale(1.15);
    box-shadow: 0 2px 16px var(--shadow-color);
    animation: previewPulse 0.4s var(--ease-squish);
}

@keyframes previewPulse {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.15); }
}

.light-preview { background: linear-gradient(135deg, #fff0f5, #ffe4ec); }
.blue-preview { background: linear-gradient(135deg, #e6f0fa, #d4e8f7); }
.green-preview { background: linear-gradient(135deg, #e6f5ec, #d9f0e3); }
.wheat-preview { background: linear-gradient(135deg, #fff4df, #fef0cf); }
.chocolate-preview { background: linear-gradient(135deg, #3b2618, #261a10); }
.dark-preview { background: linear-gradient(135deg, #1a1a2e, #0f0f1a); }
.gold-preview { background: linear-gradient(135deg, #1e1a0c, #0a0906); }
.cosmic-preview { background: linear-gradient(135deg, #0c1224, #060c18); }
.bw-preview { background: linear-gradient(135deg, #ffffff, #e0e0e0); border: 1px solid rgba(0,0,0,0.1); }
.wb-preview { background: linear-gradient(135deg, #0a0a0a, #1a1a1a); border: 1px solid rgba(255,255,255,0.1); }

.theme-name {
    font-size: var(--fs-12);
    color: var(--text-secondary);
    pointer-events: none;
}

/* 渐变方向预设 */
.gradient-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

@media (min-width: 600px) {
    .gradient-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.gradient-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: none;
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}

.gradient-option:hover {
    border-color: var(--border-light);
    transform: scale(1.08);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.gradient-option.active {
    border-color: var(--accent-color);
}

.gradient-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

/* 方向预览 - 用箭头线表示渐变方向 */
.gradient-preview::after {
    content: '';
    position: absolute;
    background: var(--accent-color);
    opacity: 0.6;
}

.dir-default {
    background: linear-gradient(180deg, var(--accent-color) 0%, transparent 100%);
}
.dir-default::after {
    width: 2px;
    height: 16px;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}
.dir-default::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--accent-color);
    opacity: 0.6;
}

.dir-diagonal {
    background: linear-gradient(135deg, var(--accent-color) 0%, transparent 100%);
}
.dir-diagonal::after {
    width: 2px;
    height: 20px;
    top: 6px;
    left: 10px;
    transform: rotate(45deg);
    transform-origin: top left;
}

.dir-horizontal {
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 100%);
}
.dir-horizontal::after {
    width: 16px;
    height: 2px;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
}

.dir-reverse {
    background: linear-gradient(0deg, var(--accent-color) 0%, transparent 100%);
}
.dir-reverse::after {
    width: 2px;
    height: 16px;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.dir-radial {
    background: radial-gradient(circle at center, var(--accent-color) 0%, transparent 70%);
}
.dir-radial::after {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-color);
    opacity: 0.8;
}

.dir-symmetric {
    background: linear-gradient(180deg, var(--accent-color) 0%, transparent 50%, var(--accent-color) 100%);
}
.dir-symmetric::after {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    background: var(--accent-color);
    opacity: 0.5;
}
.dir-symmetric::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1.5px;
    top: 50%;
    left: 0;
    background: var(--accent-color);
    opacity: 0.4;
}

.gradient-name {
    font-size: var(--fs-11);
    color: var(--text-secondary);
    pointer-events: none;
}

/* ========================================
   自定义渐变颜色选择器
   ======================================== */
.custom-gradient-area {
    margin-top: 12px;
}

.gradient-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    cursor: pointer;
    font-size: var(--fs-14);
    color: var(--text-primary);
}

.toggle-checkbox {
    width: 40px;
    height: 22px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--toggle-bg);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s var(--ease-bounce);
    border: none;
    outline: none;
}

.toggle-checkbox::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.35s var(--ease-bounce);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-checkbox:checked {
    background: var(--accent-color);
}

.toggle-checkbox:checked::after {
    transform: translateX(18px);
}

.gradient-color-pickers {
    margin-top: 12px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.gradient-color-pickers.active {
    display: flex;
}

.color-pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-label {
    font-size: var(--fs-13);
    color: var(--text-secondary);
    min-width: 50px;
}

.color-input {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: transparent;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.color-value {
    font-size: var(--fs-12);
    color: var(--text-tertiary);
    font-family: monospace;
}

.custom-gradient-preview {
    height: 40px;
    border-radius: 10px;
    margin-top: 8px;
    border: 1px solid var(--border-light);
    transition: background 0.3s ease;
}

.section-desc {
    font-size: var(--fs-12);
    color: var(--text-tertiary);
    margin-top: 4px;
}

.setting-hint {
    font-size: var(--fs-12);
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 设置项 */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: var(--fs-14);
    color: var(--text-primary);
    white-space: nowrap;
}

/* 切换按钮组 */
.setting-toggle {
    display: flex;
    gap: 4px;
    background: var(--toggle-bg);
    padding: 4px;
    border-radius: 8px;
}

.toggle-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--fs-13);
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, color 0.3s ease;
    will-change: transform;
}

.toggle-btn:hover {
    transform: scale(1.06);
}

.toggle-btn:active {
    transform: scale(0.85);
}

.toggle-btn.active {
    background: var(--accent-color);
    color: white;
}

/* 开关 */
.switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--toggle-bg);
    border-radius: 26px;
    transition: background 0.3s var(--ease-bounce);
}

.slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.35s var(--ease-bounce);
}

input:checked + .slider {
    background: var(--accent-color);
}

input:checked + .slider::before {
    transform: translateX(22px);
}

/* 操作按钮 */
.action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    font-size: var(--fs-13);
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.action-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 导出全屏 loading 遮罩 */
.export-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.export-loading-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-light, rgba(0,0,0,0.06));
    border-radius: 20px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    min-width: 280px;
}

.export-avatar-ring {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 0deg, #c084fc, #f472b6, #fb923c, #c084fc);
    animation: ringRotate 2s linear infinite;
}

@keyframes ringRotate {
    to { transform: rotate(360deg); }
}

.export-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-bg, #fff);
    display: block;
}

.export-loading-text {
    font-size: var(--fs-15);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 16px;
}

.export-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-light, rgba(0,0,0,0.06));
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.export-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c084fc, #f472b6);
    border-radius: 2px;
    transition: width 0.15s ease, background 0.3s ease;
}

.export-loading-hint {
    font-size: var(--fs-12);
    color: var(--text-secondary);
    margin: 0;
}

/* 对话统计 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.stat-item {
    text-align: center;
    padding: 10px 4px;
    border-radius: 10px;
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--border-light, rgba(0,0,0,0.06));
}

.stat-value {
    display: block;
    font-size: var(--fs-18);
    font-weight: 600;
    color: var(--accent-color);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: var(--fs-11);
    color: var(--text-secondary);
    margin-top: 2px;
}

.memory-notice {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    font-size: var(--fs-11);
    color: var(--text-secondary);
    line-height: 1.5;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    max-height: 100px;
    overflow: hidden;
}

.memory-notice.hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.memory-notice svg {
    color: #f59e0b;
}

.memory-notice-close {
    flex-shrink: 0;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--fs-16);
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.memory-notice-close:hover {
    opacity: 1;
}

/* 渐变角度自定义 */
.gradient-angle-row {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light, rgba(0,0,0,0.06));
}

/* 粒子动画设置 */
.particle-settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-jelly), opacity 0.3s var(--ease-jelly);
    opacity: 0;
}

.particle-settings.active {
    max-height: 800px;
    opacity: 1;
}

.setting-sub-item {
    padding: 8px 0;
}

.sub-label {
    font-size: var(--fs-13);
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.particle-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.effect-type-grid {
    grid-template-columns: repeat(3, 1fr);
}

.particle-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: none;
    cursor: pointer;
    font-size: var(--fs-11);
    color: var(--text-secondary);
    transition: transform 0.4s var(--ease-spring), border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    backface-visibility: hidden;
}

.particle-type-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
    transform: scale(1.08);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.particle-type-btn.active {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.particle-type-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.particle-preview {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dot-preview {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.7;
}

.star-preview {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.7;
}

.heart-preview {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    clip-path: path('M8 14 C8 14, 0 8, 0 4.5 C0 2, 2 0, 4 0 C5.5 0, 7 1, 8 2.5 C9 1, 10.5 0, 12 0 C14 0, 16 2, 16 4.5 C16 8, 8 14, 8 14Z');
    opacity: 0.7;
}

.snow-preview {
    width: 16px;
    height: 16px;
    position: relative;
}

.snow-preview::before,
.snow-preview::after {
    content: '';
    position: absolute;
    background: var(--accent-color);
    opacity: 0.7;
}

.snow-preview::before {
    width: 16px;
    height: 1.5px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.snow-preview::after {
    width: 1.5px;
    height: 16px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.effect-icon {
    font-size: var(--fs-16);
    line-height: 1;
    color: var(--accent-color);
    opacity: 0.8;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.slider-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-light, rgba(0,0,0,0.08));
    border-radius: 2px;
    outline: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 2px solid var(--card-bg, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.slider-value {
    font-size: var(--fs-13);
    font-weight: 500;
    color: var(--text-primary);
    min-width: 36px;
    text-align: right;
}

/* ========================================
   头像上传区域
   ======================================== */
.avatar-upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px dashed var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--toggle-bg);
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s var(--ease-bounce);
}

.avatar-preview:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview svg {
    color: var(--text-tertiary);
}

.avatar-info {
    flex: 1;
}

.avatar-hint {
    font-size: var(--fs-13);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.avatar-limit {
    font-size: var(--fs-11);
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.avatar-upload-btn,
.avatar-remove-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    font-size: var(--fs-12);
    cursor: pointer;
    transition: transform 0.25s var(--ease-bounce), background 0.2s ease, border-color 0.2s ease;
    margin-right: 8px;
}

.avatar-upload-btn:hover,
.avatar-remove-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    transform: scale(1.05);
}

.avatar-upload-btn:active,
.avatar-remove-btn:active {
    transform: scale(0.9);
}

.avatar-remove-btn {
    border-color: #e74c3c;
    color: #e74c3c;
    background: transparent;
}

.avatar-remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* ========================================
   昵称输入
   ======================================== */
.nickname-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nickname-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font-size: var(--fs-14);
    outline: none;
    transition: all 0.2s ease;
}

.nickname-input::placeholder {
    color: var(--input-placeholder);
}

.nickname-input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

.nickname-save-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: var(--send-btn-bg);
    color: var(--send-btn-text);
    font-size: var(--fs-13);
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s var(--ease-bounce), box-shadow 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.nickname-save-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.nickname-save-btn:active {
    transform: scale(0.9);
}

/* ========================================
   弹窗
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-smooth), visibility 0.3s, backdrop-filter 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.closing {
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.closing .modal-card {
    transform: scale(0.92) translateY(20px);
}

.modal-card {
    background: var(--modal-bg);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 16px 48px var(--shadow-heavy);
    max-width: 400px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s var(--ease-spring-strong);
    will-change: transform;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: var(--fs-18);
    font-weight: 600;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s var(--ease-bounce), background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.85);
}

.modal-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    font-size: var(--fs-14);
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    scroll-behavior: smooth;
}

/* 代码块样式 */
.modal-content .code-block {
    background: #1e1e2e;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: var(--fs-13);
    line-height: 1.6;
    border: 1px solid rgba(255,255,255,0.06);
}

.modal-content .code-block code {
    color: #cdd6f4;
}

.modal-content .token-comment { color: #6c7086; font-style: italic; }
.modal-content .token-keyword { color: #cba6f7; font-weight: 600; }
.modal-content .token-string { color: #a6e3a1; }
.modal-content .token-operator { color: #89dceb; }

/* 弹窗内段落样式 */
.modal-content .security-section {
    margin-bottom: 12px;
}

.modal-content .security-section:last-child {
    margin-bottom: 0;
}

.modal-content .security-section p {
    margin: 6px 0;
    white-space: normal;
}

.modal-content .security-section ul,
.modal-content .security-section ol {
    margin: 6px 0;
    padding-left: 20px;
}

.modal-content .security-section li {
    margin: 3px 0;
    white-space: normal;
}

.modal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: var(--send-btn-bg);
    color: var(--send-btn-text);
    font-size: var(--fs-14);
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s var(--ease-bounce), box-shadow 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.modal-btn:active {
    transform: scale(0.92);
}

/* ========================================
   浮动提示
   ======================================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.92);
    background: var(--toast-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--toast-border);
    border-radius: 20px;
    padding: 10px 20px;
    font-size: var(--fs-13);
    color: var(--toast-text);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-jelly), transform 0.35s var(--ease-jelly), visibility 0.3s;
    white-space: nowrap;
    box-shadow: 0 8px 24px var(--shadow-color);
    will-change: transform, opacity;
}

.toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* ========================================
   禁言提示条
   ======================================== */
.ban-bar {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    background: rgba(220, 38, 38, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.8);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-jelly), transform 0.4s var(--ease-jelly), visibility 0.3s;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
    will-change: transform, opacity;
    max-width: calc(100vw - 32px);
}

.ban-bar.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ban-icon {
    flex-shrink: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.ban-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ban-text {
    font-size: var(--fs-13);
    font-weight: 600;
    color: #ffffff;
}

.ban-tip {
    font-size: var(--fs-11);
    color: rgba(255, 255, 255, 0.7);
}

.ban-timer {
    font-size: var(--fs-13);
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* ========================================
   搜索结果卡片 & 系统消息
   ======================================== */
.system-msg {
    display: flex;
    justify-content: center;
    padding: 4px 0;
    animation: thinkingFadeIn 0.3s var(--ease-spring) both;
}

.system-msg-text {
    font-size: var(--fs-12);
    color: var(--text-tertiary);
    background: var(--chip-bg);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid var(--chip-border);
}

/* ========================================
   搜索进度动画
   ======================================== */
.search-progress {
    max-width: 85%;
    margin: 8px auto;
    animation: fadeIn 0.35s var(--ease-spring) both;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.search-progress.fade-out {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    pointer-events: none;
}

.search-progress-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: 14px 14px 0 0;
    border-bottom: none;
}

.search-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--chip-border);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-progress-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-progress-text {
    font-size: var(--fs-13);
    font-weight: 500;
    color: var(--text-primary);
}

.search-progress-count {
    font-size: var(--fs-11);
    color: var(--text-tertiary);
}

.search-count-num {
    font-weight: 700;
    color: var(--accent-color);
    display: inline-block;
    transition: transform 0.35s var(--ease-squish);
}

.search-count-num.pop {
    transform: scale(1.4);
}

.search-progress-dots {
    display: flex;
    gap: 4px;
}

.search-progress-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: dotPulse 1.2s ease-in-out infinite;
}

.search-progress-dots span:nth-child(2) { animation-delay: 0.2s; }
.search-progress-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

.search-progress-track {
    height: 3px;
    background: var(--chip-border);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}

.search-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-color));
    border-radius: 0 0 14px 14px;
    transition: width 0.8s var(--ease-spring);
    position: relative;
}

.search-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.search-result-card {
    max-width: 85%;
    margin: 8px auto;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: 14px;
    overflow: hidden;
    animation: fadeIn 0.45s var(--ease-jelly) both;
    will-change: transform, opacity;
}

.search-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: var(--fs-12);
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 1px solid var(--chip-border);
}

.search-card-query {
    font-weight: 400;
    color: var(--text-tertiary);
    font-size: var(--fs-11);
}

.search-items {
    max-height: 280px;
    overflow-y: auto;
}

.search-item {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    cursor: default;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
    animation: searchItemIn 0.35s var(--ease-jelly) both;
}

@keyframes searchItemIn {
    from {
        opacity: 0;
        transform: translateX(-16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--menu-item-hover);
}

.search-item:active {
    background: var(--chip-hover-bg);
}

.search-item-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    font-size: var(--fs-10);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.search-item-body {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: var(--fs-13);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item-snippet {
    font-size: var(--fs-12);
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item-source {
    font-size: var(--fs-11);
    color: var(--text-tertiary);
    margin-top: 3px;
}

/* 搜索结果：隐藏项+展开按钮 */
.search-item-hidden {
    display: none;
}

.search-items.expanded .search-item-hidden {
    display: flex;
}

.search-more-btn {
    text-align: center;
    padding: 8px 14px;
    font-size: var(--fs-12);
    color: var(--accent-color);
    cursor: pointer;
    border-top: 1px solid var(--chip-border);
    transition: background 0.15s ease;
}

.search-more-btn:hover {
    background: var(--menu-item-hover);
}

/* ========================================
   滚动条样式
   ======================================== */
.messages-container::-webkit-scrollbar,
.settings-content::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.notification-content::-webkit-scrollbar,
.notification-detail-content::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track,
.settings-content::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track,
.notification-content::-webkit-scrollbar-track,
.notification-detail-content::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb,
.settings-content::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.notification-content::-webkit-scrollbar-thumb,
.notification-detail-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover,
.settings-content::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover,
.notification-content::-webkit-scrollbar-thumb:hover,
.notification-detail-content::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* 桌面端滚动条 */
@media (min-width: 769px) {
    .messages-container::-webkit-scrollbar,
    .settings-content::-webkit-scrollbar,
    .modal-content::-webkit-scrollbar,
    .notification-content::-webkit-scrollbar,
    .notification-detail-content::-webkit-scrollbar {
        width: 8px;
    }
}

/* ========================================
   通知系统 - 铃铛按钮
   ======================================== */
.notification-bell-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4757;
    border: 2px solid var(--nav-bg, #12121a);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s var(--ease-spring);
    pointer-events: none;
}

.notification-badge.active {
    opacity: 1;
    transform: scale(1);
    animation: notificationBadgePulse 2s ease-in-out infinite;
}

@keyframes notificationBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.5); }
    50% { box-shadow: 0 0 0 4px rgba(255, 71, 87, 0); }
}

/* ========================================
   通知页面
   ======================================== */
#notificationPage {
    display: none;
}

#notificationPage.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 20;
    background: var(--messages-bg);
    overflow: hidden;
}

.notification-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.notification-title {
    font-size: var(--fs-18, 18px);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
    margin: 0;
}

.header-spacer {
    width: 40px;
}

/* ========================================
   通知视图容器
   ======================================== */
.notification-view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(40px) scale(0.97);
    opacity: 0;
    transition: transform 0.4s var(--ease-spring-strong), opacity 0.35s var(--ease-smooth);
    pointer-events: none;
}

.notification-view.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.notification-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.notification-detail-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   通知卡片
   ======================================== */
.notification-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.25s var(--ease-spring);
    cursor: pointer;
    animation: cardSlideIn 0.4s var(--ease-spring-strong) both;
}

.notification-card:nth-child(1) { animation-delay: 0.05s; }
.notification-card:nth-child(2) { animation-delay: 0.1s; }
.notification-card:nth-child(3) { animation-delay: 0.15s; }
.notification-card:nth-child(4) { animation-delay: 0.2s; }
.notification-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.notification-card:active {
    transform: scale(0.98);
}

.notification-card.read {
    opacity: 0.7;
}

.notification-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-card-badge {
    font-size: 10px;
    font-weight: 700;
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.notification-card-date {
    font-size: var(--fs-12, 12px);
    color: var(--text-secondary);
}

.notification-card-title {
    font-size: var(--fs-16, 16px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.notification-card-preview {
    font-size: var(--fs-13, 13px);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-card-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    background: transparent;
    color: var(--accent-color);
    font-size: var(--fs-13, 13px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-spring);
}

.notification-card-btn:hover {
    background: var(--accent-color);
    color: #fff;
    transform: scale(1.02);
}

.notification-card-btn:active {
    transform: scale(0.96);
}

/* ========================================
   海报详情 - 小米 MiMo 风格
   ======================================== */
.poster-container {
    position: relative;
    max-width: 440px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    animation: posterFadeSlideUp 0.7s var(--ease-spring-strong) both;
}

/* 装饰性 SANSAN 文字背景 — 铺在 Hero 上 */
.poster-pattern-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.08;
    pointer-events: none;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.poster-pattern-row {
    white-space: nowrap;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 4px;
    line-height: 2;
    animation: posterPatternScroll 25s linear infinite;
}

.poster-pattern-row:nth-child(even) {
    animation-direction: reverse;
}

@keyframes posterPatternScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ====== MiMo 风格 Hero ====== */
.poster-hero-mimo {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: none;
    z-index: 1;
}

/* 深色中文揭示层 (底层，始终在) */
.mimo-dark-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0f;
}

.mimo-title-cn {
    font-size: var(--fs-28, 28px);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 2px;
    user-select: none;
}

/* 白色英文标题层 (顶层，JS 用 mask 挖洞) */
.mimo-white-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--card-bg, #1a1a2e);
    /* 初始无洞 — 白色层完全遮住深色层 */
    -webkit-mask-image: radial-gradient(circle 0px at -300px -300px, transparent 0%, black 0%);
    mask-image: radial-gradient(circle 0px at -300px -300px, transparent 0%, black 0%);
}

.mimo-title-en {
    font-size: var(--fs-32, 32px);
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
    user-select: none;
}

/* 自定义光标圆环 */
.mimo-cursor {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    left: -300px;
    top: -300px;
}

.mimo-cursor.visible {
    opacity: 1;
}

/* 粘性拖尾阴影圆 — 比主圆大，更透明，跟随更慢 */
.mimo-trail-shadow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(10, 10, 15, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    left: -300px;
    top: -300px;
}

.mimo-cursor.visible ~ .mimo-trail-shadow {
    opacity: 1;
}

/* Hero 副标题区 */
.poster-hero-sub {
    padding: 0 28px 24px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.poster-version {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(166, 126, 255, 0.1);
    border: 1px solid rgba(166, 126, 255, 0.2);
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.poster-subtitle {
    font-size: var(--fs-14, 14px);
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: 0.5px;
}

/* 功能标签 — 发光药丸 */
.poster-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 28px 24px;
    justify-content: center;
    animation: posterFadeSlideUp 0.6s var(--ease-spring-strong) 0.2s both;
}

.poster-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-color);
    background: linear-gradient(135deg, rgba(166, 126, 255, 0.08), rgba(166, 126, 255, 0.03));
    border: 1px solid rgba(166, 126, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.3s var(--ease-spring);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.poster-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(166, 126, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poster-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(166, 126, 255, 0.4);
    box-shadow: 0 0 16px rgba(166, 126, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.poster-tag:hover::before {
    opacity: 1;
}

/* 分割点 */
.poster-sep {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 28px 20px;
}

.poster-sep-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.3;
}

.poster-sep-dot:nth-child(2) {
    opacity: 0.5;
}

/* 数据统计 — 玻璃卡片 */
.poster-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 28px 24px;
}

.poster-stat {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s var(--ease-spring);
    animation: posterFadeSlideUp 0.5s var(--ease-spring-strong) both;
}

.poster-stat:hover {
    border-color: rgba(166, 126, 255, 0.2);
    background: rgba(166, 126, 255, 0.03);
    transform: translateY(-2px);
}

.poster-stat-value {
    display: block;
    font-size: var(--fs-28, 28px);
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.2;
}

.poster-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* 正文内容卡片 — 渐变左边框 */
.poster-cards {
    padding: 0 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.poster-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--accent-color);
    border-radius: 12px;
    padding: 20px 20px 20px 22px;
    transition: all 0.3s var(--ease-spring);
    animation: posterFadeSlideUp 0.6s var(--ease-spring-strong) both;
    cursor: default;
    text-align: left;
    overflow: hidden;
}

.poster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poster-card:hover {
    transform: translateX(4px);
    border-color: rgba(166, 126, 255, 0.2);
    box-shadow: -4px 0 20px rgba(166, 126, 255, 0.08);
}

.poster-card:hover::before {
    opacity: 1;
}

.poster-card:active {
    transform: translateX(2px) scale(0.99);
}

.poster-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.poster-card-icon {
    color: var(--accent-color);
    opacity: 0.8;
    flex-shrink: 0;
}

.poster-card-icon svg {
    display: block;
}

.poster-card-title {
    font-size: var(--fs-15, 15px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.poster-card-text {
    font-size: var(--fs-13, 13px);
    color: var(--text-secondary);
    line-height: 1.85;
    margin: 0;
    letter-spacing: 0.2px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 底部 */
.poster-footer {
    padding: 20px 28px 28px;
    text-align: center;
}

.poster-quote {
    font-size: var(--fs-12, 12px);
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

.poster-date {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.4;
    margin: 0;
}

@keyframes posterFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   通知详情 - 统计数据卡片
   ======================================== */
.poster-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 28px 20px;
}

.poster-stat {
    text-align: center;
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    animation: posterFadeSlideUp 0.5s var(--ease-spring-strong) both;
    transition: all 0.3s var(--ease-spring);
}

.poster-stat:hover {
    border-color: rgba(166, 126, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(166, 126, 255, 0.1);
}

.poster-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.poster-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 0.3px;
}

.poster-stat-suffix {
    opacity: 0.6;
    margin-left: 2px;
}

/* ========================================
   通知详情 - v1→v2 对比表格
   ======================================== */
.poster-comparison {
    padding: 0 28px 24px;
}

.poster-comparison-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    letter-spacing: 0.3px;
}

.poster-comparison-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poster-comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    animation: posterFadeSlideUp 0.4s var(--ease-spring-strong) both;
    transition: background 0.2s;
}

.poster-comparison-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.poster-comparison-row:last-child {
    border-bottom: none;
}

.poster-comparison-feature {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.poster-comparison-v1 {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.5;
    text-decoration: line-through;
    text-decoration-color: rgba(255, 100, 100, 0.4);
}

.poster-comparison-v2 {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 600;
}

/* ========================================
   通知详情 - 时间线
   ======================================== */
.poster-timeline {
    padding: 0 28px 24px;
    position: relative;
}

.poster-timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    letter-spacing: 0.3px;
}

.poster-timeline::before {
    content: '';
    position: absolute;
    left: 42px;
    top: 40px;
    bottom: 24px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), transparent);
    opacity: 0.3;
}

.poster-timeline-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
    animation: posterFadeSlideUp 0.4s var(--ease-spring-strong) both;
}

.poster-timeline-item:last-child {
    margin-bottom: 0;
}

.poster-timeline-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 8px rgba(166, 126, 255, 0.4);
}

.poster-timeline-item:first-child .poster-timeline-dot {
    box-shadow: 0 0 12px rgba(166, 126, 255, 0.6);
}

.poster-timeline-content {
    flex: 1;
}

.poster-timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2px;
}

.poster-timeline-event {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   移动端适配
   ======================================== */
@media (max-width: 400px) {
    .poster-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px 16px;
    }

    .poster-comparison {
        padding: 0 20px 20px;
    }

    .poster-comparison-header,
    .poster-comparison-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 4px;
    }

    .poster-comparison-feature,
    .poster-comparison-v1,
    .poster-comparison-v2 {
        font-size: 11px;
    }

    .poster-timeline {
        padding: 0 20px 20px;
    }

    .poster-timeline::before {
        left: 36px;
    }
}

/* ========================================
   通知详情 - 通用区块标题
   ======================================== */
.poster-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    letter-spacing: 0.3px;
    padding: 0 28px;
}

/* ========================================
   通知详情 - 模块网格
   ======================================== */
.poster-modules-section {
    padding: 0 0 24px;
}

.poster-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 28px;
}

.poster-module-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
    animation: posterFadeSlideUp 0.4s var(--ease-spring-strong) both;
    transition: all 0.3s var(--ease-spring);
}

.poster-module-item:hover {
    border-color: rgba(166, 126, 255, 0.3);
    transform: translateY(-2px);
}

.poster-module-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

.poster-module-desc {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ========================================
   通知详情 - 主题色块
   ======================================== */
.poster-themes-section {
    padding: 0 0 24px;
}

.poster-themes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 28px;
}

.poster-themes-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 28px 4px;
    font-weight: 500;
}

.poster-theme-item {
    text-align: center;
    animation: posterFadeSlideUp 0.4s var(--ease-spring-strong) both;
}

.poster-theme-colors {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 6px;
}

.poster-theme-swatch {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.poster-theme-item:hover .poster-theme-swatch {
    transform: scale(1.15);
}

.poster-theme-name {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ========================================
   通知详情 - 粒子模式
   ======================================== */
.poster-particles-section {
    padding: 0 0 24px;
}

.poster-particles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 28px;
}

.poster-particle-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 12px;
    animation: posterFadeSlideUp 0.4s var(--ease-spring-strong) both;
    transition: all 0.3s var(--ease-spring);
}

.poster-particle-item:hover {
    border-color: rgba(166, 126, 255, 0.3);
}

.poster-particle-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.poster-particle-desc {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
}

/* ========================================
   通知详情 - 弹簧曲线标签
   ======================================== */
.poster-spring-section {
    padding: 0 0 24px;
}

.poster-spring-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 28px;
}

.poster-spring-tag {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(166, 126, 255, 0.1);
    border: 1px solid rgba(166, 126, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
    animation: posterFadeSlideUp 0.4s var(--ease-spring-strong) both;
    transition: all 0.3s var(--ease-spring);
}

.poster-spring-tag:hover {
    background: rgba(166, 126, 255, 0.18);
    transform: translateY(-2px);
}

.poster-spring-tag small {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ========================================
   通知详情 - 独立展示区域（最后几段）
   ======================================== */
.poster-highlight {
    margin: 0 28px 20px;
    padding: 28px 24px;
    background: linear-gradient(135deg, rgba(166, 126, 255, 0.08), rgba(166, 126, 255, 0.02));
    border: 1px solid rgba(166, 126, 255, 0.15);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    animation: posterFadeSlideUp 0.6s var(--ease-spring-strong) both;
}

.poster-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    opacity: 0.6;
}

.poster-highlight::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(166, 126, 255, 0.1), transparent 70%);
    pointer-events: none;
}

.poster-highlight-icon {
    color: var(--accent-color);
    opacity: 0.9;
    margin-bottom: 12px;
}

.poster-highlight-icon svg {
    display: block;
}

.poster-highlight-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    letter-spacing: 0.3px;
}

.poster-highlight-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========================================
   移动端适配 - 新增区块
   ======================================== */
@media (max-width: 400px) {
    .poster-section-title {
        padding: 0 20px;
    }

    .poster-modules-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }

    .poster-themes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 0 20px;
    }

    .poster-theme-swatch {
        width: 16px;
        height: 16px;
    }

    .poster-particles-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }

    .poster-spring-tags {
        padding: 0 20px;
    }

    .poster-highlight {
        margin: 0 20px 16px;
        padding: 24px 20px;
    }

    .poster-highlight-title {
        font-size: 16px;
    }

    .poster-highlight-text {
        font-size: 13px;
    }
}

/* ========================================
   海报 - 新设计系统
   ======================================== */

/* Tagline */
.poster-tagline {
    padding: 32px 28px 24px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.3px;
}

/* Stats Row */
.poster-stats-row {
    display: flex;
    gap: 0;
    padding: 0 28px 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.poster-stats-row::-webkit-scrollbar { display: none; }

.poster-stat-item {
    flex: 1;
    min-width: 70px;
    text-align: center;
    padding: 16px 4px;
    border-right: 1px solid var(--border-light);
}

.poster-stat-item:last-child { border-right: none; }

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* Section */
.poster-section {
    padding: 28px 0;
    border-top: 1px solid var(--border-light);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px 12px;
}

.section-index {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.poster-section .section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.poster-section .section-desc {
    padding: 0 28px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.section-body {
    padding: 0 28px;
}

.section-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0 0 12px 0;
}

.section-body p:last-child { margin-bottom: 0; }

.section-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Demo Button */
.poster-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 28px 16px;
    padding: 10px 20px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.3s ease;
}

.poster-demo-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-color) 40%, transparent);
}

.poster-demo-btn:active {
    transform: scale(0.96);
}

/* Demo Area */
.poster-demo-area {
    margin: 0 28px 12px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-thinking-bubble {
    display: flex;
    align-items: center;
    gap: 16px;
}

.demo-loader {
    flex-shrink: 0;
}

.demo-phrase {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    transition: opacity 0.2s ease;
}

.demo-label {
    padding: 0 28px;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
    line-height: 1.6;
}

/* Spring Buttons */
.poster-spring-grid {
    display: flex;
    gap: 8px;
    padding: 0 28px;
    flex-wrap: wrap;
}

.spring-btn {
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.4s var(--ease-spring-strong), box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
    flex: 1;
    min-width: 60px;
}

.spring-btn span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
}

.spring-btn:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

/* Themes */
.poster-themes-group {
    padding: 0 28px 16px;
}

.theme-group-label {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.poster-themes-row {
    display: flex;
    gap: 8px;
}

.theme-chip {
    flex: 1;
    text-align: center;
}

.theme-swatches {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
    border-radius: 8px;
    overflow: hidden;
}

.theme-swatches span {
    flex: 1;
    height: 28px;
    display: block;
}

.theme-name {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Particles */
.poster-particles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 28px;
}

.particle-chip {
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

/* Comparison */
.poster-comparison {
    padding: 0 28px;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    align-items: center;
}

.comparison-row:last-child { border-bottom: none; }

.comparison-header-row {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
}

.comparison-feature { color: var(--text-primary); font-weight: 500; }

.comparison-v1 {
    color: var(--text-secondary);
    opacity: 0.5;
}

.comparison-v1.old {
    color: var(--accent-color);
    opacity: 0.7;
    font-weight: 500;
}

.comparison-v2 {
    color: var(--accent-color);
    font-weight: 500;
}

/* Modules Grid */
.poster-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 28px;
}

.module-chip {
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.module-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Timeline */
.poster-timeline {
    padding: 0 28px 0 40px;
    position: relative;
}

.poster-timeline::before {
    content: '';
    position: absolute;
    left: 34px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding: 12px 0 12px 16px;
}

.timeline-dot {
    position: absolute;
    left: -12px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
}

.timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2px;
}

.timeline-event {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
.poster-footer {
    padding: 32px 28px;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.footer-line {
    width: 40px;
    height: 2px;
    background: var(--accent-color);
    margin: 0 auto 20px;
    border-radius: 1px;
}

.footer-quote {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.footer-author {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    font-style: italic;
}

.footer-date {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0;
}

/* Thinking Loader Animations - 19种 */
.ld { display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* 1: 三圆弹跳 */
.ld-l30 {
  width: 36px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side,var(--accent-color) 90%,transparent);
  background:
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 50%;
  animation: ld-l30 1s infinite linear;
}
@keyframes ld-l30 {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}

/* 2: 三点压缩 */
.ld-l31 {
  width: 36px;
  aspect-ratio: 4;
  --c:var(--accent-color) 90%,transparent;
  background:
    radial-gradient(circle closest-side at left  6px top 50%,var(--c)),
    radial-gradient(circle closest-side                     ,var(--c)),
    radial-gradient(circle closest-side at right 6px top 50%,var(--c));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: ld-l31 1s infinite alternate;
}
@keyframes ld-l31 {
    to{width:20px;aspect-ratio: 1}
}

/* 3: 圆点阴影跳动 */
.ld-l32 {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: ld-l32 1s infinite linear alternate;
}
@keyframes ld-l32 {
    0%  {box-shadow: 12px 0 var(--accent-color), -12px 0 rgba(0,0,0,0.1);background: var(--accent-color)}
    33% {box-shadow: 12px 0 var(--accent-color), -12px 0 rgba(0,0,0,0.1);background: rgba(0,0,0,0.1)}
    66% {box-shadow: 12px 0 rgba(0,0,0,0.1),-12px 0 var(--accent-color); background: rgba(0,0,0,0.1)}
    100%{box-shadow: 12px 0 rgba(0,0,0,0.1),-12px 0 var(--accent-color); background: var(--accent-color)}
}

/* 4: 圆点阴影扩展 */
.ld-l33 {
  width: 8px;
  aspect-ratio: 1;
  background: var(--accent-color);
  border-radius: 50%;
  animation: ld-l33 1s infinite linear alternate;
}
@keyframes ld-l33 {
    0%  {box-shadow: 8px 0 var(--accent-color),-14px 0 var(--accent-color)}
    50% {box-shadow: 8px 0 var(--accent-color),-8px 0 var(--accent-color)}
    100%{box-shadow: 14px 0 var(--accent-color),-8px 0 var(--accent-color)}
}

/* 5: 三柱脉冲 */
.ld-l34 {
  width: 36px;
  aspect-ratio: 4;
  --_g: no-repeat radial-gradient(circle closest-side,var(--accent-color) 90%,transparent);
  background:
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 100%;
  animation: ld-l34 1s infinite linear;
}
@keyframes ld-l34 {
    33%{background-size:calc(100%/3) 0%  ,calc(100%/3) 100%,calc(100%/3) 100%}
    50%{background-size:calc(100%/3) 100%,calc(100%/3) 0%  ,calc(100%/3) 100%}
    66%{background-size:calc(100%/3) 100%,calc(100%/3) 100%,calc(100%/3) 0%  }
}

/* 6: 双圆旋转 */
.ld-l35 {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  animation: ld-l35-0 1.5s infinite steps(2);
}
.ld-l35::before,
.ld-l35::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-color);
}
.ld-l35::before {
  box-shadow: 20px 0 var(--accent-color);
  transform: translateX(-20px);
  animation: ld-l35-1 .75s infinite linear alternate;
}
.ld-l35::after {
  transform: translateX(10px) rotate(0deg) translateX(10px);
  animation: ld-l35-2 .75s infinite linear alternate;
}
@keyframes ld-l35-0 {
    0% ,49.9% {transform: scale(1)}
    50%,100%  {transform: scale(-1)}
}
@keyframes ld-l35-1 {
    100%{box-shadow: 40px 0 var(--accent-color)}
}
@keyframes ld-l35-2 {
    100%{transform: translateX(10px) rotate(-180deg) translateX(10px)}
}

/* 7: 三角移动 */
.ld-l36 {
  width: 28px;
  aspect-ratio: 1;
  --_g: no-repeat radial-gradient(circle closest-side,var(--accent-color) 90%,transparent);
  background:
    var(--_g) 0    0,
    var(--_g) 0    100%,
    var(--_g) 100% 100%;
  background-size: 40% 40%;
  animation:ld-l36 1s infinite linear;
}
@keyframes ld-l36 {
    25% {background-position:100% 0   ,0 100%,100% 100%}
    50% {background-position:100% 0   ,0 0   ,100% 100%}
    75% {background-position:100% 0   ,0 0   ,0    100%}
    100%{background-position:100% 100%,0 0   ,0    100%}
}

/* 8: 四圆跳动 */
.ld-l37 {
  width: 36px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(farthest-side,var(--accent-color) 90%,transparent);
  background:
    var(--_g) 0    50%,
    var(--_g) 50%  50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: 25% 50%;
  animation: ld-l37 1s infinite linear;
}
@keyframes ld-l37 {
    33%  {background-position:0   0  ,50% 100%,50%  100%,100% 0}
    66%  {background-position:50% 0  ,0   100%,100% 100%,50%  0}
    100% {background-position:50% 50%,0   50% ,100% 50% ,50%  50%}
}

/* 9: 六圆复杂 */
.ld-l38 {
  --s: 36px;
  width: var(--s);
  aspect-ratio: 2;
  --_g: var(--accent-color) 90%,transparent;
  background:
    radial-gradient(farthest-side at bottom,var(--_g)) 0    calc(50% - var(--s)/16),
    radial-gradient(farthest-side at top   ,var(--_g)) 0    calc(50% + var(--s)/16),
    radial-gradient(farthest-side at bottom,var(--_g)) 50%  calc(50% - var(--s)/16),
    radial-gradient(farthest-side at top   ,var(--_g)) 50%  calc(50% + var(--s)/16),
    radial-gradient(farthest-side at bottom,var(--_g)) 100% calc(50% - var(--s)/16),
    radial-gradient(farthest-side at top   ,var(--_g)) 100% calc(50% + var(--s)/16);
  background-size: 25% 25%;
  background-repeat: no-repeat;
  animation: ld-l38 1s infinite linear;
}
@keyframes ld-l38 {
    16.67% {background-position:0 0,0 100%,50% calc(50% - var(--s)/8),50% calc(50% + var(--s)/16),100% calc(50% - var(--s)/16),100% calc(50% + var(--s)/16)}
    33.33% {background-position:0 0,0 100%,50% 0,50% 100%,100% calc(50% - var(--s)/16),100% calc(50% + var(--s)/16)}
    50%    {background-position:0 0,0 100%,50% 0,50% 100%,100% 0,100% 100%}
    66.67% {background-position:0 calc(50% - var(--s)/16),0 calc(50% + var(--s)/16),50% 0,50% 100%,100% 0,100% 100%}
    83.33% {background-position:0 calc(50% - var(--s)/16),0 calc(50% + var(--s)/16),50% calc(50% - var(--s)/16),50% calc(50% + var(--s)/16),100% 0,100% 100%}
}

/* 10: 五圆复杂 */
.ld-l39 {
  --s: 36px;
  width: var(--s);
  aspect-ratio: 2;
  --_g: var(--accent-color) 90%,transparent;
  background:
    radial-gradient(farthest-side,var(--_g)) 0   50%/25% 50%,
    radial-gradient(farthest-side at bottom,var(--_g)) 50%  calc(50% - var(--s)/16)/25% 25%,
    radial-gradient(farthest-side at top   ,var(--_g)) 50%  calc(50% + var(--s)/16)/25% 25%,
    radial-gradient(farthest-side at bottom,var(--_g)) 100% calc(50% - var(--s)/16)/25% 25%,
    radial-gradient(farthest-side at top   ,var(--_g)) 100% calc(50% + var(--s)/16)/25% 25%;
  background-repeat: no-repeat;
  animation: ld-l39 1s infinite;
}
@keyframes ld-l39 {
    25%  {background-position:0    50%,50% 0,50% 100%,100% 0,100% 100%}
    50%  {background-position:100% 50%,0   0,0   100%,50%  0,50%  100%}
    75%,
    100% {background-position:100% 50%,0 calc(50% - var(--s)/16),0 calc(50% + var(--s)/16),50% calc(50% - var(--s)/16),50% calc(50% + var(--s)/16)}
}

/* 11: 三角翻转 */
.ld-l41 {
  width: 28px;
  aspect-ratio: 1.154;
  --_g: no-repeat radial-gradient(farthest-side,var(--accent-color) 90%,transparent);
  background:
    var(--_g) 50%  0,
    var(--_g) 0    100%,
    var(--_g) 100% 100%;
  background-size: 35% calc(35%*1.154);
  animation: ld-l41 1s infinite;
}
@keyframes ld-l41{
    50%,100% {background-position: 100% 100%,50% 0,0 100%}
}

/* 13: 三圆下落 */
.ld-l42 {
  width: 36px;
  aspect-ratio: 1;
  --_g: no-repeat radial-gradient(farthest-side,var(--accent-color) 90%,transparent);
  background: var(--_g), var(--_g), var(--_g);
  background-size: 25% 25%;
  animation: ld-l42 1s infinite;
}
@keyframes ld-l42{
  0%     {background-position: 0% -100%,50% -100%,100% -100%}
  16.67% {background-position: 0%   50%,50% -100%,100% -100%}
  33.33% {background-position: 0%   50%,50%   50%,100% -100%}
  45%,55%{background-position: 0%   50%,50%   50%,100%   50%}
  66.67% {background-position: 0%  200%,50%   50%,100%   50%}
  83.33% {background-position: 0%  200%,50%  200%,100%   50%}
  100%   {background-position: 0%  200%,50%  200%,100%  200%}
}

/* 13: 三球依次出现 */
.ld-l43 {
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--accent-color);
  clip-path: inset(-20px);
  box-shadow: -28px 7px,-28px 7px,8px 7px;
  transform: translateY(-7px);
  animation: ld-l43 1s infinite linear;
}
@keyframes ld-l43{
  16.67% {box-shadow:-28px 7px,-28px 7px,8px 7px}
  33.33% {box-shadow:-28px 7px,  0px 7px,8px 7px}
  40%,60%{box-shadow: -8px 7px,  0px 7px,8px 7px}
  66.67% {box-shadow: -8px 7px,  0px 7px,28px 7px}
  83.33% {box-shadow: -8px 7px, 28px 7px,28px 7px}
  100%   {box-shadow: 28px 7px, 28px 7px,28px 7px}
}

/* 14: 三圆大小变化 */
.ld-l45 {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 10px 0 0 4px var(--accent-color), 20px 0 0 2px var(--accent-color);
  transform: translateX(-15px);
  animation: ld-l45 .5s infinite alternate linear;
}
@keyframes ld-l45 {
  50%  {box-shadow: 10px 0 0 2px var(--accent-color), 20px 0 0 4px var(--accent-color)}
  100% {box-shadow: 10px 0 0 0 var(--accent-color), 20px 0 0 2px var(--accent-color)}
}

/* 16: 复杂弹球 */
.ld-l47 {
  width: 30px;
  height: 15px;
  --c:no-repeat radial-gradient(farthest-side,var(--accent-color) 93%,transparent);
  background:
    var(--c) 0    0,
    var(--c) 50%  0;
  background-size: 6px 6px;
  position: relative;
  clip-path: inset(-200% -100% 0 0);
  animation: ld-l47-0 1.5s linear infinite;
}
.ld-l47::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 9px;
  background: var(--accent-color);
  left: -12px;
  top: 0;
  animation:
    ld-l47-1 1.5s linear infinite,
    ld-l47-2 0.5s cubic-bezier(0,200,.8,200) infinite;
}
.ld-l47::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
  animation: ld-l47-3 1.5s linear infinite;
}
@keyframes ld-l47-0 {
  0%,30%  {background-position: 0  0   ,50% 0   }
  33%     {background-position: 0  100%,50% 0   }
  41%,63% {background-position: 0  0   ,50% 0   }
  66%     {background-position: 0  0   ,50% 100%}
  74%,100%{background-position: 0  0   ,50% 0   }
}
@keyframes ld-l47-1 {
  90%  {transform:translateY(0)}
  95%  {transform:translateY(11px)}
  100% {transform:translateY(11px);left:calc(100% - 6px)}
}
@keyframes ld-l47-2 {
  100% {top:-0.1px}
}
@keyframes ld-l47-3 {
  0%,80%,100% {transform:translate(0)}
  90%         {transform:translate(19px)}
}

/* 16: 彩色弹跳（跟随主题色） */
.ld-l48 {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-color);
  animation: ld-l48 1.5s infinite;
}
@keyframes ld-l48 {
  0%,
  100%{transform:translate(-12px);box-shadow:  0     0 color-mix(in srgb, var(--accent-color) 60%, white), 0     0 color-mix(in srgb, var(--accent-color) 30%, white)}
  40% {transform:translate( 12px);box-shadow: -5px  0 color-mix(in srgb, var(--accent-color) 60%, white),-10px  0 color-mix(in srgb, var(--accent-color) 30%, white)}
  50% {transform:translate( 12px);box-shadow:  0     0 color-mix(in srgb, var(--accent-color) 60%, white), 0     0 color-mix(in srgb, var(--accent-color) 30%, white)}
  90% {transform:translate(-12px);box-shadow:  5px  0 color-mix(in srgb, var(--accent-color) 60%, white), 10px  0 color-mix(in srgb, var(--accent-color) 30%, white)}
}

/* ========================================
   桌面端侧边栏
   ======================================== */
.desktop-sidebar {
    display: none;
}

/* 侧边栏只在聊天页面显示 */
body.desktop-fullscreen:not(.settings-active) .desktop-sidebar {
    display: flex;
}
/* 人格测试页隐藏侧边栏 */
body.desktop-fullscreen.personality-active .desktop-sidebar,
body.desktop-fullscreen.personality-active .sidebar-expand-btn {
    display: none !important;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-brand {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-slogan {
    font-size: 9px;
    color: var(--text-tertiary);
    font-style: italic;
    letter-spacing: 0.3px;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
}

.sidebar-stats {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-stat {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.sidebar-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.sidebar-stat-value.animating {
    animation: countPulse 0.4s ease;
    text-shadow: 0 0 12px var(--accent-color);
}

.sidebar-stat-value.done {
    animation: countDone 0.3s ease;
}

@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes countDone {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.sidebar-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* 侧边栏滚动区域 */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 侧边栏滚动条样式 */
.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 2px;
    opacity: 0.5;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    opacity: 0.8;
}

/* EMO模式 */
.sidebar-emo {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-emo-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-emo-tags {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
    margin-bottom: 0;
}

.sidebar-emo-tags.active {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-emo-btn {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-emo-btn:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.sidebar-emo-btn.active {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.sidebar-emo-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 预设问题 */
.sidebar-questions {
    padding: 16px;
}

.sidebar-questions-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-questions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
}

.sidebar-questions-list::-webkit-scrollbar {
    width: 3px;
}

.sidebar-questions-list::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.sidebar-questions-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-question-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-question-btn:hover {
    background: var(--btn-ghost-hover);
    border-color: rgba(166, 126, 255, 0.3);
}

/* 侧边栏文档按钮 */
.sidebar-doc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
}

.sidebar-doc-btn:hover {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.sidebar-doc-btn:active {
    transform: scale(0.98);
}

.sidebar-doc-btn svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* 侧边栏快捷入口 - 并排卡片 */
.sidebar-quick-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
.sidebar-quick-row .sidebar-doc-btn {
    width: 100%;
    margin-top: 0;
    justify-content: center;
    text-decoration: none;
}
.sidebar-quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px;
    margin-top: 8px;
}

.sidebar-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
    text-decoration: none;
}

.sidebar-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.sidebar-link-card:active {
    transform: scale(0.98);
}

.sidebar-link-card .link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 10px;
    margin-bottom: 10px;
}

.sidebar-link-card .link-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.sidebar-link-card .link-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    text-align: center;
}

.sidebar-link-card .link-desc {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* 移动端预设问题面板 tab 导航 */
.questions-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.questions-tab {
    padding: 0 12px;
    font-size: var(--fs-14);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    background: none;
    border: none;
}

.questions-tab.active {
    color: var(--accent-color);
}

.questions-tab::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.25s var(--ease-spring);
}

.questions-tab.active::after {
    transform: scaleX(1);
}

/* 文档 tab 内容 */
.questions-doc-tab {
    display: none;
    flex: 1;
    overflow: hidden;
}

.questions-doc-tab.active {
    display: flex;
    flex-direction: column;
}

.questions-doc-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

.questions-doc-content::-webkit-scrollbar {
    width: 4px;
}

.questions-doc-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.questions-doc-content::-webkit-scrollbar-track {
    background: transparent;
}

/* 文档全屏展开动画 */
.questions-panel.doc-fullscreen {
    position: fixed;
    inset: 0;
    max-height: none;
    border-radius: 0;
    z-index: 200;
    transform-origin: bottom center;
    animation: docExpand 0.4s var(--ease-spring-strong) forwards;
}

@keyframes docExpand {
    from {
        transform: scale(0.6) translateY(30px);
        opacity: 0.5;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.questions-panel.doc-fullscreen .questions-header {
    border-radius: 0;
    padding: 14px 16px;
}

.questions-panel.doc-fullscreen .questions-close {
    display: none;
}

.questions-panel.doc-fullscreen .questions-doc-tab {
    display: flex;
}

.questions-panel.doc-fullscreen .questions-doc-content {
    padding: 20px 20px 40px;
}

.questions-panel.doc-fullscreen .questions-doc-content h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.questions-panel.doc-fullscreen .questions-doc-content .doc-subtitle {
    font-size: 14px;
    margin: 0 0 24px 0;
    color: var(--text-secondary);
}

.questions-panel.doc-fullscreen .questions-doc-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 14px 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.questions-panel.doc-fullscreen .questions-doc-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.questions-panel.doc-fullscreen .questions-doc-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: var(--text-primary);
}

.questions-panel.doc-fullscreen .questions-doc-content p {
    font-size: 14px;
    line-height: 1.85;
    margin: 0 0 14px 0;
    color: var(--text-secondary);
}

.questions-panel.doc-fullscreen .questions-doc-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.questions-panel.doc-fullscreen .questions-doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px 0;
    font-size: 13px;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.questions-panel.doc-fullscreen .questions-doc-content th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.questions-panel.doc-fullscreen .questions-doc-content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    line-height: 1.6;
}

.questions-panel.doc-fullscreen .questions-doc-content tr:last-child td {
    border-bottom: none;
}

.questions-panel.doc-fullscreen .questions-doc-content ul,
.questions-panel.doc-fullscreen .questions-doc-content ol {
    padding-left: 20px;
    margin: 0 0 14px 0;
}

.questions-panel.doc-fullscreen .questions-doc-content li {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.questions-panel.doc-fullscreen .questions-doc-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--card-bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    color: var(--accent-color);
}

.questions-panel.doc-fullscreen .questions-doc-content .doc-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
    margin: 2px 4px 2px 0;
}

.questions-panel.doc-fullscreen .questions-doc-content .doc-warn {
    padding: 12px 14px;
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 10px;
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #ff9800;
    line-height: 1.6;
}

.questions-panel.doc-fullscreen .questions-doc-content .doc-info {
    padding: 12px 14px;
    background: color-mix(in srgb, var(--accent-color) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-radius: 10px;
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--accent-color);
    line-height: 1.6;
}

/* 文档页面 */
.doc-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    z-index: 10;
}

.doc-title {
    font-size: var(--fs-18, 18px);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
    margin: 0;
}

.doc-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

.doc-content::-webkit-scrollbar {
    width: 4px;
}

.doc-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.doc-content::-webkit-scrollbar-track {
    background: transparent;
}

/* 文档排版 */
.doc-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.doc-content .doc-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.doc-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 12px 0;
    letter-spacing: -0.3px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.doc-content h2:first-child {
    border-top: none;
    padding-top: 0;
}

.doc-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px 0;
}

.doc-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0 0 12px 0;
}

.doc-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.doc-content ul, .doc-content ol {
    padding-left: 20px;
    margin: 0 0 12px 0;
}

.doc-content li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 4px;
}

.doc-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    background: var(--card-bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    color: var(--accent-color);
}

.doc-content pre {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    margin: 0 0 16px 0;
}

.doc-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px 0;
    font-size: 13px;
}

.doc-content th {
    text-align: left;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.doc-content td {
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    line-height: 1.6;
}

.doc-content .doc-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
    margin-right: 4px;
}

.doc-content .doc-warn {
    padding: 12px 16px;
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 10px;
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #ff9800;
    line-height: 1.6;
}

.doc-content .doc-info {
    padding: 12px 16px;
    background: color-mix(in srgb, var(--accent-color) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-radius: 10px;
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--accent-color);
    line-height: 1.6;
}

/* 侧边栏EMO模式 */
.sidebar-emo {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-emo-tags {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
    margin-bottom: 0;
}

.sidebar-emo-tags.active {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 12px;
}

.sidebar-emo-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-emo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.sidebar-emo-btn {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-emo-btn:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.sidebar-emo-btn.active {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.sidebar-emo-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 侧边栏展开按钮 */
.sidebar-expand-btn {
    display: none;
    position: fixed;
    left: 16px;
    top: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--sidebar-bg, rgba(15, 15, 25, 0.95));
    color: var(--text-primary);
    cursor: pointer;
    z-index: 60;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.sidebar-expand-btn:hover {
    background: var(--btn-ghost-hover);
    border-color: rgba(166, 126, 255, 0.3);
}

/* 侧边栏收起时的展开按钮 — 不使用，用sidebar内部toggle */
.sidebar-expand-btn {
    display: none !important;
}

/* ========================================
   桌面端顶部栏
   ======================================== */
.desktop-topbar {
    display: none;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--btn-ghost);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-btn:hover {
    background: var(--btn-ghost-hover);
    border-color: rgba(166, 126, 255, 0.3);
}

.topbar-badge {
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4757;
    margin-left: 4px;
}

.topbar-badge.active {
    display: block;
    animation: pulse 2s infinite;
}

/* ========================================
   欢迎屏幕
   ======================================== */
.desktop-welcome {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.desktop-welcome.hidden {
    opacity: 0;
    transform: translate(-50%, -40%);
}

.desktop-welcome-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--text-primary);
    opacity: 0.7;
}

.desktop-welcome-sub {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 2px;
}

/* ========================================
   桌面端按钮文字
   ======================================== */
.btn-text {
    display: none;
}

/* ========================================
   语音设置样式
   ======================================== */
.voice-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.voice-select:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* 语音信息按钮 */
.voice-info-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    vertical-align: middle;
    transition: all 0.2s;
    padding: 0;
}

.voice-info-btn svg {
    width: 14px;
    height: 14px;
}

.voice-info-btn:hover {
    background: var(--btn-ghost-hover);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* 语音模式切换过渡动画 */
#voicePresetMode,
#voiceCustomMode {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

#voicePresetMode.active,
#voiceCustomMode.active {
    max-height: 500px;
    opacity: 1;
}

.voice-textarea-wrapper {
    padding: 0 0 12px;
}

.voice-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

.voice-textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.voice-textarea::placeholder {
    color: var(--text-secondary);
}

.voice-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.voice-preset-btn {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-preset-btn:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
    border-color: rgba(166, 126, 255, 0.3);
}

.voice-preset-btn.active {
    background: rgba(166, 126, 255, 0.2);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* ========================================
   消息操作按钮（复制+语音）
   ======================================== */
.message-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}

.message.user .message-actions {
    display: none;
}

.action-btn-small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    color: var(--text-secondary);
}

.action-btn-small:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: scale(1.08);
}

.action-btn-small:active {
    transform: scale(0.95);
}

.action-btn-small svg {
    width: 14px;
    height: 14px;
}

/* 语音按钮特殊状态 */
.action-btn-small.voice-loading {
    pointer-events: none;
}

.voice-spinner {
    width: 14px;
    height: 14px;
    transition: none;
    animation: voiceSpin 0.6s linear infinite;
    will-change: transform;
    transform-origin: center center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-spinner svg {
    width: 14px;
    height: 14px;
    display: block;
}

.action-btn-small.voice-playing {
    background: rgba(166, 126, 255, 0.2);
    color: var(--accent-color);
}

.action-btn-small.voice-done {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

@keyframes voiceSpin {
    to { transform: rotate(360deg); }
}

/* 复制成功反馈 */
.action-btn-small.copied {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

/* ========================================
   音频导出列表
   ======================================== */
.audio-export-list {
    max-height: 400px;
    overflow-y: auto;
}

/* ========================================
   语音库全屏面板（跟随主题）
   ======================================== */

/* ========================================
   语音库浮窗（跟随主题 + 动画）
   ======================================== */

.audio-lib-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.audio-lib-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.audio-lib-card {
    width: min(420px, 90vw);
    max-height: 80vh;
    background: var(--page-bg, #12121a);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s var(--ease-jelly);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.audio-lib-overlay.active .audio-lib-card {
    transform: scale(1) translateY(0);
}

.audio-lib-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--nav-bg);
}

.audio-lib-back,
.audio-lib-refresh {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--btn-ghost);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.audio-lib-back:hover,
.audio-lib-refresh:hover {
    background: var(--btn-ghost-hover);
    color: var(--text-primary);
}

.audio-lib-refresh.spinning svg {
    animation: audioLibSpin 0.6s linear infinite;
}

@keyframes audioLibSpin {
    to { transform: rotate(360deg); }
}

.audio-lib-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.audio-lib-stats {
    padding: 10px 20px;
    font-size: 12px;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.audio-lib-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    -webkit-overflow-scrolling: touch;
}

.audio-lib-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.8;
}

.audio-lib-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--section-bg);
    border: 1px solid var(--border-light);
    margin-bottom: 8px;
    transition: border-color 0.2s;
    animation: audioLibItemIn 0.25s var(--ease-spring) both;
}

.audio-lib-item:nth-child(odd) { animation-delay: 0.03s; }
.audio-lib-item:nth-child(even) { animation-delay: 0.07s; }

@keyframes audioLibItemIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.audio-lib-item:hover {
    border-color: var(--accent-color);
}

.audio-lib-play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-bounce);
}

.audio-lib-play:active {
    transform: scale(0.9);
}

.audio-lib-play svg {
    width: 14px;
    height: 14px;
}

.audio-lib-info {
    flex: 1;
    min-width: 0;
}

.audio-lib-text {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-lib-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.audio-lib-dl {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.audio-lib-dl:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.audio-lib-dl.done {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(166, 126, 255, 0.08);
}

.audio-export-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.audio-export-item:hover {
    background: var(--btn-ghost-hover);
}

.audio-export-item input[type="checkbox"] {
    accent-color: var(--accent-color);
}

.audio-export-time {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 600;
    min-width: 50px;
}

.audio-export-text {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.export-btns {
    display: flex;
    gap: 10px;
}

.export-btns .action-btn {
    flex: 1;
}

/* ========================================
   语音进度条
   ======================================== */

.voice-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(128, 128, 128, 0.15);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.voice-progress-bar.active {
    opacity: 1;
}

.voice-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    border-radius: inherit;
    transition: width 0.3s ease;
}

/* ========================================
   语音播放器（独立组件）
   ======================================== */

.voice-player {
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    animation: fadeInUp 0.3s var(--ease-spring) both;
    max-width: 320px;
}

.voice-player-progress {
    height: 2px;
    background: var(--border-light);
}

.voice-player-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    transition: width 0.1s linear;
}

.voice-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.voice-player-play-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-bounce);
}

.voice-player-play-btn:active {
    transform: scale(0.9);
}

.voice-player-play-btn svg {
    width: 14px;
    height: 14px;
}

.voice-player-waveform {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5px;
    height: 22px;
}

.voice-player-waveform span {
    width: 2.5px;
    background: var(--accent-color);
    opacity: 0.4;
    border-radius: 2px;
    transition: height 0.12s ease;
    min-height: 3px;
}

.voice-player-time {
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   低端设备降级
   ======================================== */

.low-end-device .particle {
    display: none !important;
}

.low-end-device .message {
    animation: none !important;
}

.low-end-device .ripple-effect {
    display: none !important;
}

/* ========================================
   XIAOSAN人格测试
   ======================================== */

#personalityPage {
    display: none;
    flex-direction: column;
    height: 100%;
    background: var(--page-bg);
    color: var(--text-primary);
    overflow: hidden;
}

#personalityPage.active {
    display: flex;
    animation: pPageIn 0.35s ease;
}
#personalityPage.page-exit {
    animation: pPageOut 0.3s ease forwards;
}

@keyframes pPageIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pPageOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-30px); }
}

.personality-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    z-index: 55;
    position: relative;
}

.personality-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-spacer {
    width: 40px;
}

/* 视图切换 */
.personality-view {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    animation: pFadeIn 0.3s ease;
}

.personality-view.active {
    display: flex;
}

@keyframes pFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 开始页 */
.personality-start-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px 24px;
    text-align: center;
}

.personality-logo-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 28px;
}
.personality-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
    color: var(--send-btn-text, #fff);
    font-size: 36px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    animation: pLogoFloat 3s ease-in-out infinite;
}
.personality-logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    opacity: 0.3;
    animation: pLogoRing 3s ease-in-out infinite;
}

@keyframes pLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes pLogoRing {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.08); opacity: 0.15; }
}

.personality-start-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.personality-start-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

.personality-start-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
    justify-content: center;
}

.ptag {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--emotion-tag-bg);
    color: var(--emotion-tag-text);
    border: 1px solid var(--emotion-tag-border);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ptag-icon {
    font-size: 14px;
}

.ptag {
    font-size: 13px;
    animation: pTagPop 0.4s ease backwards;
}

.ptag:nth-child(1) { animation-delay: 0.1s; }
.ptag:nth-child(2) { animation-delay: 0.2s; }
.ptag:nth-child(3) { animation-delay: 0.3s; }

@keyframes pTagPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.personality-start-btn {
    padding: 14px 48px;
    border-radius: 12px;
    background: var(--send-btn-bg);
    color: var(--send-btn-text, #fff);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pBtnGlow 2s ease-in-out infinite;
}

.personality-start-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px var(--shadow-color);
}

.personality-start-btn:active {
    transform: scale(0.96);
}

@keyframes pBtnGlow {
    0%, 100% { box-shadow: 0 2px 8px var(--shadow-color); }
    50% { box-shadow: 0 4px 20px var(--shadow-color); }
}

.personality-start-tip {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 答题页 */
.personality-progress {
    position: relative;
    height: 4px;
    background: var(--border-light);
    flex-shrink: 0;
}

.personality-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--send-btn-bg));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 0 3px 3px 0;
}

.personality-progress-text {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.personality-question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    overflow-y: auto;
}

.personality-question {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 28px;
    color: var(--text-primary);
    animation: pFadeIn 0.3s ease;
}

.personality-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.personality-option {
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--chip-bg);
    border: 1.5px solid var(--chip-border);
    color: var(--chip-text);
    font-size: 15px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    animation: pOptionIn 0.3s ease backwards;
}

.personality-option:nth-child(1) { animation-delay: 0.05s; }
.personality-option:nth-child(2) { animation-delay: 0.1s; }
.personality-option:nth-child(3) { animation-delay: 0.15s; }
.personality-option:nth-child(4) { animation-delay: 0.2s; }

.personality-option:hover {
    border-color: var(--accent-color);
    background: var(--emotion-tag-bg);
    transform: translateX(4px);
}

.personality-option:active {
    transform: scale(0.97);
}

@keyframes pOptionIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 结果页 */
.personality-result-content {
    flex: 1;
    padding: 32px 24px;
    overflow-y: auto;
}

.result-type-name {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--accent-color);
    animation: pResultReveal 0.5s ease 0.1s backwards;
}

.result-type-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
    animation: pResultPop 0.4s ease backwards;
}

.result-type-quote {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 24px;
    animation: pResultReveal 0.5s ease 0.2s backwards;
}

.result-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding: 16px;
    background: var(--chip-bg);
    border-radius: 12px;
    border: 1px solid var(--chip-border);
    animation: pResultReveal 0.5s ease 0.3s backwards;
}

@keyframes pResultPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pResultReveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
    animation: pResultReveal 0.5s ease 0.35s backwards;
}

.result-tag {
    padding: 5px 12px;
    border-radius: 16px;
    background: var(--emotion-tag-bg);
    color: var(--emotion-tag-text);
    border: 1px solid var(--emotion-tag-border);
    font-size: 13px;
    transition: transform 0.2s ease;
}

.result-tag:hover {
    transform: scale(1.05);
}

.result-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
    animation: pResultReveal 0.5s ease 0.4s backwards;
}

.result-score-item {
    padding: 14px;
    border-radius: 10px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    text-align: center;
}

.result-score-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.result-score-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    overflow: hidden;
    margin-bottom: 4px;
}

.result-score-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent-color);
    width: 0;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.result-score-value {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    animation: pResultReveal 0.5s ease 0.5s backwards;
}

.result-btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.result-btn:active {
    transform: scale(0.96);
}

.result-btn-primary {
    background: var(--send-btn-bg);
    color: var(--send-btn-text, #fff);
}

.result-btn-secondary {
    background: var(--btn-ghost);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* 特殊组合结语 */
.result-special-msg {
    text-align: center;
    font-size: 14px;
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: var(--emotion-tag-bg);
    border-radius: 10px;
    border: 1px dashed var(--emotion-tag-border);
    animation: pResultReveal 0.5s ease 0.25s backwards;
}

/* 选项即时反馈 */
@keyframes feedbackPop {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 限时点击题 */
.tap-question { text-align: center; font-size: 20px; }

.tap-timer {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-color);
    margin: 16px 0;
    animation: tapPulse 1s ease infinite;
}

@keyframes tapPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tap-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tap-btn {
    padding: 20px 12px !important;
    font-size: 16px !important;
    text-align: center;
    border-radius: 16px !important;
}

.tap-btn.selected {
    background: var(--accent-color) !important;
    color: var(--send-btn-text, #fff) !important;
    transform: scale(0.95);
}

/* 拖拽打分题 */
.drag-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.drag-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: var(--border-light);
    outline: none;
}

.drag-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.drag-label {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    max-width: 60px;
    text-align: center;
}

.drag-confirm {
    margin-top: 16px;
    width: 100%;
    text-align: center;
    padding: 14px !important;
}

/* 图片选择题 */
.pick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 0;
}

.pick-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    padding: 24px;
    border-radius: 16px;
    background: var(--chip-bg);
    border: 2px solid var(--chip-border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.pick-item:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.pick-item.selected {
    border-color: var(--accent-color);
    background: var(--emotion-tag-bg);
    transform: scale(0.95);
}

/* 选项选中动画 */
.personality-option.selected {
    border-color: var(--accent-color) !important;
    background: var(--accent-color) !important;
    color: var(--send-btn-text, #fff) !important;
    transform: scale(0.96);
}

/* ========== 详细结果页 ========== */
.result-hero {
    text-align: center;
    padding: 24px 0;
    animation: pResultPop 0.5s ease;
}

.result-emoji { font-size: 64px; margin-bottom: 12px; }

.result-section {
    margin-bottom: 20px;
    animation: pResultReveal 0.5s ease backwards;
}

.result-section:nth-child(2) { animation-delay: 0.1s; }
.result-section:nth-child(3) { animation-delay: 0.15s; }
.result-section:nth-child(4) { animation-delay: 0.2s; }
.result-section:nth-child(5) { animation-delay: 0.25s; }

.result-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}

.result-detail {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
    padding: 14px;
    background: var(--chip-bg);
    border-radius: 10px;
    border: 1px solid var(--chip-border);
}

.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-item {
    padding: 10px;
    background: var(--chip-bg);
    border-radius: 8px;
    border: 1px solid var(--chip-border);
    text-align: center;
}

.stat-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; }
.stat-value { font-size: 13px; font-weight: 600; color: var(--accent-color); }

.result-advice {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding: 14px;
    background: var(--emotion-tag-bg);
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
}

.result-time-msg {
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    font-style: italic;
    padding: 12px;
}

/* ========== 转盘题 ========== */
.spin-container {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 16px auto;
}

.spin-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 12px auto;
}
.spin-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    line-height: 1;
}

#spinCanvas {
    border-radius: 50%;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.spin-result {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 12px 0;
    min-height: 24px;
}

.spin-btn {
    width: 100%;
    text-align: center;
    padding: 14px !important;
    font-size: 16px !important;
}

/* ========== 翻牌题 ========== */
.flip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
}

.flip-card {
    perspective: 600px;
    height: 80px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.flip-card .flip-front,
.flip-card .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 0.5s ease;
}

.flip-card .flip-front {
    background: var(--accent-color);
    color: var(--send-btn-text, #fff);
    font-size: 24px;
    font-weight: 700;
}

.flip-card .flip-back {
    background: var(--chip-bg);
    border: 2px solid var(--accent-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    transform: rotateY(180deg);
}

.flip-card.flipped .flip-front {
    transform: rotateY(180deg);
}

.flip-card.flipped .flip-back {
    transform: rotateY(0deg);
}

/* ========== 二选一题 ========== */
.versus-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.versus-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 12px;
    border-radius: 16px;
    background: var(--chip-bg);
    border: 2px solid var(--chip-border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.versus-btn:hover {
    border-color: var(--accent-color);
    transform: scale(1.03);
}

.versus-btn.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
    transform: scale(0.95);
}

.versus-btn.selected .versus-text {
    color: var(--send-btn-text, #fff);
}

.versus-emoji {
    font-size: 36px;
}

.versus-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.versus-vs {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* 特殊结果列表 */
.result-special-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-special-item {
    padding: 10px 14px;
    background: var(--chip-bg);
    border-radius: 8px;
    border: 1px solid var(--chip-border);
    font-size: 14px;
    color: var(--text-primary);
}

.result-special-item strong {
    color: var(--accent-color);
}

/* ========== 精确打击 ========== */
.timing-info {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timing-bar-container {
    padding: 20px 0;
}

.timing-bar {
    position: relative;
    height: 40px;
    background: var(--chip-bg);
    border-radius: 20px;
    border: 2px solid var(--chip-border);
    overflow: hidden;
}

.timing-zone {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--accent-color);
    opacity: 0.6;
    border-radius: 20px;
    transition: width 0.3s ease;
}

.timing-triangle {
    position: absolute;
    top: -8px;
    font-size: 16px;
    transition: none;
    z-index: 2;
}

.timing-triangle.timing-hit {
    color: #4ecdc4;
    animation: hitPop 0.3s ease;
}

.timing-triangle.timing-miss {
    color: #ff6b6b;
    animation: missShake 0.3s ease;
}

@keyframes hitPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

@keyframes missShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.timing-btn {
    width: 100%;
    text-align: center;
    padding: 14px !important;
    font-size: 16px !important;
    margin-top: 8px;
}

.timing-result {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

/* ========== 反应测试 ========== */
.reaction-box {
    width: 100%;
    height: 120px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    margin: 16px 0;
}

.reaction-result {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 20px;
}

/* ========== 记忆翻牌 ========== */
.memory-info {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 8px 0;
}

.memory-card {
    perspective: 600px;
    height: 64px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.memory-card .mem-front,
.memory-card .mem-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 0.4s ease;
}

.memory-card .mem-front {
    background: var(--accent-color);
    color: var(--send-btn-text, #fff);
    font-size: 20px;
    font-weight: 700;
}

.memory-card .mem-back {
    background: var(--chip-bg);
    border: 2px solid var(--chip-border);
    font-size: 24px;
    transform: rotateY(180deg);
}

.memory-card.flipped .mem-front { transform: rotateY(180deg); }
.memory-card.flipped .mem-back { transform: rotateY(0deg); }
.memory-card.matched .mem-back { border-color: #4ecdc4; background: rgba(78,205,196,0.15); }

/* ========== 转盘选色 ========== */
.wheel-pick {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.wheel-pick-btn {
    padding: 14px 24px;
    border-radius: 12px;
    border: 3px solid transparent;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wheel-pick-btn:hover { transform: scale(1.05); }
.wheel-pick-btn.selected { border-color: var(--text-primary); transform: scale(0.95); box-shadow: 0 4px 16px var(--shadow-color); }

/* ========== 加载动画 ========== */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.result-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result-loading-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== API总结 ========== */
.result-api-summary {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    padding: 16px;
    background: var(--chip-bg);
    border-radius: 12px;
    border-left: 3px solid var(--accent-color);
    white-space: pre-wrap;
}

.result-ai-box {
    margin: 0 0 20px 0;
    padding: 16px;
    background: var(--chip-bg);
    border-radius: 12px;
    border: 1px solid var(--chip-border);
    min-height: 80px;
}

/* ========== 疯狂点击 ========== */
.click-count {
    text-align: center;
    font-size: 64px;
    font-weight: 700;
    color: var(--accent-color);
    margin: 16px 0;
    animation: clickPop 0.1s ease;
}

@keyframes clickPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.click-area {
    width: 100%;
    padding: 30px !important;
    font-size: 20px !important;
    text-align: center;
    border-radius: 16px !important;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.click-area:active {
    transform: scale(0.95);
}

.click-result {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ========== 掷骰子 ========== */
.dice-options {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.dice-result {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: 12px;
    min-height: 24px;
}

/* ========== 颜色心情 ========== */
.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
}

.color-item {
    height: 70px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
}

.color-item:hover { transform: scale(1.05); }
.color-item.selected { border-color: var(--text-primary); transform: scale(0.95); }

.color-name {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ========== 创建头像 ========== */
.avatar-section { margin-bottom: 16px; }
.avatar-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.avatar-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.avatar-item {
    font-size: 32px;
    padding: 12px;
    border-radius: 12px;
    background: var(--chip-bg);
    border: 2px solid var(--chip-border);
    cursor: pointer;
    transition: all 0.2s ease;
}
.avatar-item:hover { border-color: var(--accent-color); transform: scale(1.1); }
.avatar-item.selected { border-color: var(--accent-color); background: var(--emotion-tag-bg); transform: scale(0.95); }
.avatar-preview {
    text-align: center;
    font-size: 48px;
    padding: 16px;
    background: var(--chip-bg);
    border-radius: 16px;
    border: 2px dashed var(--chip-border);
    margin-top: 12px;
}

/* ========== 你更愿意 ========== */
.would-rather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
}

.would-rather-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border-radius: 16px;
    background: var(--chip-bg);
    border: 2px solid var(--chip-border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.would-rather-item:hover { border-color: var(--accent-color); transform: scale(1.03); }
.would-rather-item.selected { border-color: var(--accent-color); background: var(--emotion-tag-bg); transform: scale(0.95); }
.wr-emoji { font-size: 32px; }
.wr-text { font-size: 13px; font-weight: 600; color: var(--text-primary); text-align: center; }

/* ========== 时间胶囊 ========== */
.time-capsule-input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid var(--chip-border);
    background: var(--chip-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin: 16px 0;
    transition: border-color 0.2s ease;
}

.time-capsule-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.time-capsule-input::placeholder {
    color: var(--text-tertiary);
}

/* ========== 快速打字 ========== */
.speed-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.speed-input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid var(--chip-border);
    background: var(--chip-bg);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    margin: 8px 0;
    transition: border-color 0.2s ease;
}

.speed-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.speed-timer {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    margin: 8px 0;
}

.speed-result {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 20px;
}

/* ========== 你更愿意 ========== */
.would-rather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
}

.would-rather-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border-radius: 16px;
    background: var(--chip-bg);
    border: 2px solid var(--chip-border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.would-rather-item:hover { border-color: var(--accent-color); transform: scale(1.03); }
.would-rather-item.selected { border-color: var(--accent-color); background: var(--emotion-tag-bg); transform: scale(0.95); }
.wr-emoji { font-size: 28px; }
.wr-text { font-size: 13px; font-weight: 600; color: var(--text-primary); text-align: center; }

/* ========== 找字游戏 ========== */
.findchar-display {
    text-align: center;
    font-size: 80px;
    font-weight: 700;
    color: var(--accent-color);
    padding: 20px;
    margin: 16px 0;
    background: var(--chip-bg);
    border-radius: 16px;
    border: 2px solid var(--chip-border);
    transition: opacity 0.3s ease;
}

.findchar-target-inline {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.2em;
}

.findchar-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.findchar-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 8px 0;
}

.findchar-cell {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 6px;
    background: var(--chip-bg);
    color: var(--text-primary);
    border: 1px solid var(--chip-border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.findchar-cell:hover { background: var(--emotion-tag-bg); }
.findchar-cell.findchar-correct { background: #4ecdc4; color: #fff; transform: scale(1.2); }
.findchar-cell.findchar-wrong { background: #e74c3c; color: #fff; }

.findchar-result {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

/* ========== 记忆数字 ========== */
.memnum-display {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
    padding: 20px;
    margin: 16px 0;
    background: var(--chip-bg);
    border-radius: 16px;
    border: 2px solid var(--chip-border);
    letter-spacing: 8px;
    transition: opacity 0.3s ease;
}

.memnum-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.memnum-result {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

/* ========== 抽卡 ========== */
.gacha-rates {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 11px;
    flex-wrap: wrap;
}

.gacha-rate { font-weight: 600; letter-spacing: 0.5px; }

.gacha-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px 0;
}

.gacha-grid-10 {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.gacha-open-all {
    width: 100%;
    padding: 14px !important;
    font-size: 16px !important;
    margin: 14px 0;
    background: linear-gradient(135deg, #ff6b6b, #ffd740, #4ecdc4) !important;
    background-size: 200% 200% !important;
    animation: gachaGradient 3s ease infinite !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 4px 16px rgba(255,107,107,0.3);
}

@keyframes gachaGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 抽卡结果统计 */
.gacha-summary {
    text-align: center;
    padding: 16px;
    background: var(--chip-bg);
    border-radius: 12px;
    border: 1px solid var(--chip-border);
    margin-top: 12px;
    animation: pResultReveal 0.4s ease;
}

.gacha-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.gacha-summary-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.gacha-stat {
    font-size: 14px;
    font-weight: 600;
}

.gacha-summary-score {
    font-size: 13px;
    color: var(--text-secondary);
}

.gacha-summary-score strong {
    font-size: 20px;
    color: var(--accent-color);
}

.gacha-card {
    perspective: 600px;
    height: 80px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    position: relative;
}

.gacha-card-front, .gacha-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 0.5s ease;
}

.gacha-card-front {
    background: linear-gradient(135deg, var(--chip-bg), var(--emotion-tag-bg));
    border: 2px solid var(--chip-border);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-tertiary);
}

.gacha-card-back {
    background: var(--chip-bg);
    border: 2px solid;
    transform: rotateY(180deg);
    gap: 2px;
    transition: transform 0.5s ease, box-shadow 0.3s ease;
}

.gacha-card.flipped .gacha-card-front { transform: rotateY(180deg); }
.gacha-card.flipped .gacha-card-back { transform: rotateY(0deg); }

/* 等待翻牌状态 - 微微发光 */
.gacha-card-waiting .gacha-card-front {
    animation: gachaWaitingPulse 2s ease-in-out infinite;
}
@keyframes gachaWaitingPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255,255,255,0.1); }
    50% { box-shadow: 0 0 12px rgba(255,255,255,0.25); }
}

/* 稀有度光环 */
.gacha-glow-UR {
    background: linear-gradient(135deg, #1a0008, #2d0012) !important;
    border-color: #ff1744 !important;
    box-shadow: 0 0 20px rgba(255,23,68,0.6), inset 0 0 15px rgba(255,23,68,0.15) !important;
    animation: gachaURPulse 2s ease-in-out infinite;
}
@keyframes gachaURPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255,23,68,0.6), inset 0 0 15px rgba(255,23,68,0.15); }
    50% { box-shadow: 0 0 30px rgba(255,23,68,0.8), inset 0 0 20px rgba(255,23,68,0.2); }
}
.gacha-glow-SSR {
    background: linear-gradient(135deg, #1a0d00, #2d1a00) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 15px rgba(255,107,107,0.5), inset 0 0 10px rgba(255,107,107,0.1) !important;
    animation: gachaSSRPulse 2s ease-in-out infinite;
}
@keyframes gachaSSRPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255,107,107,0.5), inset 0 0 10px rgba(255,107,107,0.1); }
    50% { box-shadow: 0 0 22px rgba(255,107,107,0.7), inset 0 0 15px rgba(255,107,107,0.15); }
}
.gacha-glow-SR {
    background: linear-gradient(135deg, #1a1500, #2d2300) !important;
    border-color: #ffd740 !important;
    box-shadow: 0 0 10px rgba(255,215,64,0.4) !important;
}

.gacha-rarity { font-size: 18px; font-weight: 700; }
.gacha-desc { font-size: 10px; color: var(--text-secondary); }

/* 翻牌完成按钮 */
.gacha-btn-done {
    opacity: 0.5 !important;
    cursor: default !important;
    animation: none !important;
}

/* 十连完整结果面板 */
.gacha-summary-full {
    background: linear-gradient(135deg, var(--panel-bg), var(--input-bg)) !important;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 16px !important;
}
.gacha-summary-full .gacha-summary-title {
    font-size: 16px !important;
    margin-bottom: 12px !important;
}
.gacha-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}
.gacha-stat-label {
    font-weight: 700;
    width: 30px;
    flex-shrink: 0;
}
.gacha-stat-desc {
    color: var(--text-secondary);
    width: 40px;
    flex-shrink: 0;
    font-size: 11px;
}
.gacha-stat-bar-bg {
    flex: 1;
    height: 6px;
    background: var(--chip-bg);
    border-radius: 3px;
    overflow: hidden;
}
.gacha-stat-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}
.gacha-stat-count {
    font-weight: 700;
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}
.gacha-summary-divider {
    height: 1px;
    background: var(--panel-border);
    margin: 10px 0;
}
.gacha-summary-detail {
    font-size: 13px;
}
.gacha-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}
.gacha-detail-row span:first-child { color: var(--text-secondary); }
.gacha-detail-score { font-weight: 700; color: var(--accent-color); }

.gacha-result {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

/* 抽卡区域包装 */
.gacha-area-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.gacha-btn-area {
    margin-top: 12px;
    flex-shrink: 0;
}
/* 十连：10张卡自动换行 */
.gacha-grid-ten {
    grid-template-columns: repeat(4, 1fr);
}
/* 百连分页信息 */
.gacha-page-info {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.gacha-btn-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.gacha-btn-half {
    flex: 1;
    margin: 0 !important;
    padding: 12px !important;
    font-size: 14px !important;
}
.gacha-btn-mega {
    background: linear-gradient(135deg, #ff6b6b, #ffd740) !important;
}
.gacha-page-nav {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 0;
}
.gacha-nav-btn {
    flex: 1;
    padding: 10px !important;
    font-size: 13px !important;
    background: var(--chip-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--chip-border) !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s;
}
.gacha-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.gacha-nav-btn:not(:disabled):hover {
    background: var(--emotion-tag-bg) !important;
}

/* Toast 通知 */
.personality-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--panel-bg);
    color: var(--text-primary);
    border: 1px solid var(--chip-border);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.personality-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 继续做题提示 */
.continue-prompt {
    text-align: center;
    padding: 20px;
}
.continue-prompt p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* 跳过按钮 */
.question-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.question-top-row .personality-question {
    flex: 1;
    margin-bottom: 0;
}
.skip-btn {
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--chip-border);
    background: var(--chip-bg);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 4px;
}
.skip-btn:hover {
    background: var(--emotion-tag-bg);
    color: var(--text-primary);
}

/* 拆礼盒 */
.giftbox-grid { display: grid; gap: 6px; max-width: 300px; margin: 12px auto; }
.giftbox-cell {
    aspect-ratio: 1; border: none; border-radius: 10px; font-size: 24px;
    background: var(--chip-bg); border: 2px solid var(--chip-border);
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.giftbox-cell:active { transform: scale(0.9); }
.giftbox-icon { font-size: 24px; }
.giftbox-avatar {
    width: 80%; height: 80%; border-radius: 50%; object-fit: cover;
    animation: giftboxPop 0.4s ease;
}
.giftbox-found { background: rgba(var(--accent-color-rgb,166,126,255),0.2); border-color: var(--accent-color); animation: giftboxPop 0.4s ease; }
.giftbox-wrong { animation: giftboxShake 0.3s ease; }
@keyframes giftboxPop { 0%{transform:scale(0);opacity:0} 50%{transform:scale(1.2)} 100%{transform:scale(1);opacity:1} }
@keyframes giftboxShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.giftbox-info { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

/* 多环转盘 */
.multiwheel-wrap { position: relative; width: 240px; height: 240px; margin: 12px auto; }
.multiwheel-canvas { width: 240px; height: 240px; }
.multiwheel-pointer {
    position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
    font-size: 22px; color: var(--accent-color); z-index: 3; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.multiwheel-center-box {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 72px; height: 72px; border-radius: 50%; background: var(--panel-bg);
    border: 2px solid var(--accent-color); display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: var(--accent-color); z-index: 2;
    flex-direction: column; line-height: 1.2;
}
.mw-center-stopped { animation: mwStop 0.3s ease; }
@keyframes mwStop { 0%{transform:translate(-50%,-50%) scale(1.2)} 100%{transform:translate(-50%,-50%) scale(1)} }
.multiwheel-result { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 8px; }

/* 彩票 */
.lottery-input-row { display: flex; gap: 8px; margin: 12px 0; }
.lottery-input {
    flex: 1; padding: 10px 14px; border-radius: 10px; border: 2px solid var(--chip-border);
    background: var(--chip-bg); color: var(--text-primary); font-size: 18px;
    font-weight: 700; text-align: center; letter-spacing: 6px; font-family: monospace;
}
.lottery-btn { margin: 0 !important; }
.lottery-hints { max-height: 200px; overflow-y: auto; }
.lottery-hint-row { display: flex; gap: 6px; justify-content: center; margin: 4px 0; font-family: monospace; font-size: 16px; font-weight: 600; }
.lottery-correct { color: #4ecdc4; background: rgba(78,205,196,0.15); padding: 2px 6px; border-radius: 4px; }
.lottery-wrong-pos { color: #ffd740; background: rgba(255,215,64,0.15); padding: 2px 6px; border-radius: 4px; }
.lottery-wrong { color: var(--text-tertiary); padding: 2px 6px; }
.lottery-info { text-align: center; font-size: 13px; color: var(--text-secondary); }
.lottery-result { text-align: center; font-size: 14px; margin-top: 8px; }

/* 结果页详情 */
.result-gacha-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--chip-border);
}
.result-gacha-item:last-child { border-bottom: none; }
.result-gacha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.result-gacha-stats {
    font-size: 13px;
    margin: 4px 0;
}
.result-gacha-score {
    font-size: 12px;
    color: var(--text-secondary);
}
.result-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.result-detail-row:last-child { border-bottom: none; }
.result-detail-row span { flex: 1; }
.result-game-replay {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--emotion-tag-bg);
    color: var(--text-secondary);
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.6;
    flex-shrink: 0;
}
.result-game-replay:hover {
    opacity: 1;
    background: var(--accent-color);
    color: #fff;
}
/* ===== v19 新游戏CSS：precision / colorDiff / stroop ===== */

/* --- 精准计时 --- */
.precision-area {
    text-align: center;
}
.precision-display {
    font-size: 48px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    margin: 16px 0;
    letter-spacing: 2px;
}
.precision-btn {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    background: transparent;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    margin: 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.precision-btn:active {
    transform: scale(0.92);
    background: var(--accent-color);
    color: #fff;
}
.precision-result {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 8px;
    min-height: 24px;
}
.precision-result .precision-perfect {
    color: var(--accent-color);
    font-weight: 700;
}

/* --- 色差挑战 --- */
.colordiff-grid {
    display: grid;
    gap: 6px;
    margin: 16px auto;
    max-width: 320px;
}
.colordiff-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.colordiff-cell:active {
    transform: scale(0.9);
}
.colordiff-cell.colordiff-correct {
    border-color: #4ecdc4;
    animation: colordiff-pop 0.3s;
}
.colordiff-cell.colordiff-wrong {
    border-color: #ff6b6b;
    animation: colordiff-shake 0.3s;
}
.colordiff-cell.colordiff-reveal {
    border-color: #4ecdc4;
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.6);
}
@keyframes colordiff-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes colordiff-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.colordiff-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}
.colordiff-score {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}
.colordiff-result {
    text-align: center;
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 8px;
    min-height: 24px;
}

/* --- 斯特鲁普效应 --- */
.stroop-area {
    text-align: center;
}
.stroop-word {
    font-size: 48px;
    font-weight: 800;
    margin: 20px 0;
    transition: color 0.15s;
    user-select: none;
}
.stroop-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
}
.stroop-btn {
    padding: 14px 8px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--chip-bg);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.stroop-btn:active {
    transform: scale(0.95);
}
.stroop-btn.stroop-correct {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
}
.stroop-btn.stroop-wrong {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}
.stroop-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}
.stroop-result {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 8px;
    min-height: 24px;
}

/* ===== 欢迎界面卡片风格 v19 ===== */
.personality-start-card {
    background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(78,205,196,0.08));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 380px;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: blur(10px);
}
.personality-game-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}
.game-preview-item {
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--chip-bg);
    border: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}
