        /* ========== 保存成功动画效果 ========== */

        /* 新记录入场动画 */
        @keyframes newRecordEntry {
            0% {
                opacity: 0;
                transform: translateX(-26px) scale(0.96);
                box-shadow: 0 0 0 rgba(255, 154, 162, 0);
            }
            50% {
                opacity: 1;
                transform: translateX(8px) scale(1.02);
                box-shadow: 0 16px 36px rgba(255, 154, 162, 0.18);
            }
            100% {
                opacity: 1;
                transform: translateX(0) scale(1);
                box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            }
        }

        .record-item.new-record-animation {
            animation: newRecordEntry 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
            position: relative;
            overflow: hidden;
        }

        .record-item.new-record-animation::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 40%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 154, 162, 0.18), transparent);
            filter: blur(8px);
            opacity: 0;
            animation: entryGlow 0.8s ease-out forwards;
        }

        /* 光带扫过：translateX 合成器动画（自身宽 40% = 父级 -40%/60%/120% 的等价换算） */
        @keyframes entryGlow {
            0% {
                transform: translateX(-100%);
                opacity: 0;
            }
            50% {
                transform: translateX(150%);
                opacity: 0.48;
            }
            100% {
                transform: translateX(300%);
                opacity: 0;
            }
        }

        @keyframes deleteRecordExit {
            0% {
                opacity: 1;
                transform: translateX(0) scale(1);
                box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            }
            20% {
                transform: translateX(4px) scale(0.99);
                background: rgba(255, 99, 97, 0.1);
                box-shadow: 0 6px 18px rgba(255, 99, 97, 0.15);
            }
            100% {
                opacity: 0;
                transform: translateX(36px) scale(0.96);
                box-shadow: 0 2px 10px rgba(0,0,0,0.02);
            }
        }

        .record-item.delete-record-animation {
            animation: deleteRecordExit 0.35s ease forwards;
            pointer-events: none;
            overflow: hidden;
        }

        /* 统计数字滚动更新动画 */
        .hero-metric-value.animating,
        .hero-balance-value.animating {
            display: inline-block;
            animation: numberRoll 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        }

        @keyframes numberRoll {
            0% {
                opacity: 0;
                transform: translateY(-20px) scale(0.8);
                filter: blur(4px);
            }
            50% {
                opacity: 0.7;
                transform: translateY(5px) scale(1.05);
                filter: blur(1px);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
                filter: blur(0);
            }
        }

        /* 总览面板更新时的光晕效果 */
        .hero-summary.updating {
            position: relative;
            animation: cardGlow 0.8s ease-out;
        }

        @keyframes cardGlow {
            0% {
                box-shadow: 0 4px 20px rgba(255, 154, 162, 0.4), 0 0 60px rgba(255, 154, 162, 0.2);
                transform: translateY(-3px) scale(1.02);
            }
            100% {
                box-shadow: var(--shadow);
                transform: translateY(0) scale(1);
            }
        }

        /* 新记录入场动画 */
        @keyframes slideInNew {
            0% {
                opacity: 0;
                transform: translateX(-30px) scale(0.95);
            }
            60% {
                opacity: 1;
                transform: translateX(5px) scale(1.01);
            }
            100% {
                opacity: 1;
                transform: translateX(0) scale(1);
            }
        }

        .record-item.slide-in-new {
            animation: slideInNew 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        @keyframes recordAppear {
            0% {
                opacity: 0;
                transform: translateY(18px) scale(0.98);
            }
            70% {
                opacity: 1;
                transform: translateY(-4px) scale(1.02);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .record-item.appear-record {
            opacity: 0;
            animation: recordAppear 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }

        /* 当日统计数字特殊高亮 */
        .date-header.updating-date {
            animation: dateHighlight 0.6s ease-out;
        }

        @keyframes dateHighlight {
            0% {
                background: linear-gradient(90deg, transparent, rgba(255, 200, 160, 0.2), transparent);
                transform: scale(1.02);
            }
            100% {
                background: transparent;
                transform: scale(1);
            }
        }

        /* AI智能记账弹窗 */
        .ai-bookkeep-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(64, 54, 50, 0.32);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 3000;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .ai-bookkeep-overlay.active {
            display: flex;
        }

        .ai-bookkeep-panel {
            background: var(--card-bg);
            border-radius: 24px;
            width: 100%;
            max-width: 520px;
            max-height: 85vh;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
            animation: aiPanelSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
            overflow-y: auto;
            overflow-x: hidden;
        }

        @keyframes aiPanelSlideUp {
            from {
                opacity: 0;
                transform: translateY(60px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ai-bookkeep-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px 12px;
        }

        .ai-bookkeep-header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .ai-bookkeep-header-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .ai-bookkeep-header-icon img {
            transition: opacity 0.25s ease;
        }

        .ai-bookkeep-header-icon img.logo-pop {
            animation: logoPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes logoPop {
            0% { transform: scale(0.5); }
            60% { transform: scale(1.15); }
            100% { transform: scale(1); }
        }

        .ai-bookkeep-header-title {
            font-size: 17px;
            font-weight: 700;
            color: var(--text);
            letter-spacing: -0.2px;
        }

        .ai-bookkeep-header-subtitle {
            font-size: 11px;
            color: var(--text-light);
            margin-top: 1px;
            letter-spacing: 0.3px;
        }

        .ai-bookkeep-close {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 50%;
            background: #F5F5F5;
            color: var(--text-light);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.25s;
        }

        .ai-bookkeep-close:hover {
            background: #EEE;
            color: var(--text);
        }

        .ai-bookkeep-body {
            padding: 0 24px 20px;
        }

        .ai-bookkeep-textarea-wrap {
            position: relative;
        }

        .ai-bookkeep-textarea {
            width: 100%;
            min-height: 120px;
            border: 2px solid #F0F0F0;
            border-radius: 16px;
            padding: 16px;
            font-size: 15px;
            font-family: inherit;
            color: var(--text);
            background: #FAFAFA;
            resize: vertical;
            line-height: 1.7;
            letter-spacing: 0.2px;
            transition: all 0.3s;
        }

        .ai-bookkeep-textarea:focus {
            outline: none;
            border-color: var(--primary-light);
            background: #FFF;
            box-shadow: 0 0 0 4px rgba(255, 154, 162, 0.08);
        }

        .ai-bookkeep-textarea::placeholder {
            color: transparent;
        }

        .ai-bookkeep-ghost-hint {
            position: absolute;
            top: 16px;
            left: 16px;
            right: 16px;
            pointer-events: none;
            font-size: 14px;
            line-height: 1.7;
            letter-spacing: 0.3px;
            color: #C8C8C8;
        }

        .ai-bookkeep-ghost-hint.hidden {
            display: none;
        }

        .ai-bookkeep-footer {
            padding: 0 24px 28px;
        }

        .ai-bookkeep-submit {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: white;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 0.5px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }

        .ai-bookkeep-submit::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
        }

        .ai-bookkeep-submit:hover::before {
            transform: translateX(100%);
        }

        .ai-bookkeep-submit:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 25px rgba(255, 154, 162, 0.35);
        }

        .ai-bookkeep-submit:active {
            transform: translateY(0);
            opacity: 0.9;
        }

        .ai-bookkeep-submit:disabled {
            opacity: 1;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
            background: linear-gradient(135deg, #FF8A95, #FF6B7D);
            animation: submitPulse 2s ease-in-out infinite;
        }

        @keyframes submitPulse {
            0%, 100% { box-shadow: 0 4px 15px rgba(255, 107, 125, 0.3); }
            50% { box-shadow: 0 8px 30px rgba(255, 107, 125, 0.5), 0 0 40px rgba(255, 107, 125, 0.15); }
        }

        .thinking-dots {
            display: inline-flex;
            gap: 3px;
            margin-left: 4px;
        }

        .thinking-dots span {
            display: inline-block;
            width: 5px;
            height: 5px;
            background: white;
            border-radius: 50%;
            animation: dotBounce 1.4s ease-in-out infinite;
        }

        .thinking-dots span:nth-child(2) { animation-delay: 0.16s; }
        .thinking-dots span:nth-child(3) { animation-delay: 0.32s; }

        @keyframes dotBounce {
            0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
            40% { transform: scale(1.2); opacity: 1; }
        }

        .ai-bookkeep-result {
            display: none;
            margin-top: 16px;
            background: #F9FAFB;
            border-radius: 16px;
            overflow: hidden;
        }

        .ai-bookkeep-result.active {
            display: block;
            animation: aiResultFadeIn 0.35s ease;
        }

        @keyframes aiResultFadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .ai-bookkeep-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: linear-gradient(135deg, #FFF5F5 0%, #FFF0F1 100%);
            border-bottom: 1px solid rgba(255,154,162,0.08);
            gap: 8px;
            flex-wrap: nowrap;
        }

        .ai-bookkeep-summary-left {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 13px;
            color: var(--text-light);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .ai-bookkeep-summary-count {
            font-weight: 700;
            color: var(--primary);
        }

        .ai-bookkeep-summary-right {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-shrink: 0;
        }

        .ai-bookkeep-summary-item {
            text-align: right;
            white-space: nowrap;
        }

        .ai-bookkeep-summary-label {
            font-size: 10px;
            color: var(--text-light);
            font-weight: 500;
            margin-bottom: 1px;
        }

        .ai-bookkeep-summary-amount {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: -0.3px;
        }

        .ai-bookkeep-summary-amount.income { color: #4ECDC4; }
        .ai-bookkeep-summary-amount.expense { color: var(--primary); }

        .ai-bookkeep-list {
            padding: 10px 12px 14px;
            max-height: 220px;
            overflow-y: auto;
        }

        .ai-bookkeep-result-item {
            position: relative;
            display: flex;
            align-items: stretch;
            border-radius: 12px;
            margin-bottom: 8px;
            background: white;
            box-shadow: 0 1px 4px rgba(0,0,0,0.04);
            overflow: hidden;
            opacity: 0;
            transform: translateY(12px);
            animation: resultItemIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        .ai-bookkeep-result-item:last-child {
            margin-bottom: 0;
        }

        @keyframes resultItemIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ai-bookkeep-result-item.saved {
            background: linear-gradient(135deg, #F7FFF7 0%, #F0FFF4 100%);
            box-shadow: 0 1px 6px rgba(78,205,196,0.1);
        }

        .result-left-bar {
            width: 3px;
            flex-shrink: 0;
            border-radius: 2px 0 0 2px;
            background: linear-gradient(180deg, var(--primary), #E57373);
        }

        .type-income .result-left-bar { background: linear-gradient(180deg, #5EDDD4, #4ECDC4) !important; }

        .result-body {
            flex: 1;
            padding: 11px 13px;
            min-width: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .result-main {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
            flex: 1;
        }

        .result-top-row {
            display: flex;
            align-items: center;
            gap: 7px;
        }

        .result-type-icon {
            font-size: 15px;
            flex-shrink: 0;
            width: 22px;
            text-align: center;
        }

        .ai-bookkeep-result-item .result-category {
            font-size: 10px;
            padding: 1px 7px;
            border-radius: 20px;
            white-space: nowrap;
            font-weight: 600;
            letter-spacing: 0.3px;
            background: #FFF0F1;
            color: var(--primary);
        }

        .ai-bookkeep-result-item.type-income { background: linear-gradient(135deg, #F0FFFE 0%, #E6FAF8 100%); }
        .ai-bookkeep-result-item.type-income.saved { background: linear-gradient(135deg, #E0FFF8 0%, #D0FBF5 100%); box-shadow: 0 1px 6px rgba(78,205,196,0.12); }

        .type-income .result-category { background: #E0F7F5 !important; color: #2BA89E !important; }

        .ai-bookkeep-result-item .result-note {
            color: var(--text);
            font-size: 13px;
            line-height: 1.35;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            line-clamp: 2;
        }

        .result-right-col {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            justify-content: center;
            gap: 2px;
            flex-shrink: 0;
        }

        .ai-bookkeep-result-item .result-amount {
            font-weight: 800;
            font-size: 16px;
            letter-spacing: -0.3px;
            white-space: nowrap;
            color: var(--primary);
        }

        .type-income .result-amount { color: #4ECDC4 !important; }

        .ai-bookkeep-result-item .result-status {
            font-size: 10px;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .ai-bookkeep-result-item .result-status.saved {
            color: #26A69A;
        }

        .ai-bookkeep-result-item .result-status.pending {
            color: #BDBDBD;
        }

        .ai-bookkeep-save-all {
            display: none;
            width: 100%;
            margin-top: 12px;
            padding: 10px;
            border: 1.5px solid var(--primary-light);
            border-radius: 12px;
            background: white;
            color: var(--primary);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s;
        }

        .ai-bookkeep-save-all.active {
            display: block;
        }

        .ai-bookkeep-save-all:hover {
            background: #FFF5F5;
        }

        .ai-bookkeep-save-all:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

