/* ============ 京享礼金转链 - 工具专属样式 ============ */
/* 输入框/下拉/提示/错误/结果/空状态/按钮均复用 common.css 公共样式，此处仅补充商品卡片与按钮组 */

/* 两步操作的按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.btn-group .btn {
    flex: 1 1 auto;
    min-width: 160px;
}

/* 商品查询结果卡片 */
.product-block {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.product-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
    margin-top: 12px; /* 与右侧表头行对齐，整体略往下沉 */
    background: #fff; /* 透明PNG商品图以白底呈现，避免灰底框感 */
}

/* 可点击的商品图片 */
.product-img-link {
    flex-shrink: 0;
    display: block;
    line-height: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.product-img-link:hover {
    opacity: 0.85;
}

.product-meta {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-all;
}

/* 商品信息里的小标记 */
.result-tag {
    font-size: 12px;
    font-weight: 500;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* 商品完整信息表（对齐订单侠 demo 样式） */
.product-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}

.product-info-table.full {
    margin-top: 14px;
    border-top: 1px solid #e8e8e8;
}

.product-info-table th,
.product-info-table td {
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
}

.product-info-table tr:last-child th,
.product-info-table tr:last-child td {
    border-bottom: none;
}

.product-info-table th {
    width: 86px;
    min-width: 86px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.product-info-table .th-inline {
    width: auto;
    min-width: 0;
    padding-left: 24px;
}

.product-info-table td {
    word-break: break-all;
}

/* 领券购买按钮行：居中 */
.product-info-table .buy-row td {
    text-align: center;
}

/* 领券购买 + 复制短链 同行按钮组 */
.buy-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* 初始空状态：查询京东商品优惠引导 */
.jx-empty {
    padding: 56px 24px;
}

/* 查询失败错误态 */
.jx-error .empty-state-icon {
    background: linear-gradient(135deg, #fff1f0, #ffe4e0);
}

body.dark .jx-error .empty-state-icon {
    background: #3a2a2a;
}

.jx-empty .empty-state-icon {
    font-size: 38px;
    background: linear-gradient(135deg, #fff1f0, #ffe4e0);
}

body.dark .jx-empty .empty-state-icon {
    background: #3a2a2a;
}

.jx-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.jx-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #4b5563;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    white-space: nowrap;
}

.jx-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e4393c, #ff6a00);
    border-radius: 50%;
    flex-shrink: 0;
}

.jx-step-arrow {
    color: #d1d5db;
    font-size: 14px;
}

.jx-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.jx-tag {
    padding: 4px 12px;
    font-size: 12px;
    color: #e4393c;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 999px;
}

body.dark .jx-step {
    color: #d1d5db;
    background: #374151;
    border-color: #4b5563;
}

body.dark .jx-step-arrow {
    color: #6b7280;
}

body.dark .jx-tag {
    color: #f87171;
    background: #2a1f1f;
    border-color: #5b2a2a;
}

@media (max-width: 640px) {
    .jx-empty {
        padding: 40px 16px;
    }

    .jx-step-arrow {
        display: none;
    }
}

/* 移动端：三个按钮换行，按钮撑满宽度 */
@media (max-width: 640px) {
    .buy-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .buy-actions .btn-buy,
    .buy-actions .btn-gen,
    .buy-actions .btn-copy-link {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* 生成礼金：橙色升级按钮，与主按钮同高 */
.btn-gen {
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff9a3c, #ff6a00);
    border: none;
    border-radius: 22px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn-gen:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.4);
}

.btn-gen:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

body.dark .btn-gen:disabled {
    background: #4b5563;
    color: #9ca3af;
}

/* 领随机礼金成功特效弹窗 */
.gift-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    animation: gift-fade 0.2s ease;
}

@keyframes gift-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gift-modal {
    position: relative;
    width: 300px;
    padding: 34px 26px 26px;
    background: linear-gradient(160deg, #fff5f0, #fff);
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(228, 57, 60, 0.35);
    animation: gift-pop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes gift-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.gift-emoji {
    font-size: 52px;
    line-height: 1;
    animation: gift-bounce 0.6s ease 0.15s both;
}

@keyframes gift-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    70% { transform: translateY(-4px); }
}

.gift-title {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #e4393c;
}

.gift-amount {
    margin: 14px 0 6px;
    font-size: 44px;
    font-weight: 800;
    color: #ff6a00;
    line-height: 1;
}

.gift-amount .gift-tilde {
    font-size: 30px;
    margin: 0 2px;
}

.gift-desc {
    font-size: 13px;
    color: #8a8a8a;
}

.gift-btn {
    margin-top: 20px;
    width: 100%;
    padding: 11px 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff6034, #e4393c);
    border: none;
    border-radius: 22px;
    cursor: pointer;
    transition: transform 0.15s;
}

.gift-btn:hover {
    transform: translateY(-1px);
}

/* 礼花爆裂装饰 */
.gift-burst {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 1px;
    height: 1px;
    transform: translateX(-50%);
}

.gift-burst::before,
.gift-burst::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd166;
    box-shadow:
        40px 20px 0 #ff6a00, -40px 20px 0 #e4393c,
        60px -10px 0 #ffd166, -60px -10px 0 #ff6034,
        20px -40px 0 #ffb703, -20px -40px 0 #fb8500;
    animation: gift-confetti 0.7s ease-out both;
}

@keyframes gift-confetti {
    0% { opacity: 0; transform: scale(0.2); }
    100% { opacity: 1; transform: scale(1); }
}

body.dark .gift-modal {
    background: linear-gradient(160deg, #2a201b, #1f2937);
}

body.dark .gift-title {
    color: #f87171;
}

body.dark .gift-desc {
    color: #9ca3af;
}

/* 领礼金失败弹窗 */
.gift-modal-fail {
    background: linear-gradient(160deg, #fff, #fff);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.gift-modal-fail .gift-title {
    color: #374151;
}

.gift-fail-desc {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

body.dark .gift-modal-fail {
    background: linear-gradient(160deg, #1f2937, #1f2937);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

body.dark .gift-modal-fail .gift-title {
    color: #e5e7eb;
}

body.dark .gift-fail-desc {
    color: #9ca3af;
}

body.dark .gift-fly {
    background: rgba(40, 30, 30, 0.95);
    color: #f87171;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark .price-gift {
    color: #f87171;
}

body.dark .price-estimate-hint {
    color: #6b7280;
}

/* 礼金领取失败提示（按钮下方） */
.gift-error {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: #e4393c;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    text-align: left;
}

/* 领礼金进行中的进度提示（让等待有反馈） */
.gift-working {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    text-align: left;
}

body.dark .gift-working {
    color: #93c5fd;
    background: #172554;
    border-color: #1e3a8a;
}

body.dark .gift-error {
    color: #f87171;
    background: #2a1f1f;
    border-color: #5b2a2a;
}

/* 礼金已建但转链失败：提示可免费重试（不重复扣费） */
.gift-transfer-hint {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    text-align: left;
}

body.dark .gift-transfer-hint {
    color: #fbbf24;
    background: #2a2415;
    border-color: #5b4a1f;
}

/* 已绑定礼金状态条 */
.gift-bound {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #cf1322;
    background: linear-gradient(135deg, #fff1f0, #ffe4e0);
    border: 1px solid #ffccc7;
    border-radius: 8px;
}

body.dark .gift-bound {
    color: #f87171;
    background: #2a1f1f;
    border-color: #5b2a2a;
}

/* 查询商品按钮：京东红主题 */
.jx-btn-query.btn-primary {
    background: linear-gradient(135deg, #e4393c, #ff6a00);
    border-color: #e4393c;
    padding: 7px 24px;
    font-size: 14px;
    min-width: 120px;
    flex: 0 0 auto; /* 覆盖 .btn-group .btn 的 flex:1 拉伸，保持按钮自身宽度并居中 */
}

.jx-btn-query.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #d02f32, #f25c00);
    border-color: #d02f32;
}

.jx-btn-query.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 复制短链：描边次按钮，与主按钮同高 */
.btn-copy-link {
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #e4393c;
    background: #fff;
    border: 1px solid #e4393c;
    border-radius: 22px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.btn-copy-link:hover {
    background: #e4393c;
    color: #fff;
}

body.dark .btn-copy-link {
    background: #1f2937;
    color: #f87171;
    border-color: #f87171;
}

body.dark .btn-copy-link:hover {
    background: #f87171;
    color: #fff;
}

.product-info-table .price-strong {
    color: #e4393c;
    font-weight: 600;
}

/* 最终到手价：更大字号突出 */
.product-info-table .price-final {
    font-size: 24px;
    font-weight: 700;
}

/* 价格主视觉区：到手价放大 + 原价划线弱化 + 立省角标 */
.price-hero {
    position: relative;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

/* 礼金扣减飘字特效：从价格处上浮淡出 */
.gift-fly {
    position: absolute;
    left: 64px;
    top: -2px;
    font-size: 16px;
    font-weight: 800;
    color: #e4393c;
    background: rgba(255, 255, 255, 0.92);
    padding: 2px 10px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(228, 57, 60, 0.3);
    pointer-events: none;
    animation: gift-fly 1.3s ease-out forwards;
}

@keyframes gift-fly {
    0%   { opacity: 0; transform: translateY(8px) scale(0.8); }
    20%  { opacity: 1; transform: translateY(-2px) scale(1.05); }
    100% { opacity: 0; transform: translateY(-34px) scale(1); }
}

/* 礼金扣减说明行 */
.price-gift {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #e4393c;
}

/* 预估价免责提示：联盟数据与结算页实时补贴存在天然误差 */
.price-estimate-hint {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.price-hero-label {
    font-size: 13px;
    color: #e4393c;
    font-weight: 600;
}

.price-hero-main {
    font-size: 32px;
    line-height: 1.1;
    font-weight: 700;
    color: #e4393c;
    letter-spacing: -0.5px;
}

.price-hero-origin {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.price-hero-save {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #e4393c;
    border-radius: 4px;
    padding: 2px 8px;
}

.price-hero-tag {
    font-size: 12px;
    font-weight: 600;
    color: #ff6600;
    border: 1px solid #ff6600;
    border-radius: 4px;
    padding: 1px 6px;
}

.price-hero-note {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

body.dark .price-hero-origin,
body.dark .price-hero-note {
    color: #6b7280;
}

.product-info-table .price-after {
    color: #6b7280;
    font-size: 12px;
    margin-left: 4px;
}

.product-info-table .info-cell {
    display: inline-block;
    margin-right: 18px;
    white-space: nowrap;
}

/* 京东自营 / POP 标记 */
.self-tag,
.pop-tag,
.coupon-tag {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 3px;
    vertical-align: 1px;
    margin-left: 6px;
}

.self-tag {
    color: #fff;
    background: #e1251b;
}

.pop-tag {
    color: #fff;
    background: #909399;
}

.coupon-tag {
    color: #e4393c;
    background: rgba(228, 57, 60, 0.08);
    border: 1px solid rgba(228, 57, 60, 0.35);
    margin-left: 0;
}

/* 可点击的券标签 */
.coupon-tag-link {
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.coupon-tag-link:hover {
    background: #e4393c;
    color: #fff;
}

body.dark .coupon-tag-link:hover {
    background: #f87171;
    color: #fff;
}

/* 多张优惠券列表 */
.coupon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

/* 券列表 + 领券购买按钮 同行布局 */
.coupon-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* 无券说明 / 未加入联盟库提示 */
.coupon-note {
    font-size: 13px;
    color: #909399;
}

.coupon-note-warn {
    color: #d48806;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    padding: 4px 10px;
}

body.dark .coupon-note {
    color: #9ca3af;
}

body.dark .coupon-note-warn {
    color: #f0c14b;
    background: #2a2410;
    border-color: #5b4a1a;
}

/* 领券购买按钮 */
.btn-buy {
    display: inline-block;
    padding: 11px 28px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6034, #e4393c);
    border-radius: 22px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 57, 60, 0.4);
    color: #fff;
}

body.dark .btn-buy {
    background: linear-gradient(135deg, #f87171, #dc2626);
}

.coupon-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 券类型标签（商品券/店铺券/平台券） */
.coupon-type {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    line-height: 1.5;
    color: #ff6600;
    background: rgba(255, 102, 0, 0.1);
    border: 1px solid rgba(255, 102, 0, 0.35);
    border-radius: 3px;
    vertical-align: middle;
}

/* 最优券标记 */
.coupon-best {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    line-height: 1.5;
    color: #fff;
    background: #e4393c;
    border-radius: 3px;
    vertical-align: middle;
}

body.dark .coupon-type {
    color: #ff9a4d;
    background: rgba(255, 154, 77, 0.12);
    border-color: rgba(255, 154, 77, 0.4);
}

body.dark .coupon-best {
    background: #f87171;
}

/* 暗色模式适配 */
body.dark .product-info-table th {
    color: #9ca3af;
}

/* 优惠券链接 */
.coupon-link {
    color: #2563eb;
    word-break: break-all;
    margin-right: 10px;
    font-size: 12px;
}

.coupon-link:hover {
    text-decoration: underline;
}

body.dark .coupon-link {
    color: #93c5fd;
}

body.dark .product-info-table th,
body.dark .product-info-table td {
    border-bottom-color: #374151;
}

body.dark .product-info-table.full {
    border-top-color: #374151;
}

body.dark .product-info-table .price-after,
body.dark .product-info-table td {
    color: #d1d5db;
}

body.dark .product-info-table .price-strong,
body.dark .coupon-tag {
    color: #f87171;
}

body.dark .coupon-tag {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.4);
}

body.dark .product-img {
    border-color: #374151;
    background: #1f2937;
}

/* 商品图片列表 */
.img-gallery {
    margin-top: 14px;
    border-top: 1px solid #e8e8e8;
    padding-top: 12px;
}

.img-gallery-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-top: 10px;
}

.img-gallery-title .btn-buy {
    padding: 9px 22px;
    font-size: 15px;
}

.img-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.img-item {
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f7f7f7;
    transition: transform 0.15s, box-shadow 0.15s;
}

.img-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.img-item img {
    width: 100%;
    height: auto;
    display: block;
}

body.dark .img-gallery {
    border-top-color: #374151;
}

body.dark .img-gallery-title {
    color: #d1d5db;
}

body.dark .img-item {
    border-color: #374151;
    background: #1f2937;
}

/* 转链记录列表 */
.history-block {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.history-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* 清空按钮：低调文字样式，hover 才显红（覆盖公共 button 白底胶囊外观） */
.history-clear {
    font-size: 12px;
    color: #9ca3af;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 8px;
    transition: color 0.15s, background 0.15s;
}

.history-clear:hover {
    color: #e4393c;
    background: rgba(228, 57, 60, 0.08);
}

.history-clear:hover {
    color: #e4393c;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

/* 悬停反馈：白底 + 边框加深 + 轻微上浮阴影 */
.history-item:hover {
    background: #fff;
    border-color: #f3c1b6;
    box-shadow: 0 4px 14px rgba(228, 57, 60, 0.12);
    transform: translateY(-1px);
}

/* 历史条目缩略图 */
.history-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #f0f0f0;
}

.history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.history-main {
    flex: 1;
    min-width: 0;
}

/* 标题带短链：可点击跳转优惠链接 */
.history-name-link {
    color: #1d4ed8;
    text-decoration: none;
    transition: color 0.15s;
}

.history-name-link:hover {
    color: #e4393c;
    text-decoration: underline;
}

.history-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

/* 记录内价格行：价格居左 + 复制按钮右对齐 */
.history-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.history-price-row .history-copy {
    margin-left: auto;
}

/* 记录内价格：原价划线弱化 + 到手价突出 */
.history-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
}

.history-price .hp-origin {
    color: #9ca3af;
    text-decoration: line-through;
}

.history-price .hp-final {
    color: #e4393c;
    font-weight: 700;
    font-size: 14px;
}

body.dark .history-price .hp-origin {
    color: #6b7280;
}

body.dark .history-price .hp-final {
    color: #f87171;
}

.history-url {
    flex: 1;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-url:hover {
    text-decoration: underline;
}

/* 历史条目复制按钮：默认空心（红描边），悬停变实心（京东红填充） */
.history-copy {
    flex-shrink: 0;
    font-size: 12px;
    color: #e4393c;
    background: transparent;
    border: 1px solid #e4393c;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.history-copy:hover {
    color: #fff;
    background: linear-gradient(135deg, #e4393c, #ff6a00);
    border-color: transparent;
}

/* 复制成功态：实心红渐变 */
.history-copy.copied {
    color: #fff;
    background: linear-gradient(135deg, #e4393c, #ff6a00);
    border-color: transparent;
}

/* 首个结果区紧贴卡头：抵消公共 .result-section 的 32px 上边距+内边距（避免卡顶大片空白） */
.result-content .result-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* 卡头与内容间距收紧（标题/标签已移除，15px 空带显得突兀） */
.result-card .card-header {
    margin-bottom: 6px;
}

/* 区块间距收敛，避免本工具卡片内空隙过大 */
.result-content .result-section + .result-section {
    margin-top: 20px;
    padding-top: 20px;
}


.history-pending {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    padding: 1px 8px;
}

body.dark .history-pending {
    color: #6b7280;
    background: #111827;
    border-color: #374151;
}

body.dark .history-block {
    border-top-color: #374151;
}

body.dark .history-title {
    color: #d1d5db;
}

body.dark .history-item {
    background: #1f2937;
    border-color: #374151;
}

body.dark .history-item:hover {
    background: #253044;
    border-color: #7f3b38;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

body.dark .history-thumb {
    background: #111827;
    border-color: #374151;
}

body.dark .history-name-link {
    color: #93c5fd;
}

body.dark .history-name-link:hover {
    color: #f87171;
}

body.dark .history-name {
    color: #e5e7eb;
}

body.dark .history-url {
    color: #60a5fa;
}

body.dark .history-clear:hover {
    color: #f87171;
}

/* 调试框 */
.raw-box {
    margin-top: 14px;
    font-size: 12px;
}

.raw-box summary {
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
}

.raw-box pre {
    margin: 10px 0 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: #374151;
    line-height: 1.6;
}
