        :root {
            /* === Dark Premium 暗色高端设计系统 === */
            --bg-color: #0F1117;           /* 深墨蓝黑背景 */
            --card-bg: #1A1D28;            /* 卡片背景：深灰蓝 */
            --card-bg-hover: #222638;      /* 卡片悬停 */
            --text-main: #E8ECF4;          /* 主文字：亮灰白 */
            --text-sub: #8B92A5;           /* 次要文字：中灰蓝 */
            --border-color: rgba(255,255,255,0.08);  /* 边框色：微透明白 */
            
            /* 鲜艳数据色彩（暗色下提亮） */
            --accent-primary: #818CF8;     /* 靛蓝紫 - 主色（提亮） */
            --accent-secondary: #A78BFA;   /* 紫色 - 次色（提亮） */
            --accent-green: #34D399;       /* 翠绿 - 成功/保本 */
            --accent-blue: #60A5FA;        /* 天蓝 - 信息 */
            --accent-red: #F87171;         /* 珊瑚红 - 亏损 */
            --accent-orange: #FBBF24;      /* 琥珀 - 警告 */
            --accent-pink: #F472B6;        /* 粉红 - 特殊 */
            --accent-cyan: #22D3EE;        /* 青色 - 辅助 */
            
            --input-bg: #151822;           /* 输入框背景：更深 */
            --selected-bg: rgba(99,102,241,0.15);  /* 选中背景：暗靛蓝 */
            --selected-border: var(--accent-primary);

            /* 暗色阴影系统 */
            --clay-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
            --clay-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
            --clay-shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -1px 2px rgba(255, 255, 255, 0.03);
            
            /* 普通阴影（暗色加深） */
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
            --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

            /* 安全距离 */
            --safe-bottom: env(safe-area-inset-bottom);
        }

        html, body {
            overscroll-behavior: none;
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
            height: 100%;
            overflow: hidden;  /* 全局不滚动，改用局部滚动 */
        }
        /* 全局隐藏滚动条 */
        *::-webkit-scrollbar {
            display: none;  /* Chrome, Safari, Opera */
        }
        * {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        body {
            background-color: #080a0e;
            color: var(--text-main);
            font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
            /* 桌面端模拟手机尺寸 */
            max-width: 430px;
            margin-left: auto;
            margin-right: auto;
            background-color: var(--bg-color);
            position: relative;
            /* box-shadow removed for perf */
        }
        html {
            background-color: #080a0e;
        }

        /* --- 顶部导航 (Dark Premium) --- */
        .header {
            background: rgba(15, 17, 23, 0.97);
            position: sticky;
            top: 0;
            z-index: 50;
            padding: 7px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 31px;
            box-sizing: border-box;
            box-shadow: 0 2px 16px rgba(0,0,0,0.3);
        }
        .header h1 { 
            margin: 0; 
            font-size: 17px; 
            font-weight: 800; 
            color: var(--accent-primary);
            font-family: 'Nunito', sans-serif;
        }
        
        /* 模式切换开关 (Dark Premium) */
        .mode-switch {
            display: flex;
            align-items: center;
            background: rgba(0, 0, 0, 0.4);
            border-radius: 8px;
            padding: 2px;
            gap: 2px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
        }
        .mode-switch-btn {
            padding: 4px 10px;
            font-size: 11px;
            font-weight: 600;
            border: 1px solid transparent;
            background: transparent;
            color: var(--text-sub);
            cursor: pointer;
            border-radius: 6px;
            transition: transform 0.25s ease, opacity 0.25s ease;
        }
        .mode-switch-btn.active {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-main);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
        }
        .mode-content {
            display: block;
        }
        
        .filter-trigger-btn {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-main);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 12px;
            cursor: pointer;
            display: flex; align-items: center; gap: 3px;
            box-shadow: var(--shadow-sm);
            font-weight: 500;
        }

        /* --- 网格布局 --- */
        .grid-container {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            padding: 8px;
        }

        /* --- 卡片样式 (Dark Premium) --- */
        .item-card {
            background-color: var(--card-bg);
            border-radius: 16px;
            overflow: hidden;
            position: relative;
            border: 1px solid rgba(255,255,255,0.06);
            display: flex; flex-direction: column;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            aspect-ratio: 0.72;
            box-shadow: var(--clay-shadow);
        }

        .item-card:hover {
            border-color: rgba(129,140,248,0.4);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            transform: translateY(-4px) scale(1.02);
        }

        .item-card:active { transform: scale(0.97); }

        .item-card.is-selected {
            border-color: var(--accent-cyan);
            background-color: var(--selected-bg);
            box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
        }

        .item-card.is-disabled {
            opacity: 0.4;
            pointer-events: none;
            filter: grayscale(80%);
        }

        .rarity-bar { height: 4px; width: 100%; position: relative; z-index: 5; border-radius: 2px 2px 0 0; }
        
        .img-wrapper {
            position: relative;
            padding-top: 16px;
            flex: 1;
            /* 暗色渐变背景 */
            background: linear-gradient(145deg, #1A1D28 0%, #151822 50%, #111318 100%);
            display: flex; justify-content: center; align-items: center;
            overflow: hidden;
        }
        .img-wrapper::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            /* 暗色水印 */
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40'%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-size='12' font-weight='bold' fill='%23818CF8' opacity='0.06' transform='rotate(-15 40 20)'%3ECS汰换魔方%3C/text%3E%3C/svg%3E");
            background-repeat: repeat;
            pointer-events: none;
            z-index: 0;
        }
        .item-img { 
            width: 85%; height: auto; 
            filter: drop-shadow(0 4px 5px rgba(0,0,0,0.15)); /* 阴影变淡 */
            z-index: 1;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .item-img.loaded { opacity: 1; }
        
        /* 骨架屏加载动画 (Dark) */
        .img-placeholder {
            position: absolute;
            width: 60%;
            height: 60%;
            background: linear-gradient(90deg, #1A1D28 25%, #222638 50%, #1A1D28 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 12px;
        }
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        .img-wrapper.img-loaded .img-placeholder { display: none; }
        
        .check-mark {
            position: absolute; top: 6px; right: 6px;
            background: linear-gradient(135deg, var(--accent-cyan), #22D3EE); color: #fff;
            width: 20px; height: 20px; border-radius: 50%;
            display: none; align-items: center; justify-content: center;
            font-size: 11px; font-weight: 800; z-index: 20;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
            border: 2px solid rgba(26,29,40,0.8);
        }
        .item-card.is-selected .check-mark { display: flex; }
        
        /* 已选数量徽章 (Dark) */
        .select-count-badge {
            position: absolute;
            top: 6px;
            right: 6px;
            background: linear-gradient(135deg, var(--accent-cyan), #22D3EE);
            color: #fff;
            min-width: 20px;
            height: 20px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 800;
            z-index: 20;
            padding: 0 5px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
            border: 2px solid rgba(26,29,40,0.8);
        }

        /* 顶部悬浮信息 */
        .inner-info {
            position: absolute; top: 3px; left: 3px; width: calc(100% - 6px);
            display: flex; justify-content: space-between;
            pointer-events: none; z-index: 10;
        }
        /* 文字样式 (Dark) */
        .info-tag {
            font-size: 9px;
            color: var(--text-main);
            background: rgba(15, 17, 23, 0.95);
            padding: 2px 5px;
            border-radius: 6px;
            font-weight: 700; font-family: 'Nunito', sans-serif;
            line-height: 1; white-space: nowrap;
            border: 1px solid rgba(255,255,255,0.1);
            transform: scale(0.9);
            transform-origin: top left;
            box-shadow: 0 1px 4px rgba(0,0,0,0.3);
        }
        .info-tag:last-child { transform-origin: top right; }
        
        .info-tag span { font-weight: 600; font-size: 8px; margin-right: 1px; color: var(--accent-primary); }

        /* 武器箱归属标识 - 右上角 */
        .case-tag {
            position: absolute;
            top: 3px;
            right: 3px;
            font-size: 8px;
            color: #fff;
            background: rgba(0,0,0,0.5);
            padding: 1px 3px;
            border-radius: 3px;
            font-weight: 600;
            line-height: 1;
            white-space: nowrap;
            max-width: 40px;
            overflow: hidden;
            text-overflow: ellipsis;
            z-index: 10;
        }
        /* 图片内价格标签 - 右下角 */
        .img-price-tag {
            position: absolute;
            bottom: 4px;
            right: 4px;
            font-size: 10px;
            color: #10b981;
            background: rgba(0,0,0,0.7);
            padding: 2px 5px;
            border-radius: 4px;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            z-index: 10;
        }

        .card-footer {
            padding: 4px 6px;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: var(--card-bg);
        }
        .item-full-name {
            font-size: 10px; 
            line-height: 1.2; 
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 500;
        }
        .item-price { 
            font-size: 10px; 
            color: var(--text-main); 
            font-weight: 600; 
            text-align: right; 
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .loading { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--text-sub); font-size: 13px; }

        /* =========================================
        /* --- 底部合约栏 (Claymorphism) ---
        /* ========================================= */
        .contract-bar {
            position: fixed; 
            bottom: calc(44px + var(--safe-bottom)); 
            left: 50%;
            transform: translateX(-50%);
            width: calc(100% - 32px);
            max-width: calc(430px - 32px);
            background: rgba(26, 29, 40, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-bottom: none;
            padding: 12px; 
            padding-bottom: 12px; 
            z-index: 150;
            display: flex; flex-direction: column; gap: 10px;
            /* 胶囊浮动风格阴影 */
            box-shadow: 
                0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
            box-sizing: border-box;
            border-radius: 24px 24px 0 0;
        }

        .contract-header {
            display: flex; align-items: center; gap: 10px;
            font-size: 12px; color: var(--text-sub);
        }
        
        .header-left { display: flex; align-items: center; gap: 10px; }
        .total-price-display { flex: 1; text-align: center; }
        #sel-count-text { font-weight: 700; color: var(--text-main); }

        .clear-btn {
            background: rgba(248, 113, 113, 0.15);
            border: 1px solid rgba(248, 113, 113, 0.3);
            color: var(--accent-red);
            padding: 2px 10px;
            font-size: 11px;
            cursor: pointer;
            font-weight: 600;
            border-radius: 20px;
            transition: transform 0.2s ease, opacity 0.2s ease;
            line-height: 1.2;
        }
        .clear-btn:hover { background: rgba(248, 113, 113, 0.25); }
        .clear-btn:active { transform: scale(0.95); }

        .tradeup-text-btn {
            background: rgba(34, 211, 238, 0.15);
            border: 1px solid rgba(34, 211, 238, 0.3);
            color: var(--accent-cyan);
            padding: 2px 10px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            border-radius: 20px;
            transition: transform 0.2s ease, opacity 0.2s ease;
            line-height: 1.2;
        }
        .tradeup-text-btn:hover { background: rgba(34, 211, 238, 0.25); }
        .tradeup-text-btn:active { transform: scale(0.95); }
        .tradeup-text-btn.disabled {
            background: rgba(139, 146, 165, 0.1);
            border-color: rgba(139, 146, 165, 0.2);
            color: var(--text-sub);
            cursor: not-allowed;
            opacity: 0.6;
        }
        
        .total-price-display {
            font-size: 12px;
            color: var(--text-main);
            font-weight: 700;
            background: transparent;
            padding: 0;
        }

        .avg-float-display {
            color: var(--text-sub);
            font-weight: 600;
            font-family: 'Nunito', monospace;
            font-size: 12px;
            background: transparent;
            padding: 0;
            border: none;
        }

        .slots-container {
            display: flex; 
            gap: 6px;
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;  /* Firefox */
            -ms-overflow-style: none;  /* IE/Edge */
        }
        .slots-container::-webkit-scrollbar {
            display: none;  /* Chrome/Safari */
        }

        .slot {
            flex: 0 0 calc((100% - 24px) / 5);  /* 固定5槽位大小 */
            aspect-ratio: 1; 
            background: var(--input-bg);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: var(--clay-shadow-inset);
        }
        /* 填充后槽位粘土风 */
        .slot.filled { 
            border-color: var(--accent-cyan); 
            background: 
                linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
                linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                #1a1d28;
            background-size: 8px 8px;
            box-shadow: var(--clay-shadow-sm);
        }
        .slot img { width: 100%; height: 100%; object-fit: cover; }
        
        .tradeup-btn {
            background: var(--input-bg); color: var(--text-sub); border: 2px solid var(--border-color);
            width: 100%; padding: 14px; border-radius: 16px; 
            font-weight: 800; font-size: 15px;
            font-family: 'Nunito', sans-serif;
            cursor: not-allowed; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: var(--clay-shadow-inset);
        }
        .tradeup-btn.ready {
            background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-pink) 100%);
            color: #ffffff;
            border: none;
            cursor: pointer; pointer-events: auto;
            box-shadow: var(--clay-shadow);
        }
        .tradeup-btn.ready:active {
            transform: scale(0.98);
            box-shadow: var(--clay-shadow-sm);
        }

        /* =========================================
        /* --- 筛选抽屉 - 深色毛玻璃高保真风格 ---
        /* ========================================= */
        .drawer-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.6); z-index: 200; 
            opacity: 0; pointer-events: none; 
            transition: opacity 0.2s ease;
        }
        .drawer-overlay.active { opacity: 1; pointer-events: auto; }
                
        .drawer-body {
            position: fixed; top: 0; right: 0; 
            width: 280px; max-width: 85%; height: 100%;
            background: rgba(18, 20, 28, 0.98);
            z-index: 201; 
            transform: translateX(100%);
            transition: transform 0.25s ease;
            display: flex; flex-direction: column; 
            box-shadow: -2px 0 12px rgba(0,0,0,0.3);
        }
        .drawer-body.active { transform: translateX(0); }
        
        .drawer-header {
            height: 44px; min-height: 44px;
            padding: 0 12px; 
            display: flex; justify-content: space-between; align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.06); 
            background: rgba(12, 14, 20, 0.8);
            position: sticky; top: 0; z-index: 10;
        }
        .drawer-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.92); letter-spacing: 0.3px; }
        .close-icon {
            font-size: 14px; 
            padding: 6px;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(255,255,255,0.5); 
            cursor: pointer;
            border-radius: 6px;
            transition: transform 0.15s ease, opacity 0.15s ease;
        }
        .close-icon:hover {
            color: rgba(255,255,255,0.8);
            background: rgba(255,255,255,0.08);
        }
        .close-icon:active { 
            background: rgba(255,255,255,0.12); 
        }
        
        .drawer-content { 
            flex: 1; 
            overflow-y: auto; 
            overflow-x: hidden;
            padding: 10px; 
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }
        
        .filter-section { 
            margin-bottom: 8px; 
            background: rgba(255,255,255,0.03); 
            padding: 10px 12px; 
            border-radius: 8px; 
            border: 1px solid rgba(255,255,255,0.06);
            transition: border-color 0.15s, background 0.15s;
        }
        .filter-section:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
        .filter-label { font-size: 12px; margin-bottom: 8px; color: rgba(255,255,255,0.88); font-weight: 600; }
        
        .input-row { 
            display: flex; 
            align-items: center; 
            gap: 6px; 
            margin-bottom: 8px;
            width: 100%;
            box-sizing: border-box;
        }
        .filter-input {
            flex: 1;
            min-width: 0;
            max-width: 100%;
            background: rgba(0,0,0,0.3); 
            border: 1px solid rgba(255,255,255,0.08); 
            color: rgba(255,255,255,0.92);
            padding: 8px 8px; 
            border-radius: 6px; 
            font-size: 12px; 
            text-align: center; 
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
            box-sizing: border-box;
            -webkit-appearance: none;
            appearance: none;
        }
        .filter-input::placeholder { color: rgba(255,255,255,0.3); }
        .filter-input:focus { border-color: rgba(59,130,246,0.6); box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }
        
        /* 价格区间筛选器优化 */
        .filter-section-price { padding: 8px 12px; margin-bottom: 8px; }
        .price-confirm-btn {
            flex-shrink: 0;
            padding: 8px 12px;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.15s, opacity 0.15s;
            white-space: nowrap;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        .price-confirm-btn:hover { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
        .price-confirm-btn:active { opacity: 0.85; transform: scale(0.98); }
        
        .tag-group { 
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; 
        }
        
        .filter-tag {
            background: rgba(255,255,255,0.04); 
            color: rgba(255,255,255,0.6); 
            border: 1px solid rgba(255,255,255,0.08);
            padding: 8px 0; 
            border-radius: 6px; 
            font-size: 11px; 
            cursor: pointer;
            text-align: center; 
            display: flex; 
            align-items: center; 
            justify-content: center;
            width: 100%; 
            box-sizing: border-box; 
            font-weight: 500;
            transition: transform 0.15s ease, opacity 0.15s ease;
        }
        .filter-tag:hover {
            border-color: rgba(255,255,255,0.15);
            background: rgba(255,255,255,0.06);
        }
        .filter-tag.active {
            background: rgba(59,130,246,0.15); 
            color: #60a5fa; 
            border-color: rgba(59,130,246,0.5);
            font-weight: 600;
            box-shadow: 0 0 12px rgba(59,130,246,0.15);
        }
        .filter-tag:active {
            transform: scale(0.98);
        }
        .rarity-dot { width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; display: inline-block; }

        /* 收藏品选择器样式 - 深色毛玻璃风格 */
        .collection-list {
            max-height: 180px;
            overflow-y: auto;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            background: rgba(0,0,0,0.2);
            -webkit-overflow-scrolling: touch;
        }
        .collection-item {
            padding: 8px 10px;
            font-size: 12px;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            transition: transform 0.15s, opacity 0.15s;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .collection-item:last-child { border-bottom: none; }
        .collection-item:hover { background: rgba(255,255,255,0.05); }
        .collection-item.active {
            background: rgba(59,130,246,0.15);
            color: #60a5fa;
            font-weight: 600;
        }
        .collection-item .check-icon {
            width: 14px;
            height: 14px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            flex-shrink: 0;
            transition: transform 0.15s, opacity 0.15s;
        }
        .collection-item.active .check-icon {
            background: #3b82f6;
            border-color: #3b82f6;
            color: #fff;
        }
        .collection-item .item-text {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .selected-collections {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 8px;
        }
        .selected-tag {
            background: rgba(59,130,246,0.15);
            border: 1px solid rgba(59,130,246,0.4);
            color: #60a5fa;
            padding: 3px 6px;
            border-radius: 4px;
            font-size: 10px;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        .selected-tag .remove-btn {
            cursor: pointer;
            font-size: 12px;
            line-height: 1;
            opacity: 0.7;
        }
        .selected-tag .remove-btn:hover { opacity: 1; }
        .collection-count {
            font-size: 10px;
            color: rgba(255,255,255,0.4);
            margin-top: 6px;
        }
        
        .drawer-footer {
            padding: 10px 12px; 
            border-top: 1px solid rgba(255,255,255,0.06); 
            display: flex; align-items: center; gap: 8px; 
            background: rgba(12, 14, 20, 0.8);
            padding-bottom: calc(10px + var(--safe-bottom));
            position: sticky; bottom: 0; z-index: 10;
        }
        .btn { 
            flex: 1; 
            height: 36px; 
            border-radius: 6px; 
            font-size: 12px; 
            font-weight: 600; 
            cursor: pointer; 
            display: flex; align-items: center; justify-content: center; 
            transition: transform 0.15s, opacity 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .btn:active { opacity: 0.85; transform: scale(0.98); }
        .btn-reset { 
            border: 1px solid rgba(255,255,255,0.1); 
            color: rgba(255,255,255,0.7); 
            background: rgba(255,255,255,0.06); 
        }
        .btn-reset:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }
        .btn-apply { 
            background: linear-gradient(135deg, #3b82f6, #2563eb); 
            color: #ffffff; 
            border: none;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        .btn-apply:hover { background: linear-gradient(135deg, #60a5fa, #3b82f6); box-shadow: 0 2px 10px rgba(59,130,246,0.35); }

        /* ========================================= */
        /* --- 响应式适配 --- */
        /* ========================================= */
        
        /* 超小屏幕 (< 360px) */
        @media screen and (max-width: 359px) {
            .grid-container {
                grid-template-columns: repeat(3, 1fr);
                gap: 4px;
                padding: 6px;
            }
            .item-card { aspect-ratio: 0.75; }
            .card-footer { padding: 3px 4px; }
            .item-full-name { font-size: 9px; }
            .item-price { font-size: 10px; }
            .info-tag { font-size: 8px; transform: scale(0.85); }
            .header h1 { font-size: 14px; }
            .filter-trigger-btn { padding: 4px 8px; font-size: 12px; }
            .drawer-body { width: 85%; max-width: 320px; } /* 修复：不再全屏 */
            .slot { border-radius: 4px; }
            .contract-bar { padding: 8px; gap: 8px; }
            .tradeup-btn { padding: 10px; font-size: 14px; }
            /* 配方卡片小屏适配 */
            .recipe-card-img { min-width: 80px; }
            .recipe-card-content { padding: 4px 6px; gap: 3px; }
            .recipe-card-title { font-size: 11px; margin-bottom: 0; }
            .recipe-params { gap: 2px; }
            .param-item { padding: 2px 3px; font-size: 10px; }
            .lightning-rate-badge .badge-inner { padding: 2px 4px; }
            .param-label { font-size: 9px; }
            .param-value { font-size: 11px; }
            .recipe-card-footer { padding-top: 2px; }
            .stat-value { font-size: 12px; }
            .probability-bar { height: 8px; }
        }

        /* 小屏幕 (360px - 414px) */
        @media screen and (min-width: 360px) and (max-width: 414px) {
            .drawer-body { width: 90%; }
            .filter-section { padding: 12px; margin-bottom: 16px; }
            .filter-label { font-size: 13px; margin-bottom: 10px; }
            .tag-group { gap: 6px; }
            .filter-tag { padding: 6px 0; font-size: 11px; }
            /* 配方卡片小屏适配 */
            .recipe-card-img { min-width: 90px; }
            .recipe-card-content { padding: 5px 8px; gap: 3px; }
            .recipe-params { gap: 2px; }
            .lightning-rate-badge .badge-inner { padding: 2px 5px; }
            .param-value { font-size: 12px; }
        }

        /* 中等屏幕 (415px - 767px) */
        @media screen and (min-width: 415px) and (max-width: 767px) {
            .drawer-body { width: 80%; }
            .grid-container {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* 平板及以上 (>= 768px) */
        @media screen and (min-width: 768px) {
            .grid-container {
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
                padding: 12px;
            }
            .drawer-body { width: 400px; max-width: 50%; }
            .contract-bar { padding: 16px; }
            .slot { border-radius: 8px; }
        }

        /* 横屏模式优化 */
        @media screen and (orientation: landscape) and (max-height: 500px) {
            .drawer-body {
                width: 60%;
            }
            .drawer-content {
                padding: 12px;
            }
            .filter-section {
                margin-bottom: 12px;
                padding: 10px;
            }
            .drawer-footer {
                padding: 8px 12px;
            }
            .contract-bar {
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                padding: 8px 12px;
                gap: 8px;
            }
            .contract-header { flex: 1; min-width: 200px; }
            .slots-container { flex: 2; min-width: 200px; }
            .tradeup-btn { flex: 0 0 auto; width: auto; padding: 10px 24px; }
        }

        /* 触摸优化 */
        @media (hover: none) and (pointer: coarse) {
            .filter-tag, .btn, .clear-btn, .filter-trigger-btn, .close-icon {
                min-height: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .close-icon {
                width: 44px;
                height: 44px;
                font-size: 24px;
            }
            .item-card:active {
                transform: scale(0.95);
            }
        }

        /* 暗色模式支持 (可选) */
        @media (prefers-color-scheme: dark) {
            /* 如需暗色模式，在此添加 */
        }

        /* =========================================
        /* --- 底部分享选项弹窗 ---
        /* ========================================= */
        .share-sheet-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }
        .share-sheet-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .share-sheet {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border-radius: 16px 16px 0 0;
            padding: 12px 16px calc(16px + var(--safe-bottom));
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        }
        .share-sheet-overlay.active .share-sheet {
            transform: translateY(0);
        }
        .share-sheet-title {
            text-align: center;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-sub);
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .share-sheet-option {
            padding: 14px 16px;
            font-size: 15px;
            font-weight: 600;
            color: var(--text-main);
            text-align: center;
            cursor: pointer;
            border-radius: 10px;
            margin-bottom: 8px;
            background: rgba(255,255,255,0.05);
            transition: background 0.15s;
        }
        .share-sheet-option:hover {
            background: rgba(255,255,255,0.1);
        }
        .share-sheet-option.tournament {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
            color: #f59e0b;
        }
        .share-sheet-option.tournament:hover {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.25));
        }
        .share-sheet-cancel {
            padding: 14px 16px;
            font-size: 15px;
            font-weight: 600;
            color: var(--text-sub);
            text-align: center;
            cursor: pointer;
            border-radius: 10px;
            margin-top: 4px;
        }

        /* =========================================
        /* --- 底部一级导航 (药丸扩展式) ---
        /* ========================================= */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            background: rgba(20, 22, 30, 0.97);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            border-left: none;
            border-right: none;
            border-bottom: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            z-index: 200;
            box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.3);
            padding: 4px 0;
            padding-bottom: calc(4px + var(--safe-bottom));
            height: auto;
            box-sizing: border-box;
            border-radius: 0;
        }
        .nav-item {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            padding: 8px 12px;
            cursor: pointer;
            transition: 
                transform 0.15s ease-out,
                color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease,
                padding 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            
            color: var(--text-sub);
            position: relative;
            border-radius: 12px;
            flex: 0 1 auto;
        }
        .nav-item.active {
            color: var(--accent-cyan);
            background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(6, 182, 212, 0.12));
            box-shadow: 
                0 2px 12px rgba(34, 211, 238, 0.25),
                inset 0 1px 2px rgba(255, 255, 255, 0.05);
            padding: 8px 16px;
        }
        .nav-item.active::before {
            display: none;
        }
        .nav-item:active {
            transform: scale(0.92);
            transition: transform 0.08s ease-out;
        }
        .nav-icon {
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .nav-icon svg {
            width: 22px;
            height: 22px;
            fill: currentColor;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        .nav-item.active .nav-icon svg {
            width: 24px;
            height: 24px;
            filter: drop-shadow(0 1px 3px rgba(99, 102, 241, 0.3));
        }
        .nav-label {
            font-size: 12px;
            font-weight: 700;
            font-family: 'Nunito', sans-serif;
            max-width: 0;
            overflow: hidden;
            opacity: 0;
            margin-left: 0;
            white-space: nowrap;
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .nav-item.active .nav-label {
            max-width: 80px;
            opacity: 1;
            margin-left: 8px;
        }

        /* 页面容器 - 局部滚动方案 */
        .page-container {
            display: none;
            flex-direction: column;
            height: 100vh;
            height: 100dvh;  /* 动态视口高度，更好支持移动端 */
            overflow: hidden;
            position: relative;
        }
        .page-container.active {
            display: flex;
        }
        
        /* 页面滚动区域 */
        .page-scroll-area {
            flex: 1;
            min-height: 0;  /* 重要：flex子元素滚动必需 */
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            padding-bottom: calc(60px + var(--safe-bottom));  /* 底部导航预留空间 */
        }
        /* 个人中心页面 - 局部滚动 */
        #page-profile {
            overflow: hidden;
        }
        #page-profile .page-scroll-area {
            padding-bottom: calc(60px + var(--safe-bottom));
        }
        /* 我的配方页面在空状态时固定 */
        #page-myrecipe.empty-locked {
            overflow: hidden;
            height: 100vh;
        }

        /* AI汰换页面样式 (Claymorphism) */
        .ai-page-header {
            background: rgba(15, 17, 23, 0.97);
            position: sticky;
            top: 0;
            z-index: 50;
            padding: 7px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 31px;
            box-sizing: border-box;
            box-shadow: 0 2px 16px rgba(0,0,0,0.3);
        }
        .ai-page-header h1 {
            margin: 0;
            font-size: 17px;
            font-weight: 800;
            color: var(--accent-primary);
        }
        .generate-btn {
            background: linear-gradient(135deg, var(--accent-green), #34D399);
            color: #fff;
            border: none;
            padding: 10px 18px;
            border-radius: 14px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: var(--clay-shadow-sm);
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .generate-btn svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }
        .generate-btn:active {
            transform: scale(0.95);
            box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.5);
        }
        .generate-btn-light {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-main);
            border: 1px solid rgba(255, 255, 255, 0.12);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
            flex-shrink: 0;
            box-shadow: var(--clay-shadow-sm);
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .generate-btn-light:active {
            transform: scale(0.95);
            background: var(--selected-bg);
        }
        /* AI紧凑按钮 - 毛玻璃胶囊样式 */
        .ai-btn-compact {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-main);
            border: 1px solid rgba(255, 255, 255, 0.12);
            padding: 5px 10px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
            flex-shrink: 0;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        .ai-btn-compact:active {
            transform: scale(0.96);
            background: rgba(255, 255, 255, 0.85);
            box-shadow: 0 1px 4px rgba(99, 102, 241, 0.15);
        }
        .ai-btn-compact .ai-icon {
            font-size: 9px;
            font-weight: 800;
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .filter-trigger-btn svg {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }

        /* 配方卡片列表 */
        .recipe-list {
            padding: 12px;
            padding-bottom: calc(80px + var(--safe-bottom));
        }
        /* === 配方卡片 (Dark Premium) === */
        .recipe-card {
            background: var(--card-bg);
            border-radius: 20px;
            overflow: hidden;
            margin-bottom: 6px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            display: flex;
            border: 1px solid rgba(255,255,255,0.06);
            position: relative;
            cursor: pointer;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .recipe-card:hover {
            transform: translateY(-4px) scale(1.01);
            box-shadow: 0 4px 16px rgba(0,0,0,0.4);
        }
        .recipe-card:active:not(.show-actions) {
            transform: scale(0.98);
            box-shadow: var(--clay-shadow-sm);
        }
        /* 大师赛配方卡片特殊样式 - 淡金色调 */
        .recipe-card.tournament {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.08));
            border: 1px solid rgba(245, 158, 11, 0.25);
        }
        .recipe-card.tournament:hover {
            border-color: rgba(245, 158, 11, 0.5);
            box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
        }
        .recipe-card-tournament-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 38px;
            height: 38px;
            z-index: 10;
            transform: rotate(15deg);
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
        }
        .recipe-card-tournament-badge svg {
            width: 100%;
            height: 100%;
        }
        /* 入围印章样式 */
        .finalist-stamp {
            position: absolute;
            top: 50%;
            right: 8px;
            transform: translateY(-50%) rotate(-15deg);
            color: rgba(245, 158, 11, 0.35);
            border: 3px solid rgba(245, 158, 11, 0.35);
            padding: 6px 14px;
            font-size: 11px;
            font-weight: 700;
            text-align: center;
            line-height: 1.3;
            pointer-events: none;
            z-index: 1;
            background: transparent;
            border-radius: 4px;
            white-space: nowrap;
        }
        .recipe-card-img {
            width: 30%;
            min-width: 90px;
            max-width: 120px;
            /* 暗色渐变金色调 */
            background: linear-gradient(145deg, #2A2520 0%, #3D3425 50%, #4A3A1E 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            border-radius: 16px 0 0 16px;
        }
        .recipe-card-img::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40'%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-size='12' font-weight='bold' fill='%23FBBF24' opacity='0.08' transform='rotate(-15 40 20)'%3ECS汰换魔方%3C/text%3E%3C/svg%3E");
            background-repeat: repeat;
            pointer-events: none;
            z-index: 1;
        }
        .recipe-card-img img {
            width: 90%;
            height: auto;
            object-fit: contain;
            filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
        }
        .recipe-card-img .price-tag {
            position: absolute;
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.7);
            color: #fbbf24;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 10px;
            white-space: nowrap;
        }
        .recipe-card-img .invest-tag {
            position: absolute;
            bottom: 0;
            right: 0;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            white-space: nowrap;
            z-index: 2;
            line-height: 15px;
            padding: 2px 6px 2px 6px;
            border-left: 2px solid #FBBF24;
            text-shadow: 0 1px 3px rgba(0,0,0,0.9);
        }
        .recipe-card-img .img-tags {
            position: absolute;
            top: 6px;
            left: 6px;
            display: flex;
            flex-direction: row;
            gap: 3px;
            z-index: 2;
        }
        .recipe-card-img .img-tag {
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 10px;
            font-weight: 700;
            white-space: nowrap;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
        }
        .recipe-card-img .img-tag.blue {
            background: linear-gradient(135deg, #10B981, #34D399);
            color: #fff;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }
        .recipe-card-img .img-tag.light-blue {
            background: rgba(59, 130, 246, 0.15);
            color: #60A5FA;
            border-color: rgba(59, 130, 246, 0.3);
        }
        .recipe-card-img .img-tag.light-red {
            background: rgba(239, 68, 68, 0.15);
            color: #F87171;
            border-color: rgba(239, 68, 68, 0.3);
        }
        .recipe-card-content {
            flex: 1;
            padding: 6px 10px;
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            gap: 4px;
            align-items: flex-start;
            background: linear-gradient(180deg, #1A1D28 0%, #161922 100%);
            position: relative;
            min-width: 0;
            overflow: visible;
        }
        .recipe-card-title {
            font-size: 12px;
            font-weight: 800;
            color: var(--text-main);
            margin-bottom: 0;
            display: flex;
            align-items: center;
            gap: 8px;
            justify-content: flex-start;
        }
        .recipe-card-title .mode-tag {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 8px;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            color: #fff;
            font-weight: 700;
            box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
        }
        .recipe-params {
            display: flex;
            flex-wrap: nowrap;
            gap: 3px;
            justify-content: flex-start;
        }
        .param-item {
            font-size: 11px;
            display: flex;
            align-items: center;
            gap: 3px;
            white-space: nowrap;
            background: var(--input-bg);
            padding: 3px 5px;
            border-radius: 8px;
        }
        .param-label {
            font-family: 'Nunito', sans-serif;
            font-size: 9px;
            font-weight: 600;
            color: var(--text-sub);
        }
        .param-value {
            font-family: 'JetBrains Mono', monospace;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-main);
            letter-spacing: -0.3px;
        }
        .param-value.green {
            color: #34D399;
            background: rgba(16, 185, 129, 0.15);
            padding: 1px 6px;
            border-radius: 6px;
        }
        .param-value.gold {
            color: #FBBF24;
            background: rgba(251, 191, 36, 0.15);
            padding: 1px 6px;
            border-radius: 6px;
        }
        .param-value.red {
            color: #F87171;
            background: rgba(239, 68, 68, 0.15);
            padding: 1px 6px;
            border-radius: 6px;
        }
        /* 平行四边形收益标签 */
        .lightning-rate-badge {
            display: inline-flex;
            align-items: center;
            transform: skewX(-8deg);
            border-radius: 3px;
            line-height: 1;
        }
        .lightning-rate-badge .badge-inner {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            transform: skewX(8deg);
            padding: 3px 6px;
            font-family: 'JetBrains Mono', monospace;
            font-size: clamp(7.5px, 2.4vw, 10px);
            font-weight: 700;
            letter-spacing: -0.3px;
            white-space: nowrap;
        }
        .lightning-rate-badge.positive {
            background: rgba(16, 185, 129, 0.18);
            border: 1px solid rgba(16, 185, 129, 0.35);
            color: #34D399;
        }
        .lightning-rate-badge.negative {
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid rgba(239, 68, 68, 0.32);
            color: #F87171;
        }
        .lightning-rate-badge.neutral {
            background: rgba(255, 255, 255, 0.07);
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: var(--text-sub);
        }
        .recipe-card-footer {
            margin-top: 0;
            padding-top: 3px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        /* 概率分布条样式 (Dark) */
        .probability-bar {
            width: 100%;
            height: 10px;
            border-radius: 10px;
            background: rgba(255,255,255,0.06);
            overflow: hidden;
            display: flex;
            margin-top: 0;
            position: relative;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
        }
        .probability-bar .bar-segment {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'JetBrains Mono', monospace;
            font-size: 9px;
            font-weight: 700;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        .probability-bar .breakeven-segment {
            background: linear-gradient(90deg, #10B981, #34D399, #6EE7B7);
        }
        .probability-bar .loss-segment {
            background: linear-gradient(90deg, #EF4444, #F87171, #FCA5A5);
        }
        .recipe-stats {
            display: flex;
            gap: 12px;
        }
        .stat-item {
            text-align: center;
        }
        .stat-value {
            font-family: 'JetBrains Mono', monospace;
            font-size: 14px;
            font-weight: 700;
            color: var(--accent-green);
            letter-spacing: -0.3px;
        }
        .stat-label {
            font-size: 9px;
            color: var(--text-sub);
        }
        /* 卡片操作按钮容器 - 仅覆盖内容区域 */
        .recipe-card-actions {
            position: absolute;
            top: 0;
            left: 30%;
            right: 0;
            bottom: 0;
            background: rgba(15, 17, 23, 0.88);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
            border-radius: 0 12px 12px 0;
            z-index: 10;
        }
        .recipe-card.show-actions .recipe-card-actions {
            opacity: 1;
            pointer-events: auto;
        }
        .recipe-action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            background: rgba(15, 17, 23, 0.95);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            cursor: pointer;
            transition: transform 0.2s ease, opacity 0.2s ease;
            box-shadow: 0 2px 12px rgba(0,0,0,0.4);
            color: var(--text-main);
            font-size: 13px;
            font-weight: 500;
        }
        .recipe-action-btn:active {
            transform: scale(0.92);
            background: rgba(20, 22, 28, 0.9);
        }
        .recipe-action-btn svg {
            display: none;
        }
        .recipe-action-btn .action-text {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-sub);
        }
        .recipe-action-btn.save-btn {
            background: rgba(15, 17, 23, 0.95);
        }
        .recipe-action-btn.save-btn svg { display: none; }
        .recipe-action-btn.save-btn .action-text { color: var(--text-main); }
        .recipe-action-btn.view-btn {
            background: rgba(15, 17, 23, 0.95);
        }
        .recipe-action-btn.view-btn svg { display: none; }
        .recipe-action-btn.view-btn .action-text { color: var(--text-main); }
        .recipe-action-btn.share-btn {
            background: rgba(15, 17, 23, 0.95);
        }
        .recipe-action-btn.share-btn svg { display: none; }
        .recipe-action-btn.share-btn .action-text { color: var(--text-main); }
        .recipe-action-btn.delete-btn {
            background: rgba(15, 17, 23, 0.95);
        }
        .recipe-action-btn.delete-btn svg { display: none; }
        .recipe-action-btn.delete-btn .action-text { color: rgba(239, 68, 68, 0.9); }
        .share-text-link {
            font-size: 13px;
            color: var(--accent-blue);
            cursor: pointer;
            padding: 8px 12px;
            font-weight: 500;
        }
        .share-text-link:active {
            opacity: 0.7;
        }

        /* ========================================= */
        /* --- 个人中心页面样式 (极简风格) --- */
        /* ========================================= */
        .profile-header {
            background: rgba(15, 17, 23, 0.95);
            padding: 32px 20px 28px;
            display: flex;
            align-items: center;
            gap: 16px;
            position: relative;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .profile-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.05);
            pointer-events: none;
        }
        .profile-header > * {
            position: relative;
            z-index: 1;
        }
        .profile-avatar {
            width: 68px;
            height: 68px;
            border-radius: 50%;
            background: #fff;
            overflow: hidden;
            border: 3px solid rgba(255,255,255,0.95);
        }
        .profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .profile-info {
            flex: 1;
        }
        .profile-nickname {
            font-size: 20px;
            font-weight: 700;
            color: #fff;
            margin-bottom: 4px;
            letter-spacing: 0.3px;
        }
        .login-prompt {
            margin-top: 8px;
        }
        .auth-login-btn {
            display: inline-flex;
            align-items: center;
            background: rgba(129, 140, 248, 0.2);
            border: 1.5px solid rgba(129, 140, 248, 0.5);
            color: #fff;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
        }
        .auth-login-btn:active {
            background: rgba(129, 140, 248, 0.35);
            transform: scale(0.97);
        }
        /* 签到按钮 */
        .checkin-btn {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 3px;
            padding: 4px 10px;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
            border: 1px solid rgba(16, 185, 129, 0.5);
            border-radius: 12px;
            color: #10b981;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
            white-space: nowrap;
            line-height: 1;
        }
        .checkin-btn:active {
            transform: scale(0.95);
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3));
        }
        .checkin-btn.checked {
            background: rgba(100, 116, 139, 0.15);
            border-color: rgba(100, 116, 139, 0.3);
            color: rgba(148, 163, 184, 0.8);
            cursor: default;
        }
        .checkin-btn.checked:active {
            transform: none;
        }
        .checkin-icon {
            width: 12px;
            height: 12px;
        }
        .checkin-text {
            font-size: 12px;
            line-height: 1;
        }
        /* 极简登录按钮 */
        .clay-login-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--accent-green);
            border: none;
            color: #fff;
            padding: 12px 28px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
        }
        .clay-login-btn:active {
            transform: scale(0.97);
            opacity: 0.9;
        }
        .profile-id {
            font-size: 12px;
            color: rgba(255,255,255,0.85);
            font-weight: 500;
        }
        .profile-menu {
            padding: 12px 16px;
            background: var(--bg-color);
        }
        .menu-section {
            background: transparent;
            margin-bottom: 0;
            border: none;
            padding: 0;
        }
        .menu-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }
        .menu-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 8px 6px;
            background: rgba(26, 29, 40, 0.92);
            border: 1px solid rgba(255,255,255,0.08);
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
            border-radius: 10px;
            position: relative;
        }
        .menu-item:active {
            background: rgba(255,255,255,0.08);
            transform: scale(0.95);
        }
        .menu-icon {
            width: 34px;
            height: 34px;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.08);
            border-radius: 8px;
            color: rgba(255,255,255,0.7);
            transition: transform 0.2s, opacity 0.2s;
        }
        .menu-item:active .menu-icon {
            background: rgba(255,255,255,0.12);
        }
        .menu-icon svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
        .menu-text {
            font-size: 11px;
            font-weight: 500;
            color: rgba(255,255,255,0.85);
            text-align: center;
            line-height: 1.2;
        }
        .menu-arrow {
            display: none;
        }
        .menu-badge {
            position: absolute;
            top: 10px;
            right: 28px;
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
            box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
        }
        /* 分享列表样式 */
        .share-invite-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #f3f4f6;
            gap: 12px;
        }
        .share-invite-item:last-child {
            border-bottom: none;
        }
        .share-invite-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            background: #f3f4f6;
        }
        .share-invite-info {
            flex: 1;
        }
        .share-invite-name {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-main);
        }
        .share-invite-time {
            font-size: 12px;
            color: var(--text-sub);
            margin-top: 2px;
        }
        .profile-footer {
            text-align: center;
            padding: 24px 20px;
        }
        .version-info {
            font-size: 12px;
            color: #9ca3af;
        }

        /* 信息弹窗通用样式 (Claymorphism) */
        .info-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.3);
            z-index: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .info-modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .info-modal {
            background: rgba(26, 29, 40, 0.95);
            border: 1px solid rgba(255,255,255,0.1);
            width: 90%;
            max-width: 360px;
            border-radius: 20px;
            overflow: hidden;
            transform: scale(0.9) translateY(20px);
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 4px 16px rgba(0,0,0,0.4);
        }
        .info-modal-overlay.active .info-modal {
            transform: scale(1) translateY(0);
        }
        .info-modal-header {
            padding: 18px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 17px;
            font-weight: 800;
            color: rgba(255,255,255,0.95);
            background: rgba(30, 35, 50, 0.6);
        }
        .info-close-btn {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.15);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            font-size: 14px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            transition: transform 0.25s, opacity 0.25s;
        }
        .info-close-btn:active {
            transform: scale(0.9);
            background: rgba(255,255,255,0.1);
        }
        .info-modal-body {
            padding: 20px;
            max-height: 60vh;
            overflow-y: auto;
        }

        /* 帮助页样式 (Claymorphism) */
        .help-section {
            margin-bottom: 16px;
            padding: 14px;
            background: #fff;
            border-radius: 14px;
            border-left: 4px solid var(--accent-primary);
            box-shadow: var(--clay-shadow-sm);
        }
        .help-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 6px;
        }
        .help-content {
            font-size: 13px;
            color: var(--text-sub);
            line-height: 1.6;
        }

        /* 有问必答全屏页面样式 */
        .qa-page-header {
            background: rgba(15, 17, 23, 0.97);
            position: sticky;
            top: 0;
            z-index: 50;
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 44px;
            box-sizing: border-box;
            box-shadow: 0 2px 16px rgba(0,0,0,0.3);
        }
        .qa-page-header .qa-back-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            background: none;
            border: none;
            color: rgba(255,255,255,0.9);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            padding: 6px 10px;
            margin-left: -10px;
        }
        .qa-page-header .qa-back-btn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
        .qa-page-header h1 {
            margin: 0;
            font-size: 17px;
            font-weight: 800;
            color: rgba(255,255,255,0.95);
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }
        .qa-page-content {
            padding-bottom: calc(80px + var(--safe-bottom));
            min-height: calc(100vh - 44px);
            background: linear-gradient(180deg, #0a0b0f 0%, #12141a 100%);
        }
        .qa-search-box {
            padding: 12px 16px;
            background: rgba(20, 24, 35, 0.5);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .qa-search-box input {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 24px;
            font-size: 14px;
            background: rgba(26, 29, 40, 0.92);
            color: rgba(255,255,255,0.9);
            box-sizing: border-box;
            outline: none;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        .qa-search-box input::placeholder {
            color: rgba(255,255,255,0.4);
        }
        .qa-search-box input:focus { 
            border-color: rgba(96, 165, 250, 0.6);
            background: rgba(30, 35, 50, 0.9);
        }
        .qa-list {
            padding: 16px;
        }
        .qa-loading, .qa-empty {
            text-align: center;
            color: rgba(255,255,255,0.5);
            padding: 40px 20px;
            font-size: 14px;
        }
        .qa-item {
            background: rgba(26, 29, 40, 0.92);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 10px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.3);
        }
        .qa-item-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }
        .qa-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            object-fit: cover;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.15);
        }
        .qa-user-info {
            flex: 1;
            min-width: 0;
        }
        .qa-nickname {
            font-size: 13px;
            font-weight: 600;
            color: rgba(255,255,255,0.9);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .qa-time {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
        }
        .qa-title {
            font-size: 14px;
            font-weight: 600;
            color: rgba(255,255,255,0.95);
            margin-bottom: 6px;
            line-height: 1.4;
        }
        .qa-content {
            font-size: 13px;
            color: rgba(255,255,255,0.7);
            line-height: 1.5;
            margin-bottom: 8px;
            word-break: break-all;
        }
        .qa-reply-box {
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid rgba(16, 185, 129, 0.3);
            border-radius: 8px;
            padding: 10px;
            margin-top: 8px;
        }
        .qa-reply-label {
            font-size: 11px;
            color: rgba(52, 211, 153, 0.9);
            font-weight: 600;
            margin-bottom: 4px;
        }
        .qa-reply-content {
            font-size: 13px;
            color: rgba(167, 243, 208, 0.95);
            line-height: 1.5;
            word-break: break-all;
        }
        .qa-reply-time {
            font-size: 11px;
            color: rgba(52, 211, 153, 0.7);
            margin-top: 6px;
        }
        .qa-no-reply {
            font-size: 12px;
            color: rgba(251, 191, 36, 0.9);
            padding: 8px 0;
        }
        .qa-admin-btn {
            font-size: 12px;
            color: rgba(96, 165, 250, 0.9);
            background: rgba(96, 165, 250, 0.1);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 6px;
            padding: 4px 10px;
            cursor: pointer;
            margin-top: 6px;
        }
        .qa-footer {
            padding: 12px 14px;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(20, 24, 35, 0.95);
        }
        .qa-ask-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(59, 130, 246, 0.9));
            color: #fff;
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
        }
        .qa-load-more {
            text-align: center;
            padding: 12px;
            color: var(--accent-primary);
            font-size: 13px;
            cursor: pointer;
        }

        /* 消息通知页面样式 */
        .notification-page-header {
            background: rgba(15, 17, 23, 0.97);
            position: sticky;
            top: 0;
            z-index: 50;
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 44px;
            box-sizing: border-box;
            box-shadow: 0 2px 16px rgba(0,0,0,0.3);
        }
        .notification-page-header h1 {
            margin: 0;
            font-size: 17px;
            font-weight: 800;
            color: rgba(255,255,255,0.95);
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }
        .notification-back-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            background: none;
            border: none;
            color: rgba(255,255,255,0.9);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            padding: 6px 10px;
            margin-left: -10px;
        }
        .notification-back-btn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
        .notification-read-all-btn {
            background: rgba(15, 17, 23, 0.95);
            border: 1px solid rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.9);
            font-size: 12px;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 16px;
            cursor: pointer;
            line-height: 1;
        }
        .notification-page-content {
            padding-bottom: calc(80px + var(--safe-bottom));
            min-height: calc(100vh - 44px);
            background: linear-gradient(180deg, #0a0b0f 0%, #12141a 100%);
        }
        .notification-list {
            padding: 0;
        }
        .notification-item {
            display: flex;
            gap: 12px;
            padding: 16px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            cursor: pointer;
            transition: background 0.15s;
        }
        .notification-item:active {
            background: rgba(255,255,255,0.05);
        }
        .notification-item.unread {
            background: rgba(96, 165, 250, 0.08);
            border-left: 3px solid rgba(96, 165, 250, 0.8);
        }
        .notification-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            flex-shrink: 0;
            border: 2px solid rgba(255,255,255,0.1);
            object-fit: cover;
        }
        .notification-body {
            flex: 1;
            min-width: 0;
        }
        .notification-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
        }
        .notification-nickname {
            font-size: 14px;
            font-weight: 600;
            color: rgba(96, 165, 250, 0.95);
        }
        .notification-action {
            font-size: 13px;
            color: rgba(255,255,255,0.7);
        }
        .notification-recipe-title {
            font-size: 13px;
            color: rgba(255,255,255,0.9);
            font-weight: 500;
            margin-bottom: 6px;
            padding: 6px 10px;
            background: rgba(255,255,255,0.05);
            border-radius: 6px;
            border-left: 2px solid rgba(16, 185, 129, 0.7);
        }
        .notification-content-preview {
            font-size: 13px;
            color: rgba(255,255,255,0.6);
            line-height: 1.5;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            margin-bottom: 8px;
        }
        .notification-time {
            font-size: 11px;
            color: rgba(255,255,255,0.4);
        }
        .notification-empty {
            text-align: center;
            padding: 60px 20px;
            color: rgba(255,255,255,0.5);
            font-size: 14px;
        }
        .notification-loading {
            text-align: center;
            padding: 40px 20px;
            color: rgba(255,255,255,0.5);
            font-size: 14px;
        }
        .notification-footer {
            padding: 16px;
            text-align: center;
        }
        .notification-loadmore-btn {
            width: 100%;
            padding: 12px;
            background: rgba(26, 29, 40, 0.92);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            color: rgba(255,255,255,0.8);
            font-size: 14px;
            cursor: pointer;
        }

        /* 关于我们样式 */
        .about-logo {
            font-size: 60px;
            text-align: center;
            margin-bottom: 12px;
        }
        .about-name {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-main);
            text-align: center;
            margin-bottom: 12px;
        }
        .about-desc {
            font-size: 14px;
            color: var(--text-sub);
            text-align: center;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        .about-links {
            display: flex;
            justify-content: center;
            gap: 20px;
        }
        .about-link {
            font-size: 13px;
            color: var(--accent-blue);
            text-decoration: none;
        }

        .recipe-price-range {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .range-label {
            font-size: 11px;
            color: var(--text-sub);
            font-weight: 500;
        }
        .range-value {
            font-size: 13px;
            font-weight: 700;
            color: #d97706;
        }

        /* AI参数设置抽屉 - 深色毛玻璃高保真风格 */
        .ai-drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 250;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }
        .ai-drawer-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        /* ========== AI汰换首页样式 ========== */
        .ai-home-page {
            padding: 20px 16px;
        }
        .ai-home-title {
            font-size: 18px;
            font-weight: 700;
            color: #fff;
            margin-bottom: 20px;
            text-align: center;
        }
        .ai-entry-cards {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .ai-entry-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 18px 16px;
            background: linear-gradient(135deg, rgba(30, 35, 50, 0.9), rgba(25, 30, 45, 0.95));
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            cursor: pointer;
            transition: transform 0.2s ease, opacity 0.2s ease;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        }
        .ai-entry-card:active {
            transform: scale(0.98);
            background: linear-gradient(135deg, rgba(40, 45, 60, 0.95), rgba(35, 40, 55, 0.98));
        }
        .ai-entry-icon {
            width: 48px;
            height: 48px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(59, 130, 246, 0.15));
            border-radius: 12px;
            color: #60a5fa;
        }
        .ai-entry-icon svg {
            width: 26px;
            height: 26px;
        }
        .ai-entry-content {
            flex: 1;
            min-width: 0;
        }
        .ai-entry-title {
            font-size: 15px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 4px;
        }
        .ai-entry-desc {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
            line-height: 1.4;
        }
        .ai-entry-arrow {
            flex-shrink: 0;
            color: rgba(255, 255, 255, 0.3);
        }
        .ai-home-tip {
            margin-top: 24px;
            text-align: center;
            font-size: 12px;
            color: var(--text-sub);
        }
        .ai-result-page {
            padding: 0;
        }
        /* AI返回按钮 */
        .ai-back-home-btn {
            display: flex;
            align-items: center;
            gap: 3px;
            padding: 4px 10px;
            background: rgba(100, 116, 139, 0.2);
            line-height: 1;
            border: 1px solid rgba(100, 116, 139, 0.3);
            border-radius: 16px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
        }
        .ai-back-home-btn:active {
            transform: scale(0.95);
            background: rgba(100, 116, 139, 0.3);
        }

        .ai-drawer {
            position: fixed;
            top: 0;
            right: 0;
            width: 280px;
            max-width: 85%;
            height: 100%;
            background: rgba(18, 20, 28, 0.98);
            z-index: 251;
            transform: translateX(100%);
            transition: transform 0.25s ease;
            display: flex;
            flex-direction: column;
            box-shadow: -2px 0 12px rgba(0,0,0,0.3);
        }
        .ai-drawer.active {
            transform: translateX(0);
        }
        .ai-drawer-header {
            height: 44px;
            padding: 0 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            background: rgba(12, 14, 20, 0.8);
        }
        .ai-drawer-title {
            font-size: 14px;
            font-weight: 600;
            color: rgba(255,255,255,0.92);
            letter-spacing: 0.3px;
        }
        .ai-drawer-content {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }
        /* AI参数区域 - 深色毛玻璃卡片 */
        .ai-param-section {
            background: rgba(255,255,255,0.03);
            padding: 10px 12px;
            border-radius: 8px;
            margin-bottom: 8px;
            border: 1px solid rgba(255,255,255,0.06);
            transition: border-color 0.15s, background 0.15s;
        }
        .ai-param-section:hover {
            border-color: rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.04);
        }
        .ai-param-label {
            font-size: 12px;
            font-weight: 600;
            color: rgba(255,255,255,0.88);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .ai-param-desc {
            font-size: 10px;
            color: rgba(255,255,255,0.4);
            font-weight: 400;
        }
        .ai-input {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.92);
            padding: 8px 10px;
            border-radius: 6px;
            font-size: 12px;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
        }
        .ai-input:focus {
            border-color: rgba(59,130,246,0.6);
            box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
            background: rgba(0,0,0,0.4);
        }
        .ai-input::placeholder {
            color: rgba(255,255,255,0.3);
        }
        .skin-search-wrapper {
            position: relative;
        }
        .skin-search-results {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            max-height: 200px;
            overflow-y: auto;
            z-index: 100;
            margin-top: 4px;
        }
        .skin-search-results.active {
            display: block;
        }
        .skin-search-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            cursor: pointer;
            border-bottom: 1px solid var(--border-color);
        }
        .skin-search-item:last-child {
            border-bottom: none;
        }
        .skin-search-item:active {
            background: var(--selected-bg);
        }
        .skin-search-item img {
            width: 40px;
            height: 30px;
            object-fit: contain;
            background: #f0f0f0;
            border-radius: 4px;
        }
        .skin-search-item .skin-name {
            flex: 1;
            font-size: 13px;
            color: var(--text-main);
        }
        .skin-search-item .skin-rarity {
            font-size: 11px;
            color: var(--text-sub);
        }
        /* Header搜索框样式 */
        .header-search-wrapper {
            flex: 1;
            max-width: 200px;
            margin: 0 12px;
            position: relative;
        }
        .header-search-input {
            width: 100%;
            background: var(--input-bg);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            outline: none;
            box-sizing: border-box;
        }
        .header-search-input:focus {
            border-color: var(--accent-green);
        }
        .header-search-results {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            max-height: 300px;
            overflow-y: auto;
            z-index: 200;
            margin-top: 4px;
        }
        .header-search-results.active {
            display: block;
        }
        .header-search-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            cursor: pointer;
            border-bottom: 1px solid var(--border-color);
        }
        .header-search-item:last-child {
            border-bottom: none;
        }
        .header-search-item:active {
            background: var(--selected-bg);
        }
        .header-search-item img {
            width: 36px;
            height: 27px;
            object-fit: contain;
            background: #f0f0f0;
            border-radius: 4px;
        }
        .header-search-item .item-info {
            flex: 1;
            min-width: 0;
        }
        .header-search-item .item-name {
            font-size: 12px;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .header-search-item .item-meta {
            font-size: 10px;
            color: var(--text-sub);
        }
        /* 已选饮品详情卡片 */
        .selected-skin-info {
            margin-top: 10px;
        }
        .selected-skin-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: var(--card-bg);
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        .selected-skin-card img {
            width: 60px;
            height: 45px;
            object-fit: contain;
            background: #fff;
            border-radius: 6px;
            padding: 4px;
        }
        .selected-skin-detail {
            flex: 1;
        }
        .selected-skin-name {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 4px;
        }
        .selected-skin-meta {
            display: flex;
            gap: 8px;
        }
        .exterior-tag {
            font-size: 11px;
            padding: 2px 8px;
            background: var(--accent-blue);
            color: #fff;
            border-radius: 4px;
        }
        .rarity-tag {
            font-size: 11px;
            padding: 2px 8px;
            background: var(--accent-green);
            color: #fff;
            border-radius: 4px;
        }
        .slider-container {
            padding: 2px 4px;
            touch-action: pan-x;
        }
        /* AI滑块 - 深色毛玻璃风格 */
        .ai-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(255,255,255,0.08);
            outline: none;
        }
        .ai-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, #60a5fa, #3b82f6);
            border: none;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(59,130,246,0.3);
            transition: transform 0.1s, box-shadow 0.1s;
        }
        .ai-slider::-webkit-slider-thumb:active {
            transform: scale(1.15);
            box-shadow: 0 2px 8px rgba(59,130,246,0.4);
        }
        /* Firefox 兼容 */
        .ai-slider::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, #60a5fa, #3b82f6);
            border: none;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(59,130,246,0.4);
        }
        .slider-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 4px;
            font-size: 10px;
            color: rgba(255,255,255,0.4);
        }
        .slider-labels span:first-child {
            color: #60a5fa;
            font-weight: 600;
            font-family: 'JetBrains Mono', monospace;
        }
        /* 单选按钮组 - 深色毛玻璃风格 */
        .radio-group {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
        }
        .radio-group.three-cols {
            grid-template-columns: repeat(3, 1fr);
        }
        .radio-item {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            padding: 8px 6px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.15s ease, opacity 0.15s ease;
            font-size: 11px;
            font-weight: 500;
            color: rgba(255,255,255,0.6);
        }
        .radio-item:hover {
            border-color: rgba(255,255,255,0.15);
            background: rgba(255,255,255,0.06);
        }
        .radio-item:active {
            transform: scale(0.98);
        }
        .radio-item.active {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.5);
            color: #60a5fa;
            font-weight: 600;
            box-shadow: 0 0 12px rgba(59,130,246,0.15);
        }
        /* 策略选择行 - 深色毛玻璃风格 */
        .mode-select-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            margin-top: 6px;
        }
        .mode-select-row.mode-select-2col {
            grid-template-columns: repeat(2, 1fr);
        }
        .mode-option {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            padding: 8px 4px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.15s ease, opacity 0.15s ease;
            color: rgba(255,255,255,0.6);
        }
        .mode-option:hover {
            border-color: rgba(255,255,255,0.15);
            background: rgba(255,255,255,0.06);
        }
        .mode-option:active {
            transform: scale(0.98);
        }
        .mode-option.selected {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.5);
            color: #60a5fa;
            box-shadow: 0 0 12px rgba(59,130,246,0.15);
        }
        .mode-option .mode-text {
            font-size: 11px;
            font-weight: 500;
            color: inherit;
        }
        .mode-option.selected .mode-text {
            font-weight: 600;
        }
        /* 下拉选择器 - 深色毛玻璃风格 */
        .select-wrapper {
            position: relative;
        }
        .ai-select {
            width: 100%;
            padding: 8px 10px;
            padding-right: 28px;
            font-size: 12px;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            background: rgba(0,0,0,0.3);
            color: rgba(255,255,255,0.92);
            appearance: none;
            -webkit-appearance: none;
            cursor: pointer;
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .ai-select:focus {
            border-color: rgba(59,130,246,0.6);
            box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
        }
        .ai-select option {
            background: #1a1c24;
            color: rgba(255,255,255,0.92);
        }
        .select-wrapper::after {
            content: '';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 5px solid rgba(255,255,255,0.5);
            pointer-events: none;
        }
        /* 抽屉底部 - 深色毛玻璃风格 */
        .ai-drawer-footer {
            padding: 10px 12px;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            gap: 8px;
            background: rgba(12, 14, 20, 0.8);
            padding-bottom: calc(10px + var(--safe-bottom));
        }
        .ai-btn {
            flex: 1;
            height: 36px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            border: none;
            transition: transform 0.15s ease, opacity 0.15s ease;
        }
        .ai-btn svg {
            flex-shrink: 0;
            width: 14px;
            height: 14px;
        }
        .ai-btn-reset {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.7);
        }
        .ai-btn-reset:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.15);
        }
        .ai-btn-reset:active {
            transform: scale(0.98);
        }
        .ai-btn-submit {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: #fff;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        .ai-btn-submit:hover {
            background: linear-gradient(135deg, #60a5fa, #3b82f6);
            box-shadow: 0 2px 10px rgba(59,130,246,0.35);
        }
        .ai-btn-submit:active {
            transform: scale(0.98);
        }
        .ai-btn:active {
            transform: scale(0.98);
        }

        /* AI搜索状态样式 */
        .ai-search-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 8px 0;
            color: rgba(255, 255, 255, 0.85);
            font-size: 13px;
            font-weight: 500;
        }
        .ai-search-spinner {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-top-color: #60a5fa;
            border-radius: 50%;
            animation: ai-spin 0.8s linear infinite;
        }
        @keyframes ai-spin {
            to { transform: rotate(360deg); }
        }
        .ai-search-btns {
            display: flex;
            gap: 8px;
            width: 100%;
        }
        /* 按钮禁用状态 */
        .ai-btn:disabled {
            opacity: 0.5;
            pointer-events: none;
            cursor: not-allowed;
        }
        /* 抽屉内控件禁用状态 */
        .ai-drawer.searching .ai-drawer-content {
            pointer-events: none;
            opacity: 0.6;
        }

        /* 武器箱自选列表 */
        .case-list-container {
            max-height: 240px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 2px 0;
        }
        .case-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 6px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.05);
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
            user-select: none;
        }
        .case-item:active {
            background: rgba(255,255,255,0.08);
        }
        .case-item.selected {
            background: rgba(99,102,241,0.12);
            border-color: rgba(99,102,241,0.35);
        }
        .case-item.disabled {
            opacity: 0.4;
            pointer-events: none;
        }
        .case-item-checkbox {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            border: 1.5px solid rgba(255,255,255,0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.15s, border-color 0.15s;
        }
        .case-item.selected .case-item-checkbox {
            background: var(--accent-blue, #6366f1);
            border-color: var(--accent-blue, #6366f1);
        }
        .case-item-checkbox svg {
            width: 10px;
            height: 10px;
            opacity: 0;
            transition: opacity 0.15s;
        }
        .case-item.selected .case-item-checkbox svg {
            opacity: 1;
        }
        .case-item-info {
            flex: 1;
            min-width: 0;
        }
        .case-item-name {
            font-size: 12px;
            font-weight: 500;
            color: rgba(255,255,255,0.88);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .case-item-skins {
            font-size: 10px;
            color: rgba(255,255,255,0.4);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 2px;
        }
        .case-item-count {
            font-size: 10px;
            color: rgba(255,255,255,0.45);
            flex-shrink: 0;
            white-space: nowrap;
        }

        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-sub);
        }
        .empty-icon {
            font-size: 60px;
            margin-bottom: 16px;
        }
        .empty-text {
            font-size: 14px;
            margin-bottom: 20px;
        }
        .empty-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--accent-green);
            color: #fff;
            padding: 12px 24px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            border: none;
        }

        /* 加载状态 */
        .loading-spinner {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
        }
        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--border-color);
            border-top-color: var(--accent-green);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .loading-text {
            margin-top: 16px;
            font-size: 13px;
            color: var(--text-sub);
        }

        /* 防止侧边栏打开时页面滚动 */
        body.drawer-open {
            overflow: hidden;
            position: fixed;
            width: 100%;
            height: 100%;
        }

        /* ========================================= */
        /* --- 磨损选择弹窗 --- */
        /* ========================================= */
        .float-modal-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 300;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .float-modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .float-modal {
            background: rgba(26, 29, 40, 0.95);
            border-radius: 16px;
            width: 90%;
            max-width: 340px;
            overflow: hidden;
            transform: scale(0.9) translateY(20px);
            transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
            box-shadow: 0 8px 16px rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.08);
        }
        .float-modal-overlay.active .float-modal {
            transform: scale(1) translateY(0);
        }
        /* === 深色毛玻璃 float-modal-header === */
        .float-modal-header {
            padding: 20px;
            background: rgba(30, 35, 50, 0.6);
            border-bottom: 1px solid rgba(255,255,255,0.06);
            position: relative;
        }
        .float-modal-close {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-sub);
            font-size: 14px;
            cursor: pointer;
            border-radius: 50%;
            transition: transform 0.2s, opacity 0.2s;
        }
        .float-modal-close:hover {
            color: var(--text-main);
            background: rgba(255,255,255,0.1);
        }
        .float-modal-header-top {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .float-modal-img {
            width: 56px;
            height: 56px;
            object-fit: contain;
            background: linear-gradient(145deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.15);
            padding: 8px;
            box-shadow: 
                0 4px 12px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.1),
                0 0 20px rgba(129, 140, 248, 0.15);
        }
        .float-modal-info {
            flex: 1;
            min-width: 0;
        }
        .float-modal-name {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-main);
            letter-spacing: -0.2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 8px;
        }
        .float-modal-meta {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .float-modal-exterior {
            font-size: 11px;
            color: var(--text-sub);
            background: rgba(255,255,255,0.08);
            padding: 4px 10px;
            border-radius: 4px;
            font-weight: 500;
            letter-spacing: 0.2px;
            white-space: nowrap;
        }
        .float-modal-price {
            font-size: 18px;
            color: var(--accent-green);
            font-weight: 700;
            font-family: 'DIN Alternate', 'JetBrains Mono', monospace;
            letter-spacing: -0.5px;
            white-space: nowrap;
        }
        .float-modal-case {
            font-size: 11px;
            color: var(--text-sub);
            margin-top: 4px;
            padding: 2px 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }
        .float-modal-body {
            padding: 12px 16px;
            background: rgba(20, 24, 35, 0.5);
        }
        .float-modal-tip {
            font-size: 12px;
            color: var(--text-sub);
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .float-current-value {
            font-size: 13px;
            font-weight: 700;
            color: var(--accent-green);
            font-family: 'JetBrains Mono', monospace;
        }
        /* 磨损快捷按钮组 */
        .float-quick-btns {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }
        .float-quick-btn {
            padding: 10px 4px;
            border: none;
            border-radius: 10px;
            background: var(--input-bg);
            color: var(--text-sub);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.15s ease, opacity 0.15s ease;
            box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.3), -2px -2px 4px rgba(255, 255, 255, 0.5);
        }
        .float-quick-btn:active {
            transform: scale(0.95);
        }
        .float-quick-btn.active {
            background: linear-gradient(145deg, #E8FDF5, #D1FAE5);
            color: var(--accent-green);
            box-shadow: inset 2px 2px 4px rgba(16, 185, 129, 0.15), inset -2px -2px 4px rgba(255, 255, 255, 0.8);
        }
        .float-quick-btn.disabled {
            opacity: 0.4;
            pointer-events: none;
        }
        /* 磨损输入框行 */
        .float-input-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .float-input-label {
            font-size: 13px;
            color: var(--text-sub);
            white-space: nowrap;
        }
        .float-input {
            flex: 1;
            padding: 6px 12px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: var(--input-bg);
            font-size: 13px;
            font-family: 'JetBrains Mono', monospace;
            color: var(--text-main);
            outline: none;
            -moz-appearance: textfield;
        }
        .float-input::-webkit-outer-spin-button,
        .float-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .float-input:focus {
            border-color: var(--accent-green);
            box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
        }
        .float-confirm-btn {
            padding: 2px 12px;
            background: rgba(34, 211, 238, 0.15);
            border: 1px solid rgba(34, 211, 238, 0.3);
            color: var(--accent-cyan);
            font-size: 13px;
            font-weight: 600;
            border-radius: 16px;
            cursor: pointer;
            white-space: nowrap;
            line-height: 1.4;
            transition: transform 0.2s, opacity 0.2s;
        }
        .float-confirm-btn:hover {
            background: rgba(34, 211, 238, 0.25);
            border-color: rgba(34, 211, 238, 0.5);
        }
        .float-slider-container {
            width: 100%;
            position: relative;
            padding: 8px 0;
            touch-action: pan-x;  /* 优化触摸滑动 */
        }
        /* 滑动条轨道 */
        .float-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 8px;
            background: linear-gradient(90deg, 
                rgba(16, 185, 129, 0.3) 0%, 
                rgba(245, 158, 11, 0.3) 50%, 
                rgba(239, 68, 68, 0.3) 100%);
            border-radius: 8px;
            outline: none;
            cursor: pointer;
            border: 1px solid rgba(0, 0, 0, 0.05);
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
            /* GPU加速 */
            
            transform: translateZ(0);
        }
        /* 滑块 - 粘土圆形样式（性能优化） */
        .float-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background: #fff;
            border: 2px solid var(--accent-green);
            border-radius: 50%;
            cursor: pointer;
            /* 简化阴影，禁用过渡 */
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
            transition: none;
            /* GPU加速 */
            
            transform: translateZ(0);
        }
        .float-slider::-webkit-slider-thumb:active {
            transform: scale(1.1) translateZ(0);
        }
        .float-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background: #fff;
            border: 2px solid var(--accent-green);
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        }
        /* 磨损等级选择列表 - 5列水平布局 */
        .exterior-select-list {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 6px;
            margin-bottom: 12px;
        }
        .exterior-select-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            padding: 6px 4px;
            background: rgba(255,255,255,0.05);
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.08);
            cursor: pointer;
            transition: transform 0.15s ease, opacity 0.15s ease;
            min-height: 42px;
        }
        .exterior-select-item:active {
            transform: scale(0.96);
        }
        .exterior-select-item.selected {
            border-color: var(--accent-green);
            background: rgba(52, 211, 153, 0.15);
        }
        .exterior-select-item .ext-name {
            font-weight: 500;
            font-size: 11px;
            color: var(--text-sub);
            text-align: center;
            line-height: 1.2;
        }
        .exterior-select-item .ext-price {
            color: var(--accent-green);
            font-weight: 700;
            font-size: 12px;
            font-family: 'DIN Alternate', 'JetBrains Mono', monospace;
        }
        .float-input-section {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--border-color);
        }
        /* 已选饰品磨损值显示 */
        .slot-float {
            position: absolute;
            bottom: 3px;
            right: 3px;
            font-size: 8px;
            color: #fff;
            background: rgba(0,0,0,0.7);
            padding: 1px 5px;
            font-family: monospace;
            border-radius: 10px;
        }
        /* 已选饰品价格显示 */
        .slot-price {
            position: absolute;
            top: 2px;
            right: 2px;
            font-size: 8px;
            color: var(--accent-orange);
            background: rgba(0,0,0,0.7);
            padding: 1px 4px;
            border-radius: 8px;
            font-weight: 600;
        }

        /* ========================================= */
        /* --- 汰换结果弹窗 --- */
        /* ========================================= */
        .result-modal-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 400;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            overflow: hidden;
            will-change: opacity;
        }
        .result-modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .result-modal {
            background: var(--card-bg);
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            border-radius: 16px 16px 0 0;
            overflow: hidden;
            transform: translateY(100%);
            transition: transform 0.2s ease-out;
            display: flex;
            flex-direction: column;
            
        }
        .result-modal-overlay.active .result-modal {
            transform: translateY(0);
        }
        .result-modal-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            background: var(--card-bg);
            z-index: 10;
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
            flex-shrink: 0;
        }
        /* 保存配方按钮 - 右上角定位 */
        #result-save-btn {
            position: absolute;
            top: 12px;
            right: 16px;
            padding: 6px 12px !important;
            font-size: 12px !important;
            margin: 0 !important;
            width: auto;
        }
        /* 第一行：用户信息 */
        .header-user-info {
            display: flex;
            align-items: center;
            gap: 10px;
            position: relative;
        }
        /* 右上角收藏按钮 */
        .header-collect-btn {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            padding: 6px 10px;
            background: var(--input-bg);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .header-collect-btn svg {
            width: 18px;
            height: 18px;
            fill: var(--text-sub);
            transition: transform 0.25s, opacity 0.25s;
        }
        .header-collect-btn .collect-text {
            font-size: 10px;
            color: var(--text-sub);
            transition: transform 0.25s, opacity 0.25s;
        }
        .header-collect-btn:active {
            transform: translateY(-50%) scale(0.95);
        }
        .header-collect-btn.collected {
            background: rgba(16, 185, 129, 0.1);
        }
        .header-collect-btn.collected svg {
            fill: var(--accent-green);
        }
        .header-collect-btn.collected .collect-text {
            color: var(--accent-green);
        }
        .header-user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid var(--border-color);
            object-fit: cover;
            flex-shrink: 0;
        }
        .header-user-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
            min-width: 0;
        }
        .header-user-main {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .header-user-sub {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .header-sub-divider {
            font-size: 12px;
            color: var(--text-sub);
            opacity: 0.6;
        }
        .header-user-nickname {
            font-size: 12px;
            font-weight: 500;
            color: var(--text-sub);
        }
        .header-recipe-name {
            font-size: 16px;
            font-weight: 800;
            color: var(--text-main);
            font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
            letter-spacing: -0.3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
        }
        .header-share-time {
            font-size: 11px;
            color: var(--text-sub);
        }
        /* 简化标题行（非广场配方时显示） */
        .header-simple-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }
        .header-recipe-name-simple {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-main);
        }
        .header-save-btn {
            padding: 6px 14px;
            border: 1px solid rgba(16, 185, 129, 0.4);
            background: rgba(16, 185, 129, 0.15);
            border-radius: 20px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: #34D399;
            transition: transform 0.2s ease, opacity 0.2s ease;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
        }
        .header-save-btn:active {
            transform: scale(0.95);
        }
        .header-save-btn.saved {
            background: rgba(107, 114, 128, 0.15);
            border-color: rgba(107, 114, 128, 0.4);
            color: #8B92A5;
            box-shadow: 0 2px 6px rgba(107, 114, 128, 0.2);
        }
        /* 第二行：配方数据 */
        .header-recipe-stats {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: var(--text-main);
            flex-wrap: nowrap;
            overflow: hidden;
        }
        .header-recipe-stats .stat-cost,
        .header-recipe-stats .stat-profit {
            display: flex;
            align-items: center;
            gap: 4px;
            flex-shrink: 0;
        }
        .header-recipe-stats .stat-pfid {
            display: flex;
            align-items: center;
            flex-shrink: 0;
            gap: 4px;
            padding: 2px 6px;
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
            font-size: 12px;
            transition: background 0.2s;
        }
        .header-recipe-stats .stat-pfid:hover {
            background: rgba(255,255,255,0.2);
        }
        .header-recipe-stats .stat-likes {
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            margin-left: auto;
            padding: 4px 8px;
            border-radius: 16px;
            transition: background 0.2s;
            flex-shrink: 0;
        }
        .header-recipe-stats .stat-likes:active {
            background: var(--input-bg);
        }
        .header-recipe-stats .stat-likes .like-icon {
            width: 18px;
            height: 18px;
            fill: rgba(200, 200, 200, 0.6);
            stroke: rgba(150, 150, 150, 0.8);
            stroke-width: 1.5;
            transition: transform 0.3s, opacity 0.3s;
        }
        .header-recipe-stats .stat-likes.liked .like-icon {
            fill: #fe2c55;
            stroke: #fe2c55;
            animation: heartBeat 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .header-recipe-stats .stat-likes .like-count {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
        }
        .header-recipe-stats .stat-likes.liked .like-count {
            color: #fe2c55;
        }
        /* 第三行：操作按钮 */
        .header-actions-wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .header-actions {
            flex: 1;
            display: flex;
            gap: 4px;
            padding: 4px;
            border-radius: 12px;
            background: var(--input-bg);
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
        }
        .header-actions .action-btn {
            flex: 1;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 12px;
            background: transparent;
            border: none;
            border-radius: 8px;
            color: var(--text-sub);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }
        .header-actions .action-btn:hover:not(.active) {
            background: rgba(0,0,0,0.04);
        }
        .header-actions .action-btn svg {
            width: 15px;
            height: 15px;
            fill: var(--text-sub);
            transition: transform 0.25s, opacity 0.25s;
            flex-shrink: 0;
        }
        .header-actions .action-btn.active {
            background: #fff;
            color: var(--accent-green);
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15), 0 1px 3px rgba(0,0,0,0.08);
        }
        .header-actions .action-btn.active svg {
            fill: var(--accent-green);
        }
        .header-actions .action-btn.collected {
            color: var(--accent-green);
        }
        .header-actions .action-btn.collected svg {
            fill: var(--accent-green);
        }
        .header-actions .action-btn:active {
            transform: scale(0.96);
        }
        .header-actions .action-btn .action-count {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-sub);
            background: rgba(0,0,0,0.06);
            padding: 1px 6px;
            border-radius: 10px;
            margin-left: 2px;
        }
        .header-actions .action-btn.active .action-count {
            color: var(--accent-green);
            background: rgba(16, 185, 129, 0.12);
        }
        /* 独立收藏按钮 */
        .collect-btn-standalone {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px 14px;
            background: var(--input-bg);
            border: none;
            border-radius: 20px;
            color: var(--text-sub);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            flex-shrink: 0;
        }
        .collect-btn-standalone svg {
            width: 16px;
            height: 16px;
            fill: var(--text-sub);
            transition: transform 0.25s, opacity 0.25s;
        }
        .collect-btn-standalone:hover {
            background: rgba(0,0,0,0.08);
        }
        .collect-btn-standalone:active {
            transform: scale(0.95);
        }
        .collect-btn-standalone.collected {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            color: #d97706;
        }
        .collect-btn-standalone.collected svg {
            fill: #f59e0b;
        }
        .result-modal-body {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 16px;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-y: contain;
            min-height: 0;
            position: relative;
            scrollbar-width: none;
            -ms-overflow-style: none;
            transform: translateZ(0);
            will-change: scroll-position;
            contain: layout style;
        }
        .result-modal-body::-webkit-scrollbar {
            display: none;
        }
        .result-section {
            margin-bottom: 20px;
        }
        /* 上级节点缺失警告 */
        .result-warning {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 1px solid #f59e0b;
            border-radius: 8px;
            padding: 10px 12px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .result-warning-icon {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            color: #d97706;
        }
        .result-warning-text {
            font-size: 12px;
            color: #92400e;
            font-weight: 500;
        }
        .result-section-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 12px;
            padding-left: 10px;
            border-left: 4px solid var(--accent-green);
        }
        .result-section-title.input-title {
            border-left-color: var(--accent-blue);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        /* 入围标签按钮 */
        .finalist-tag-btn {
            color: #f59e0b;
            font-size: 12px;
            font-weight: 600;
            padding: 3px 10px;
            border: 1px solid rgba(245, 158, 11, 0.5);
            border-radius: 4px;
            background: rgba(245, 158, 11, 0.1);
            cursor: pointer;
            margin-left: auto;
        }
        .finalist-tag-btn:active {
            opacity: 0.7;
        }
        /* 输入材料网格 */
        .input-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        .input-item {
            background: var(--input-bg);
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--border-color);
            contain: layout style paint;
        }
        .input-item-img {
            width: 100%;
            aspect-ratio: 1;
            position: relative;
            background: linear-gradient(180deg, #f5f8fa 0%, #ffffff 50%, #eef2f5 100%);
            overflow: hidden;
            contain: layout style paint;
        }
        .input-item-img::before {
            content: '';
            position: absolute;
            inset: 0;
            background: 
                repeating-linear-gradient(
                    to right,
                    transparent 0px,
                    transparent 24px,
                    rgba(70, 115, 125, 0.25) 24px,
                    rgba(70, 115, 125, 0.25) 25px
                ),
                repeating-linear-gradient(
                    to bottom,
                    transparent 0px,
                    transparent 24px,
                    rgba(70, 115, 125, 0.25) 24px,
                    rgba(70, 115, 125, 0.25) 25px
                );
            pointer-events: none;
            z-index: 1;
        }
        .input-item-img::after {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(ellipse at 50% 50%, 
                transparent 30%,
                rgba(90, 140, 150, 0.2) 100%);
            pointer-events: none;
            z-index: 1;
        }
        .input-item-img img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 4px;
            position: relative;
            z-index: 2;
            transform: translateZ(0);
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }
        .input-item-float {
            position: absolute;
            bottom: 0;
            left: 0;
            background: rgba(0,0,0,0.65);
            color: #fff;
            font-size: 8px;
            padding: 3px 8px;
            font-family: monospace;
            white-space: nowrap;
            border-radius: 0 10px 0 0; /* 左下角与图片一体，右上角圆角形成药丸 */
            z-index: 3;
        }
        .input-item-price-inner {
            position: absolute;
            bottom: 0;
            right: 0;
            background: rgba(0,0,0,0.75);
            color: var(--accent-green);
            font-size: 9px;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 10px 0 0 0; /* 右下角与图片一体，左上角圆角形成药丸 */
            z-index: 3;
        }
        .input-item-source {
            position: absolute;
            top: 2px;
            right: 2px;
            background: rgba(0,0,0,0.65);
            color: #fff;
            font-size: 8px;
            padding: 1px 4px;
            border-radius: 3px;
            max-width: 60%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .input-item-info {
            padding: 6px;
            font-size: 9px;
            text-align: center;
        }
        .input-item-name {
            color: var(--text-main);
            font-weight: 600;
            font-size: 8px;
            line-height: 1.2;
            word-break: break-all;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 4px;
        }
        .input-item-price {
            color: var(--accent-green);
            font-weight: 700;
            font-size: 10px;
            display: block;
        }
        /* 产出结果网格 */
        .outcome-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        .outcome-item {
            background: var(--card-bg);
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            contain: layout style paint;
        }
        .outcome-item:active {
            opacity: 0.85;
        }
        .outcome-item-img {
            width: 100%;
            aspect-ratio: 1;
            background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
            position: relative;
            contain: layout style paint;
        }
        .outcome-item-img img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 8px;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }
        .outcome-item-img img.vp-active {
            transform: translateZ(0);
        }
        .outcome-item-prob {
            position: absolute;
            top: 4px;
            right: 4px;
            background: rgba(0,0,0,0.7);
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .outcome-item-wear {
            position: absolute;
            bottom: 0;
            left: 0;
            background: rgba(0,0,0,0.75);
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            font-size: 9px;
            border-radius: 0 10px 0 0; /* 左下角与图片一体，右上角圆角 */
        }
        .outcome-wear-val {
            color: #fbbf24;
            font-family: monospace;
        }
        .outcome-wear-name {
            color: #fff;
        }
        .outcome-item-info {
            padding: 8px;
        }
        .outcome-item-name {
            font-size: 11px;
            color: var(--text-main);
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 28px;
        }
        .outcome-item-case {
            font-size: 9px;
            color: var(--text-sub);
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .outcome-item-price {
            font-size: 11px;
            font-weight: 600;
        }
        .outcome-price-buff {
            color: var(--accent-green);
        }
        .outcome-price-youpin {
            color: var(--accent-blue);
            margin-left: 6px;
        }
        .outcome-price-none {
            color: var(--text-sub);
        }
        /* 统计摘要 */
        .result-summary {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 16px;
        }
        .summary-card {
            background: var(--input-bg);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
        }
        .summary-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-main);
        }
        .summary-value.green { color: var(--accent-green); }
        .summary-value.red { color: var(--accent-red); }
        .summary-value.gold { color: #d97706; }
        .summary-label {
            font-size: 11px;
            color: var(--text-sub);
            margin-top: 4px;
        }
        /* Header成本和期望收益率显示 */
        .header-stats {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }
        .header-stat-item {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
        }
        .header-stat-label {
            color: var(--text-sub);
        }
        .header-stat-value {
            font-weight: 700;
            color: var(--text-main);
        }
        .header-stat-value.green { color: var(--accent-green); }
        .header-stat-value.gold { color: #d97706; }
        /* 渐变概率条 */
        .probability-bar-container {
            margin-bottom: 16px;
            padding: 12px;
            background: var(--input-bg);
            border-radius: 12px;
        }
        .probability-bar-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 8px;
        }
        .prob-segment {
            height: 100%;
            position: relative;
            transition: transform 0.3s ease, opacity 0.3s ease;
            cursor: pointer;
        }
        .prob-segment:hover {
            filter: brightness(1.1);
        }
        .prob-segment-tooltip {
            display: none;
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.85);
            color: #fff;
            font-size: 10px;
            padding: 4px 8px;
            border-radius: 4px;
            white-space: nowrap;
            z-index: 100;
            margin-bottom: 4px;
        }
        .prob-segment:hover .prob-segment-tooltip {
            display: block;
        }
        .probability-legend {
            display: flex;
            justify-content: center;
            gap: 16px;
            margin-top: 8px;
            font-size: 11px;
        }
        .probability-price-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 6px;
            font-size: 11px;
            color: var(--text-sub);
            font-weight: 600;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 3px;
        }
        /* 收益分组样式 */
        .outcome-group {
            margin-bottom: 16px;
        }
        .outcome-group.collapsed {
            margin-bottom: 8px;
        }
        .outcome-group-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            user-select: none;
            position: relative;
            background: transparent;
            border-left: 3px solid transparent;
        }
        .outcome-group.collapsed .outcome-group-header {
            margin-bottom: 0;
        }
        .outcome-group-header::after {
            content: '\25BC';
            position: absolute;
            right: 10px;
            font-size: 10px;
            transition: transform 0.2s;
        }
        .outcome-group-header.collapsed::after {
            transform: rotate(-90deg);
        }
        .outcome-group .outcome-grid {
            transition: max-height 0.3s ease, opacity 0.2s;
            overflow: hidden;
        }
        .outcome-group.collapsed .outcome-grid {
            max-height: 0;
            opacity: 0;
            margin-bottom: 0;
        }
        .outcome-group-header.high {
            background: transparent;
            border-left-color: #10b981;
            color: #166534;
        }
        .outcome-group-header.medium {
            background: transparent;
            border-left-color: #f59e0b;
            color: #92400e;
        }
        .outcome-group-header.low {
            background: transparent;
            border-left-color: #ef4444;
            color: #991b1b;
        }
        .outcome-group-count {
            font-size: 11px;
            opacity: 0.8;
        }
        /* 响应式调整 - 小程序固定每行3个 */
        @media screen and (max-width: 414px) {
            .outcome-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            .input-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 4px;
            }
        }
        @media screen and (max-width: 359px) {
            .outcome-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        /* 分享配方详情网格 */
        .result-items {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        /* ========== 配方广场样式 ========== */
        /* 顶部滚动公告栏 */
.marquee-notice {
    background: linear-gradient(90deg, rgba(102,126,234,0.15) 0%, rgba(118,75,162,0.15) 100%);
    color: var(--accent-secondary);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.marquee-notice .marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    will-change: transform;
}
.marquee-notice .marquee-content span {
    display: inline-block;
    padding: 0 20px;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.square-filter-bar {
            padding: 6px 12px 4px 12px;
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 430px;
            z-index: 40;
            display: flex;
            gap: 0;
            align-items: center;
            background: var(--bg-color);
            box-sizing: border-box;
        }
        /* 下拉选择器容器 */
        .filter-dropdown {
            position: relative;
        }
        /* 一体化选择器组 */
        .filter-group {
            display: flex;
        }
        /* 一体化按钮：第一个右侧直角 */
        .filter-group .filter-dropdown:first-child .filter-dropdown-btn {
            border-radius: 8px 0 0 8px;
            border-right: none;
        }
        /* 一体化按钮：最后一个左侧直角+分隔线 */
        .filter-group .filter-dropdown:last-child .filter-dropdown-btn {
            border-radius: 0 8px 8px 0;
            border-left: 1px solid rgba(255,255,255,0.15);
        }
        .filter-dropdown-btn {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 5px 10px;
            color: var(--text-main);
            font-size: 12px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            transition: transform 0.2s ease, opacity 0.2s ease;
            white-space: nowrap;
        }
        .filter-dropdown-btn:hover {
            background: rgba(34, 211, 238, 0.1);
            border-color: rgba(34, 211, 238, 0.3);
        }
        .filter-dropdown-btn.active {
            background: rgba(34, 211, 238, 0.15);
            border-color: rgba(34, 211, 238, 0.4);
            color: var(--accent-cyan);
        }
        .filter-dropdown-btn svg {
            width: 12px;
            height: 12px;
            flex-shrink: 0;
        }
        .dropdown-arrow {
            transition: transform 0.2s ease;
            opacity: 0.6;
        }
        .filter-dropdown.open .dropdown-arrow {
            transform: rotate(180deg);
        }
        /* 大师赛按钮 - 图片按钮 */
        .tournament-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            padding: 2px;
            cursor: pointer;
            margin-left: auto;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        .tournament-btn img {
            height: 38px;
            width: auto;
            transform: scaleX(1.3);
            animation: tournamentShake 2s ease-in-out infinite;
        }
        @keyframes tournamentShake {
            0%, 85%, 100% { transform: scaleX(1.3) rotate(0deg); }
            88% { transform: scaleX(1.3) rotate(-3deg) scale(1.05); }
            91% { transform: scaleX(1.3) rotate(3deg) scale(1.05); }
            94% { transform: scaleX(1.3) rotate(-2deg); }
            97% { transform: scaleX(1.3) rotate(2deg); }
        }
        .tournament-btn span {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 8px;
            padding: 5px 12px;
            color: var(--text-main);
            font-size: 12px;
            font-weight: 600;
        }
        .tournament-btn.active span {
            background: rgba(30, 35, 50, 0.92);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: var(--text-main);
        }
        /* 大师赛筛选组件 */
        .tournament-filter-group {
            display: flex;
            gap: 8px;
        }
        .tournament-filter-group .filter-dropdown-btn {
            border-radius: 8px;
        }
        .finalist-date-btn {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 5px 10px;
            color: var(--text-main);
            font-size: 12px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            transition: transform 0.2s ease, opacity 0.2s ease;
            white-space: nowrap;
        }
        .finalist-date-btn:hover {
            background: rgba(245, 158, 11, 0.1);
            border-color: rgba(245, 158, 11, 0.3);
        }
        .finalist-date-btn.active {
            background: rgba(245, 158, 11, 0.15);
            border-color: rgba(245, 158, 11, 0.4);
            color: #f59e0b;
        }
        .finalist-date-btn svg {
            width: 12px;
            height: 12px;
            flex-shrink: 0;
            opacity: 0.6;
        }
        /* 赛事说明按钮 */
        .tournament-info-btn {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: rgba(255, 255, 255, 0.6);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s ease, opacity 0.2s ease;
            flex-shrink: 0;
        }
        .tournament-info-btn:hover {
            background: rgba(245, 158, 11, 0.15);
            border-color: rgba(245, 158, 11, 0.4);
            color: #f59e0b;
        }
        /* 底部弹出日期选择器 */
        .finalist-date-picker-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 500;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .finalist-date-picker-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .finalist-date-picker {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: var(--card-bg);
            border-radius: 20px 20px 0 0;
            max-height: 60vh;
            transform: translateY(100%);
            transition: transform 0.3s ease;
        }
        .finalist-date-picker-overlay.active .finalist-date-picker {
            transform: translateY(0);
        }
        .picker-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
        }
        .picker-header-left {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-main);
        }
        .picker-header-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .picker-view-all-btn {
            background: rgba(245, 158, 11, 0.15);
            border: 1px solid rgba(245, 158, 11, 0.3);
            border-radius: 6px;
            padding: 5px 12px;
            color: #f59e0b;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        .picker-view-all-btn:hover {
            background: rgba(245, 158, 11, 0.25);
        }
        .picker-close-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            color: var(--text-sub);
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .picker-list {
            max-height: calc(60vh - 60px);
            overflow-y: auto;
            padding: 8px 0;
        }
        .picker-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 20px;
            cursor: pointer;
            transition: background 0.15s ease;
        }
        .picker-item:hover {
            background: rgba(255,255,255,0.05);
        }
        .picker-item.selected {
            background: rgba(245, 158, 11, 0.1);
        }
        .picker-item-date {
            font-size: 15px;
            color: var(--text-main);
            font-weight: 500;
        }
        .picker-item.selected .picker-item-date {
            color: #f59e0b;
        }
        .picker-item-count {
            font-size: 13px;
            color: var(--text-sub);
            background: rgba(255,255,255,0.08);
            padding: 4px 10px;
            border-radius: 12px;
        }
        .picker-item.selected .picker-item-count {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }
        .picker-item-all {
            color: var(--accent-cyan);
            font-weight: 600;
        }
        /* 下拉面板 */
        .filter-dropdown-panel {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            min-width: 130px;
            background: var(--card-bg);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
            overflow: hidden;
            z-index: 100;
            opacity: 0;
            transform: translateY(-8px);
            pointer-events: none;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        .filter-dropdown-panel.open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        /* 下拉选项 */
        .filter-option {
            padding: 8px 12px;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: background 0.15s ease;
            color: var(--text-sub);
            font-size: 12px;
            font-weight: 500;
        }
        .filter-option:hover {
            background: rgba(255, 255, 255, 0.06);
        }
        .filter-option.selected {
            color: var(--accent-cyan);
            background: rgba(34, 211, 238, 0.1);
        }
        .filter-option .check-icon {
            width: 12px;
            opacity: 0;
        }
        .filter-option.selected .check-icon {
            opacity: 1;
        }
        /* 品质颜色圆点 */
        .quality-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .quality-dot.covert { background: #eb4b4b; }
        .quality-dot.classified { background: #d32ce6; }
        .quality-dot.restricted { background: #8847ff; }
        .quality-dot.extraordinary { background: #ffd700; }
        /* 品质标签文字 */
        .quality-count {
            font-size: 11px;
            background: rgba(34, 211, 238, 0.2);
            color: var(--accent-cyan);
            padding: 2px 6px;
            border-radius: 8px;
            margin-left: auto;
        }
        .sort-tabs {
            display: flex;
            background: rgba(255,255,255,0.04);
            border-radius: 16px;
            padding: 4px;
            position: relative;
            max-width: 360px;
            margin: 0 auto;
            box-shadow: var(--clay-shadow-inset);
            border: 1px solid rgba(255,255,255,0.08);
        }
        .sort-tab {
            flex: 1;
            padding: 8px 12px;
            border: none;
            background: transparent;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-sub);
            cursor: pointer;
            transition: color 0.3s;
            position: relative;
            z-index: 2;
            border-radius: 12px;
            white-space: nowrap;
        }
        .sort-tab.active {
            color: #fff;
        }
        /* 滑块指示器 (Dark) */
        .sort-tabs::before {
            content: '';
            position: absolute;
            top: 4px;
            left: 4px;
            width: calc(25% - 3px);
            height: calc(100% - 8px);
            background: linear-gradient(135deg, #10B981, #34D399);
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 1;
        }
        /* 滑块位置调整（4个按钮） */
        .sort-tabs[data-active="0"]::before {
            transform: translateX(0);
        }
        .sort-tabs[data-active="1"]::before {
            transform: translateX(calc(100% + 3px));
        }
        .sort-tabs[data-active="2"]::before {
            transform: translateX(calc(200% + 6px));
        }
        .sort-tabs[data-active="3"]::before {
            transform: translateX(calc(300% + 9px));
        }
        .square-recipe-list {
            padding: 12px;
            padding-top: 48px;
            padding-bottom: calc(80px + var(--safe-bottom));
        }
        .share-btn-flat {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 8px 14px;
            background: #fff;
            border: 2px solid var(--accent-blue);
            border-radius: 12px;
            color: var(--accent-blue);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: var(--clay-shadow-sm);
        }
        .share-btn-flat:active {
            transform: scale(0.95);
            box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.5);
        }
        .share-btn-flat svg {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }
        /* 删除按钮粘土风样式 */
        .delete-btn-flat {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 8px 14px;
            background: #fff;
            border: 2px solid var(--accent-red);
            border-radius: 12px;
            color: var(--accent-red);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: var(--clay-shadow-sm);
        }
        .delete-btn-flat:active {
            transform: scale(0.95);
            box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.5);
        }
        .delete-btn-flat svg {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }

        /* ========== 小程序专用紧凑型互动栏 ========== */ */
        /* 已删除互动栏，保留CSS以防其他地方使用 */
        
        /* 右上角互动按钮组（点赞+评论）- Mini Pill 极简胶囊 */
        .recipe-interaction-bar {
            position: absolute;
            top: 6px;
            right: 6px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            z-index: 10;
            background: rgba(15, 17, 23, 0.95);
            border-radius: 10px;
            padding: 3px 6px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255,255,255,0.08);
        }
        .recipe-like-star {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 3px;
            cursor: pointer;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            -webkit-tap-highlight-color: transparent;
        }
        .recipe-like-star:active {
            transform: scale(0.85);
        }
        .recipe-like-star svg {
            width: 14px;
            height: 14px;
            fill: var(--text-sub);
            stroke: none;
            transition: transform 0.3s, opacity 0.3s;
        }
        .recipe-like-star .like-count {
            font-size: 9px;
            font-weight: 700;
            color: var(--text-sub);
            line-height: 1;
        }
        /* 评论图标 */
        .recipe-comment-icon {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 2px;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
            -webkit-tap-highlight-color: transparent;
        }
        .recipe-comment-icon svg {
            width: 13px;
            height: 13px;
            fill: var(--text-sub);
            stroke: none;
        }
        .recipe-comment-icon .comment-count {
            font-size: 9px;
            font-weight: 700;
            color: var(--text-sub);
            line-height: 1;
        }
        /* 点赞后的红色状态 */
        .recipe-like-star.liked {
            transform: scale(1.05);
        }
        .recipe-like-star.liked svg {
            fill: #fe2c55;
            stroke: #fe2c55;
            filter: drop-shadow(0 2px 6px rgba(254, 44, 85, 0.5));
            animation: heartBeat 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .recipe-like-star.liked .like-count {
            color: #fe2c55;
            text-shadow: 0 1px 3px rgba(254, 44, 85, 0.3);
        }
        /* 抖音风格爱心跳动 */
        @keyframes heartBeat {
            0% { 
                transform: scale(0.5) rotate(-15deg);
                opacity: 0;
            }
            25% { 
                transform: scale(1.2) rotate(5deg);
                opacity: 1;
            }
            50% { 
                transform: scale(0.95) rotate(-3deg);
            }
            75% { 
                transform: scale(1.05) rotate(2deg);
            }
            100% { 
                transform: scale(1) rotate(0deg);
            }
        }
        .comment-section {
            padding: 12px;
            background: var(--bg-color);
            border-top: 1px solid var(--border-color);
        }
        .comment-input-wrapper {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }
        .comment-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-size: 13px;
            background: var(--card-bg);
        }
        .comment-send-btn {
            padding: 8px 16px;
            background: var(--accent-blue);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
        }
        .comment-item {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
        }
        .comment-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            flex-shrink: 0;
            object-fit: cover;
        }
        .comment-content {
            flex: 1;
        }
        .comment-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
        }
        .comment-nickname {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
        }
        .comment-time {
            font-size: 11px;
            color: var(--text-sub);
        }
        .comment-text {
            font-size: 13px;
            color: var(--text-main);
            line-height: 1.5;
            margin-bottom: 6px;
        }
        .comment-actions {
            display: flex;
            gap: 12px;
            font-size: 12px;
            color: var(--text-sub);
        }
        .comment-action {
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            transition: color 0.2s;
        }
        .comment-action:active {
            color: var(--accent-blue);
        }
        .reply-input-wrapper {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }
        .reply-input {
            flex: 1;
            padding: 6px 10px;
            border: 1px solid var(--border-color);
            border-radius: 16px;
            font-size: 12px;
            background: var(--card-bg);
        }
        .reply-input-wrapper button {
            padding: 6px 12px;
            background: var(--accent-green);
            color: white;
            border: none;
            border-radius: 16px;
            font-size: 12px;
            cursor: pointer;
        }
        .reply-list {
            margin-top: 8px;
            padding-left: 12px;
        }
        .reply-item {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
        }
        .reply-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            flex-shrink: 0;
            object-fit: cover;
        }
        .reply-content {
            font-size: 12px;
            color: var(--text-main);
            line-height: 1.5;
        }
        .reply-nickname {
            font-weight: 600;
            color: var(--accent-blue);
        }
        .reply-actions {
            display: flex;
            gap: 12px;
            font-size: 11px;
            color: var(--text-sub);
            margin-top: 4px;
        }
        .reply-actions span {
            cursor: pointer;
        }
        .load-more-btn {
            text-align: center;
            padding: 12px;
            color: var(--accent-blue);
            cursor: pointer;
            font-size: 13px;
        }
        /* 详情/评论区切换容器 */
        .detail-view-container,
        .comments-view-container {
            display: none;
        }
        .detail-view-container.active,
        .comments-view-container.active {
            display: block;
        }
        
        /* === 趋势图区域样式 === */
        .trend-section {
            margin-top: 16px;
            padding: 16px;
            background: var(--card-bg);
            border-radius: 12px;
            border: 1px solid var(--border-color);
        }
        .trend-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 8px;
        }
        .trend-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
        }
        .trend-chart-container {
            min-height: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .trend-loading {
            color: var(--text-sub);
            font-size: 13px;
        }
        .trend-chart {
            width: 100%;
        }
        .trend-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-top: 12px;
        }
        .trend-stat-item {
            text-align: center;
            padding: 8px;
            background: rgba(255,255,255,0.03);
            border-radius: 8px;
        }
        .trend-stat-label {
            font-size: 11px;
            color: var(--text-sub);
            margin-bottom: 4px;
        }
        .trend-stat-value {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
        }
        .trend-stat-value.positive { color: var(--accent-green); }
        .trend-stat-value.negative { color: var(--accent-red); }
        .trend-empty {
            color: var(--text-sub);
            font-size: 13px;
            text-align: center;
            padding: 20px;
        }
        /* 趋势图内容区域样式 */
        .trend-content {
            padding: 12px;
            margin-bottom: 12px;
            background: var(--card-bg);
            border-radius: 12px;
            border: 1px solid var(--border-color);
        }
        .trend-content .trend-header {
            margin-bottom: 10px;
        }
        .trend-content .trend-chart-container {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 10px;
            min-height: 180px;
            position: relative;
        }
        .trend-content .trend-chart-container canvas {
            display: block;
        }
        .trend-legend {
            display: flex;
            justify-content: center;
            gap: 16px;
            margin-top: 12px;
            padding: 8px 0;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-sub);
        }
        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }
        /* 趋势按钮样式 */
        .stat-trend {
            display: flex;
            align-items: center;
            gap: 4px;
            color: var(--accent-cyan);
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        .stat-trend:hover {
            color: var(--accent-primary);
        }
        .stat-trend.active {
            color: var(--accent-primary);
        }
        .trend-icon {
            width: 16px;
            height: 16px;
        }
        /* 标题行样式调整 */
        .result-section-title {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        /* 详情页底部评论区样式 */
        .detail-comments-section {
            margin-top: 16px;
            padding: 16px;
            background: var(--card-bg);
            border-radius: 12px;
            border: 1px solid var(--border-color);
        }
        .detail-comments-section .comment-input-area {
            position: relative;
            top: auto;
            padding: 0 0 12px 0;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 12px;
        }
        .detail-comments-section .comment-list-area {
            padding: 0;
            overflow: visible;
        }
        .detail-comments-section .comments-loading {
            text-align: center;
            padding: 30px 20px;
            color: var(--text-sub);
            font-size: 14px;
        }
        /* 评论区容器 - 保持与详情页相同布局 */
        .comments-view-container {
            padding: 0;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        .comments-view-container.active {
            display: flex;
        }
        /* 评论输入区域吸顶 */
        .comment-input-area {
            position: sticky;
            top: 0;
            background: var(--card-bg);
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            z-index: 5;
        }
        .comment-input-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .comment-input-area .comment-input {
            flex: 1;
            padding: 8px 14px;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-size: 13px;
            background: var(--input-bg);
            color: rgba(255,255,255,0.95);
            outline: none;
            transition: border-color 0.2s;
        }
        .comment-input-area .comment-input::placeholder {
            color: rgba(255,255,255,0.4);
        }
        .comment-input-area .comment-input:focus {
            border-color: var(--accent-blue);
        }
        .comment-input-area .comment-send-btn {
            padding: 8px 16px;
            background: var(--accent-blue);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            white-space: nowrap;
            transition: opacity 0.2s;
        }
        .comment-input-area .comment-send-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .comment-char-count {
            font-size: 11px;
            color: var(--text-sub);
            text-align: right;
            margin-top: 4px;
        }
        .comment-char-count.warning {
            color: var(--accent-red);
        }
        /* 评论列表区域 */
        .comment-list-area {
            flex: 1;
            overflow-y: auto;
            padding: 12px 16px;
            -webkit-overflow-scrolling: touch;
        }
        .comment-list-header {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 12px;
        }
        /* 单条评论样式优化 */
        .comment-item {
            display: flex;
            gap: 10px;
            padding: 12px 0;
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }
        .comment-item:last-child {
            border-bottom: none;
        }
        .comment-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            flex-shrink: 0;
            object-fit: cover;
            border: 1px solid var(--border-color);
        }
        .comment-main {
            flex: 1;
            min-width: 0;
        }
        .comment-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 4px;
        }
        .comment-user-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .comment-nickname {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
        }
        .comment-time {
            font-size: 11px;
            color: var(--text-sub);
        }
        .comment-text {
            font-size: 13px;
            color: var(--text-main);
            line-height: 1.6;
            word-break: break-word;
        }
        .comment-footer {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-top: 8px;
        }
        .comment-action {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: var(--text-sub);
            cursor: pointer;
            transition: color 0.2s;
        }
        .comment-action svg {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }
        .comment-action:active {
            color: var(--accent-blue);
        }
        .comment-action.liked {
            color: #fe2c55;
        }
        .comment-action.liked svg {
            fill: #fe2c55;
        }
        /* 回复列表 */
        .reply-list {
            margin-top: 10px;
            padding: 10px 12px;
            background: var(--input-bg);
            border-radius: 8px;
        }
        .reply-item {
            display: flex;
            gap: 8px;
            padding: 8px 0;
            border-bottom: 1px solid rgba(0,0,0,0.03);
        }
        .reply-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }
        .reply-item:first-child {
            padding-top: 0;
        }
        .reply-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            flex-shrink: 0;
            object-fit: cover;
        }
        .reply-main {
            flex: 1;
            min-width: 0;
        }
        .reply-text {
            font-size: 12px;
            color: var(--text-main);
            line-height: 1.5;
        }
        .reply-nickname {
            font-weight: 600;
            color: var(--accent-blue);
        }
        .reply-to {
            color: var(--text-sub);
        }
        .reply-footer {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 4px;
            font-size: 11px;
            color: var(--text-sub);
        }
        .reply-action {
            cursor: pointer;
        }
        .reply-action:active {
            color: var(--accent-blue);
        }
        /* 查看更多回复 */
        .view-more-replies {
            font-size: 12px;
            color: var(--accent-blue);
            cursor: pointer;
            padding: 8px 0 0;
        }
        /* 回复输入框 */
        .reply-input-box {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(0,0,0,0.05);
        }
        .reply-input-box .reply-input {
            flex: 1;
            padding: 6px 12px;
            border: 1px solid var(--border-color);
            border-radius: 16px;
            font-size: 12px;
            background: var(--card-bg);
            outline: none;
        }
        .reply-input-box .reply-send-btn {
            padding: 6px 12px;
            background: var(--accent-green);
            color: white;
            border: none;
            border-radius: 16px;
            font-size: 12px;
            cursor: pointer;
        }
        /* 空状态 */
        .comments-empty {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-sub);
            font-size: 14px;
        }
        .comments-empty svg {
            width: 48px;
            height: 48px;
            fill: var(--border-color);
            margin-bottom: 12px;
        }
        .comments-empty-text {
            margin-bottom: 16px;
        }
        .comments-empty-tip {
            font-size: 12px;
            color: var(--text-sub);
            opacity: 0.7;
        }
        /* 加载更多 */
        .load-more-comments {
            text-align: center;
            padding: 12px;
            color: var(--accent-blue);
            cursor: pointer;
            font-size: 13px;
        }
        .load-more-comments:active {
            opacity: 0.7;
        }
        /* 评论加载中 */
        .comments-loading {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-sub);
            font-size: 13px;
        }


        /* 配方名称编辑图标 */
        .recipe-name-edit-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            cursor: pointer;
            border-radius: 4px;
            transition: transform 0.2s, opacity 0.2s;
            flex-shrink: 0;
        }
        .recipe-name-edit-icon svg {
            width: 14px;
            height: 14px;
            fill: var(--text-sub);
            transition: fill 0.2s;
        }
        .recipe-name-edit-icon:active {
            background: var(--input-bg);
        }
        .recipe-name-edit-icon:active svg {
            fill: var(--accent-blue);
        }

        /* =========================================
        /* --- 全屏加载动画 (高保真) ---
        /* ========================================= */
        .app-loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #F0F4F8 0%, #E2E8F0 50%, #F0F4F8 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }
        .app-loading-screen.fade-out {
            opacity: 0;
            visibility: hidden;
        }
        /* Logo容器 */
        .loading-logo-container {
            position: relative;
            width: 80px;
            height: 80px;
            margin-bottom: 24px;
        }
        /* 外圈旋转光环 */
        .loading-ring {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 3px solid transparent;
            border-top-color: var(--accent-primary);
            border-right-color: var(--accent-secondary);
            animation: loading-spin 1s linear infinite;
        }
        .loading-ring::before {
            content: '';
            position: absolute;
            top: 4px;
            left: 4px;
            right: 4px;
            bottom: 4px;
            border-radius: 50%;
            border: 2px solid transparent;
            border-bottom-color: var(--accent-green);
            border-left-color: var(--accent-cyan);
            animation: loading-spin 1.5s linear infinite reverse;
        }
        @keyframes loading-spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        /* 中心Logo */
        .loading-logo {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 
                0 8px 24px rgba(99, 102, 241, 0.35),
                inset 0 1px 0 rgba(255,255,255,0.3);
            animation: loading-pulse 2s ease-in-out infinite;
        }
        .loading-logo span {
            font-size: 16px;
            font-weight: 800;
            color: #fff;
            font-family: 'Nunito', sans-serif;
            letter-spacing: -0.5px;
        }
        @keyframes loading-pulse {
            0%, 100% { transform: translate(-50%, -50%) scale(1); }
            50% { transform: translate(-50%, -50%) scale(1.05); }
        }
        /* 加载文字 */
        .loading-text {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-sub);
            margin-bottom: 16px;
            font-family: 'Nunito', sans-serif;
        }
        /* 进度条 */
        .loading-progress {
            width: 160px;
            height: 4px;
            background: rgba(99, 102, 241, 0.15);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }
        .loading-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-cyan));
            background-size: 200% 100%;
            border-radius: 4px;
            animation: loading-progress 1.5s ease-in-out infinite;
            width: 40%;
        }
        @keyframes loading-progress {
            0% { 
                transform: translateX(-100%);
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
            100% { 
                transform: translateX(350%);
                background-position: 0% 50%;
            }
        }
        /* 底部提示 */
        .loading-tip {
            position: absolute;
            bottom: 60px;
            font-size: 11px;
            color: var(--text-sub);
            opacity: 0.6;
        }
