/* CedCouplet 主题小改动（站点级，独立于 bundle.css，升级主题不受影响）
 * 1) 规格（宝贝类型 / SKU）选中态：实心 #7d80a0 + 白字 + 白色外圈
 * 2) 商品详情价格数字颜色：绿色 -> #7d80a0
 */

/* ---------- 1. 规格选中态 ---------- */
body.ys .theme-form-stack .sku.is-primary,
body.ys .theme-form-stack .sku.is-primary:active,
body.ys .sku.is-primary,
.sku.is-primary {
    border-color: #7d80a0 !important;
    background: #7d80a0 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.92),
        0 0 0 4px rgba(125, 128, 160, 0.55),
        0 10px 22px rgba(88, 91, 122, 0.30) !important;
    transform: translateY(-1px);
}

body.ys .theme-form-stack .sku.is-primary:hover,
body.ys .theme-form-stack .sku.is-primary:focus-visible,
body.ys .sku.is-primary:hover,
.sku.is-primary:hover {
    background: #8a8db0 !important;
    border-color: #8a8db0 !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.95),
        0 0 0 4px rgba(125, 128, 160, 0.65),
        0 14px 28px rgba(88, 91, 122, 0.38) !important;
}

body.ys .theme-form-stack .sku.is-primary .sku-label,
body.ys .sku.is-primary .sku-label,
.sku.is-primary .sku-label {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.ys .theme-form-stack .sku.is-primary .badge-money,
body.ys .sku.is-primary .badge-money,
.sku.is-primary .badge-money {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #4a4d6b !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 14px rgba(60, 63, 90, 0.28) !important;
}

.sku:not(.is-primary):focus-visible {
    outline: 2px solid rgba(125, 128, 160, 0.55);
    outline-offset: 2px;
}

/* ---------- 2. 浅色模式可读性：把白底上看不清的浅色文字加深 ----------
 * 全部使用 html:not(.theme-dark) 限定，夜间模式不受任何影响。
 * 价格数字（.theme-item-price .price / .theme-commodity-price）保持原样，未做改动。
 */

/* 分类名：除下面点名的两个分类外，一律用主题原始文字色 --xn-ink
 * （浅色下是深灰 #1f2937，夜间是原本的浅白 #e6eaf2，即“原始颜色”）。
 * 不加模式限定，日间/夜间同时生效。 */
html body.ys .theme-category-name.has-accent-color {
    color: var(--xn-ink) !important;
}

/* 仅保留这两个分类的按图配色：诚收代理|合作加盟（id=86）、GTA5（id=2） */
html:not(.theme-dark) body.ys .theme-category-node[data-node-id="86"] .theme-category-name,
html:not(.theme-dark) body.ys .theme-category-node[data-node-id="2"] .theme-category-name {
    color: var(--theme-accent-ink, #1f2937) !important;
}

html.theme-dark body.ys .theme-category-node[data-node-id="86"] .theme-category-name,
html.theme-dark body.ys .theme-category-node[data-node-id="2"] .theme-category-name {
    color: var(--theme-accent-text, #ffffff) !important;
}

/* 商品标题：全部恢复主题原始文字色 --xn-ink（浅色深灰 / 夜间浅白），不再按封面配色 */
html body.ys .theme-commodity-name.has-accent-color {
    color: var(--xn-ink) !important;
}

/* 导航 / 分类的悬停与选中：原深色皮肤残留的近白色字 */
html:not(.theme-dark) body.ys .theme-nav-link:hover,
html:not(.theme-dark) body.ys .theme-nav-link.is-active,
html:not(.theme-dark) body.ys .theme-category-link:hover,
html:not(.theme-dark) body.ys .theme-category-link.is-active,
html:not(.theme-dark) body.ys .theme-button-light:hover {
    color: #111827 !important;
}

/* 复制按钮 */
html:not(.theme-dark) body.ys .btn-copy-unified:hover,
html:not(.theme-dark) body.ys .order-copy-btn,
html:not(.theme-dark) body.ys .order-copy-btn:hover,
html:not(.theme-dark) body.ys .order-copy-btn:focus,
html:not(.theme-dark) body.ys .order-copy-btn:focus-visible,
html:not(.theme-dark) body.ys .order-copy-btn:active {
    color: #1d4ed8 !important;
}

/* 表单可选按钮 / 徽章 / 角标 */
html:not(.theme-dark) body.ys .optional-card {
    color: #1f2937 !important;
}

html:not(.theme-dark) body.ys .theme-item-badges .badge-soft,
html:not(.theme-dark) body.ys .theme-item-badges .badge-soft:hover,
html:not(.theme-dark) body.ys .snap-up,
html:not(.theme-dark) body.ys .goods-sku {
    color: #374151 !important;
}

html:not(.theme-dark) body.ys .a-badge-primary {
    color: #1d4ed8 !important;
}

html:not(.theme-dark) body.ys .a-badge-success {
    color: #127b3c !important;
}

html:not(.theme-dark) body.ys .a-badge-warning {
    color: #8c5200 !important;
}

/* 浅灰蓝小字：面板眉标 / 查询说明 / 公告小标 / 金额标签 */
html:not(.theme-dark) body.ys .panel-kicker,
html:not(.theme-dark) body.ys .theme-query-heading .panel-kicker,
html:not(.theme-dark) body.ys .theme-query-summary,
html:not(.theme-dark) body.ys .theme-notice-kicker,
html:not(.theme-dark) body.ys .amount-label {
    color: #4b5563 !important;
}

/* 输入框占位符 */
html:not(.theme-dark) body.ys input::placeholder,
html:not(.theme-dark) body.ys textarea::placeholder,
html:not(.theme-dark) body.ys .form-control::placeholder,
html:not(.theme-dark) body.ys .theme-searchbox input::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* 浅蓝图标 / 公告链接悬停 */
html:not(.theme-dark) body.ys .theme-query-heading-icon,
html:not(.theme-dark) body.ys .shipment-title i,
html:not(.theme-dark) body.ys .theme-payment-notice a:hover {
    color: #1d4ed8 !important;
}

/* 售罄/禁用按钮文字 */
html:not(.theme-dark) body.ys .theme-commodity-action-disabled {
    color: #6b7280 !important;
}

/* 手机端：分类卡片标题块改用与商品目录标题条一致的灰底横幅
 * （bundle.css 里 .theme-sidebar-panel .panel-header 被强制透明，这里在小屏恢复横幅底色） */
@media (max-width: 767.98px) {
    html:not(.theme-dark) body.ys .theme-sidebar-panel > .panel-header {
        background: linear-gradient(90deg, rgba(18, 24, 46, 0.76), rgba(7, 10, 20, 0.44)) !important;
        border-radius: 0;
    }
}

/* 商品目录标题条：面板为避免 hover 上浮被裁切已改成 overflow: visible，
 * 标题条的直角会盖住面板圆角；这里让上两角跟随面板圆角，下两角保持直角与内容区衔接。 */
body.ys .theme-catalog-panel > .panel-header {
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* ---------- 3. 浅色模式：详情页灰底控件统一改白 ----------
 * bundle.css 把徽章 / SKU / 购买数量 / 付款方式 / 联系方式输入框
 * 刷成了 #b9bcc9 灰渐变；此处全部改回白底 + 浅灰描边。
 * 严格限定 html:not(.theme-dark)，夜间模式完全不受影响。
 * 规格（SKU）选中态 .sku.is-primary 由上方第 1 节控制，这里用 :not(.is-primary)
 * 排除，突出感保留；价格框 .theme-item-price 与价格数字同样未改动。
 */

/* 徽章 */
html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft,
html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft-success,
html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft-info,
html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft-primary {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.10) !important;
    color: #1f2937 !important;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06) !important;
}

html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft:hover,
html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft-success:hover,
html:not(.theme-dark) body.ys .theme-item-form-wrap .theme-item-badges .badge-soft-info:hover {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.20) !important;
    color: #111827 !important;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.10) !important;
}

/* 规格（未选中）：选中态 .sku.is-primary 不在此列 */
html:not(.theme-dark) body.ys .theme-form-stack .sku:not(.is-primary) {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
    color: #1f2937 !important;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05) !important;
}

html:not(.theme-dark) body.ys .theme-form-stack .sku:not(.is-primary):hover {
    background: #ffffff !important;
    border-color: rgba(125, 128, 160, 0.55) !important;
    color: #111827 !important;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.10) !important;
}

/* 购买数量 */
html:not(.theme-dark) body.ys .theme-form-stack .qty-group {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
    color: #1f2937 !important;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05) !important;
}

html:not(.theme-dark) body.ys .theme-form-stack .qty-group .form-control,
html:not(.theme-dark) body.ys .theme-form-stack .qty-group .form-control:focus {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: none !important;
}

html:not(.theme-dark) body.ys .theme-form-stack .change-num-sub,
html:not(.theme-dark) body.ys .theme-form-stack .change-num-add {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
    color: #1f2937 !important;
    box-shadow: none !important;
}

html:not(.theme-dark) body.ys .theme-form-stack .change-num-sub:hover,
html:not(.theme-dark) body.ys .theme-form-stack .change-num-add:hover {
    background: #f3f4f6 !important;
    border-color: rgba(17, 24, 39, 0.20) !important;
    color: #111827 !important;
}

/* 付款方式：正常与选中都为白底，选中只用描边区分，不做灰底/彩色高亮 */
html:not(.theme-dark) body.ys .pay-list .pay {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
    color: #1f2937 !important;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05) !important;
    transform: none !important;
}

html:not(.theme-dark) body.ys .pay-list .pay span,
html:not(.theme-dark) body.ys .pay-list .pay .pay-name {
    color: #1f2937 !important;
}

html:not(.theme-dark) body.ys .pay-list .pay:hover {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.20) !important;
    color: #111827 !important;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.10) !important;
    transform: none !important;
}

html:not(.theme-dark) body.ys .pay-list .pay:hover span {
    color: #111827 !important;
}

html:not(.theme-dark) body.ys .pay-list .pay.selected,
html:not(.theme-dark) body.ys .pay-list .pay.active,
html:not(.theme-dark) body.ys .pay-list .pay.pay-selected,
html:not(.theme-dark) body.ys .pay-list .pay.is-active {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.30) !important;
    color: #111827 !important;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.10) !important;
    transform: none !important;
}

