/**
 * FusRock 官网 — 系统深夜模式兼容
 * 站点为浅色品牌视觉；阻止 iOS/Android/macOS 自动改写正文与表单对比度。
 */
:root,
html {
    color-scheme: light only;
    supported-color-schemes: light;
}

@media (prefers-color-scheme: dark) {
    html,
    body {
        background-color: #fff;
        color: #1a1a1a;
    }

    body,
    body p,
    body li,
    body h1,
    body h2,
    body h3,
    body h4,
    body h5,
    body h6,
    body label,
    body dt,
    body dd,
    body td,
    body th {
        -webkit-text-fill-color: currentColor;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="image"]),
    select,
    textarea {
        background-color: #fff;
        color: #1a1a1a;
        border-color: #cbd5e1;
        -webkit-text-fill-color: #1a1a1a;
    }

    input::placeholder,
    textarea::placeholder {
        color: #64748b;
        opacity: 1;
    }

    /* 浅灰副标题 / 说明文字在深夜模式下提高可读性 */
    .index-mod-top .index-mod-title h5,
    .index-about .index-about-left p.en,
    .message-bg .message-box .message-text input::placeholder,
    .message-bg .message-box .message-text textarea::placeholder {
        color: #475569;
        opacity: 1;
    }

    /* 白底卡片内链接与正文 */
    .header .header-nav ul ul li a,
    .header .header-nav > ul > li.has-sub:not(.nav-product):not(.nav-service):not(.nav-cases) > ul > li > a,
    .header .header-nav > ul > li.nav-product > ul > li > a,
    .pagination li,
    .index-news .index-news-item a,
    .index-cases .index-cases-item .text-box .title,
    .policy-layout,
    .policy-layout a {
        color: #1a1a1a;
        -webkit-text-fill-color: currentColor;
    }

    /* 深色页头/页脚/横幅保持浅色字，避免被系统反色 */
    .header .header-nav > ul > li > a,
    .header .header-search span,
    .footer,
    .footer a,
    .index-banner-swiper .index-banner-item .text,
    .index-banner-swiper .index-banner-item .big div,
    .index-banner-swiper .index-banner-item .small div,
    .wwh-alarm-ticker__track li {
        -webkit-text-fill-color: inherit;
    }
}
}