html:not(.theme-dark) body.ys .pay-list .pay.selected span,
html:not(.theme-dark) body.ys .pay-list .pay.active span,
html:not(.theme-dark) body.ys .pay-list .pay.pay-selected span,
html:not(.theme-dark) body.ys .pay-list .pay.is-active span {
    color: #111827 !important;
}

html:not(.theme-dark) body.ys .pay-list .pay img {
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.10) !important;
}

/* 联系方式输入框 */
html:not(.theme-dark) body.ys .theme-form-stack input.form-control.contact-input {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.14) !important;
    color: #1f2937 !important;
    caret-color: #1f2937 !important;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05) !important;
}

html:not(.theme-dark) body.ys .theme-form-stack input.form-control.contact-input:focus {
    background: #ffffff !important;
    border-color: rgba(125, 128, 160, 0.65) !important;
    color: #111827 !important;
    box-shadow: 0 0 0 3px rgba(125, 128, 160, 0.16) !important;
    outline: 0 !important;
}

html:not(.theme-dark) body.ys .theme-form-stack input.form-control.contact-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #1f2937 !important;
}

/* ---------- 4. 浅色模式：价格框由 #f2f3f5 浅灰改为白底 ----------
 * 只改背景（含其渐变色），价格数字颜色、字号、边框与阴影维持原样。
 */
html:not(.theme-dark) body.ys .theme-item-price {
    background-color: #ffffff !important;
    background-image: linear-gradient(#ffffff, #ffffff) !important;
}

/* ---------- 5. 滚动性能：去掉内容区毛玻璃 ----------
 * 面板/卡片/导航本身的底色已接近不透明，模糊前后观感几乎一致，
 * 但毛玻璃要求浏览器在滚动时每帧重新采样背景，是掉帧的主要来源。
 * 弹窗、下拉菜单等浮层保留毛玻璃（出现频率低、有实际叠影效果）。
 */
body.ys .theme-nav,
body.ys .panel,
body.ys .theme-sidebar-panel,
body.ys .theme-hero-banner,
body.ys .theme-hero-banner--notice,
body.ys .theme-item-unified-panel,
body.ys .theme-footer-wrap,
body.ys .theme-commodity-card,
body.ys .theme-commodity-card .row-inner,
body.ys .theme-table-wrap,
body.ys .theme-card-catalog-wrap,
body.ys .theme-item-price,
body.ys .cash-pay,
body.ys .cash-pay--independent,
body.ys .theme-payment-notice,
body.ys .theme-searchbox,
body.ys .theme-searchbox-combo,
body.ys .theme-user-chip {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* ---------- 6. 滚动性能：首屏标题只保留位移动画 ----------
 * 原来的发光脉冲逐帧重绘 text-shadow 和 filter，滚动时开销明显；
 * 位移呼吸动画走合成层，几乎不耗 CPU。
 */
body.ys .theme-hero-title span {
    animation: themeHeroTitleFloat 5.8s ease-in-out 0.9s infinite !important;
}

body.ys .theme-hero-title strong {
    animation: themeHeroSubtitleFloat 6.4s ease-in-out 1.1s infinite !important;
}

/* ---------- 7. 滚动性能：首屏离开视口后暂停装饰动画 ----------
 * Header.js 通过 IntersectionObserver 给首屏加 .theme-hero-idle。
 */
body.ys .theme-hero-banner--image.theme-hero-idle,
body.ys .theme-hero-banner--image.theme-hero-idle *,
body.ys .theme-hero-banner--image.theme-hero-idle::before,
body.ys .theme-hero-banner--image.theme-hero-idle::after {
    animation-play-state: paused !important;
}

/* ---------- 8. 订单查询：标题行复制胶囊与商家留言白卡 ----------
 * 「宝贝内容」「商家留言」两个标题行右侧各放一个蓝色胶囊按钮。
 * 留言正文放在白色卡片里，用深色字保证对比度（深底深字原来看不清）。
 */
body.ys .theme-copy-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.22rem 0.85rem;
    border: 0;
    border-radius: 999px;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

body.ys .theme-copy-pill i {
    font-size: 0.82rem;
    line-height: 1;
    color: #ffffff !important;
}

body.ys .theme-copy-pill:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

body.ys .theme-copy-pill:active {
    transform: translateY(1px);
}

body.ys .theme-copy-pill:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

body.ys .theme-leave-message {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-top: 0.75rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

body.ys .theme-leave-message,
body.ys .theme-leave-message * {
    color: #1f2937 !important;
    font-weight: 500;
    line-height: 1.75;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: anywhere;
}

body.ys .theme-leave-message a,
body.ys .theme-leave-message a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

/* ---------- 9. 首页横幅公告按钮：恢复原有的玻璃质感 ----------
 * bundle.css 后段把 .cyber-btn-item 覆盖成白底（白页改版遗留），
 * 这里用站点级规则还原深色玻璃按钮，不改动 bundle.css。
 */
body.ys #theme-announcement-buttons .cyber-btn-item {
    border-color: rgba(183, 234, 255, 0.28) !important;
    background: rgba(1, 9, 24, 0.38) !important;
    color: #dbe7ff !important;
    box-shadow:
        inset 0 1px 0 rgba(239, 252, 255, 0.16),
        0 10px 28px rgba(0, 0, 0, 0.20) !important;
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
}

body.ys #theme-announcement-buttons .cyber-btn-item:hover {
    border-color: rgba(220, 242, 255, 0.72) !important;
    background: linear-gradient(135deg, rgba(45, 123, 162, 0.58), rgba(87, 61, 143, 0.50)) !important;
    color: #ffffff !important;
}
