@font-face {
    font-family: "siyuan";
    font-weight: 400;
    src: url("/web/dianle/font/siyuanhei.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "DINCond";
    font-weight: 400;
    src: url("/web/dianle/font/Mohave-Regular-2.otf") format("woff");
    font-display: swap;
}

.dianle-siyuan {
    font-family: "siyuan";
}

.dianle-DINCond {
    font-family: "DINCond";
}

/* 包裹 <header> 不应限制 sticky 的滚动范围，让其相对整页生效 */
.dl-headerbar {
    display: contents;
}

/* ===== 顶部白色磨砂导航 =====
   说明：reset.css 给 html/body 设了 overflow-x:hidden，会令二者成为滚动容器，
   导致 position:sticky 失效，故此处使用 fixed 固定在视口顶部。 */
.dianle-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(20, 40, 90, 0.07);
    z-index: 999;
}

.dianle-header .dianle-width {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
    padding: 0 24px;
}

.dianle-header .dianle-logo {
    width: 140px;
    height: 100%;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.dianle-header .dianle-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 原 logo 为浅色（深色背景用），在白色导航上不可见；
       先 brightness(0) 转为剪影，再着色为品牌蓝。仅作用于顶部导航，不影响深色页脚 logo。 */
    filter: brightness(0) saturate(100%) invert(34%) sepia(86%) saturate(2438%) hue-rotate(213deg) brightness(101%) contrast(101%);
}

.dianle-header .dianle-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.dianle-header .dianle-header-nav .dianle-item {
    color: #1f2533;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 14px;
    font-size: 15px;
    position: relative;
}

.dianle-header .dianle-header-nav .dianle-item::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 16px;
    height: 2px;
    border-radius: 2px;
    background: #2b6cff;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dianle-header .dianle-header-nav .dianle-item:hover {
    color: #2b6cff;
}

.dianle-header .dianle-header-nav .dianle-item:hover::after {
    transform: scaleX(1);
}

/* 下拉小箭头 */
.dianle-nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.55;
    transition: transform 0.25s ease;
}

.dianle-nav-mega {
    height: 100%;
    display: flex;
    align-items: center;
}

.dianle-nav-mega:hover .dianle-nav-caret {
    transform: rotate(180deg);
}

/* ===== Mega 下拉面板 ===== */
.dianle-mega-panel {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid rgba(20, 40, 90, 0.06);
    box-shadow: 0 24px 48px rgba(20, 40, 90, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    z-index: 998;
}

.dianle-nav-mega:hover .dianle-mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dianle-mega-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) 280px;
    gap: 28px;
}

.dianle-mega-col h4 {
    font-size: 13px;
    color: #97a0b3;
    letter-spacing: 1px;
    margin-bottom: 14px;
    font-weight: 400;
}

.dianle-mega-col a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 0 -12px;
}

.dianle-mega-col a b {
    display: block;
    color: #1f2533;
    font-size: 15px;
    font-weight: 400;
}

.dianle-mega-col a span {
    display: block;
    color: #97a0b3;
    font-size: 12px;
    margin-top: 3px;
}

.dianle-mega-col a:hover {
    background: #f2f6ff;
}

.dianle-mega-col a:hover b {
    color: #2b6cff;
}

.dianle-mega-promo {
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    background: linear-gradient(135deg, #eaf1ff 0%, #dbe7ff 100%);
}

.dianle-mega-promo span {
    color: #2b6cff;
    font-size: 13px;
}

.dianle-mega-promo b {
    color: #1f2533;
    font-size: 19px;
}

.dianle-mega-promo a {
    margin-top: 8px;
    color: #2b6cff;
    font-size: 14px;
}

/* ===== 登录 / 注册 ===== */
.dianle-header .dianle-button {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dianle-header .dianle-button a {
    height: 38px;
    padding: 0 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
}

.dianle-header .dianle-button a:first-of-type {
    color: #2b6cff;
    background: #eef3ff;
}

.dianle-header .dianle-button a:first-of-type:hover {
    background: #e0eaff;
}

.dianle-header .dianle-button a:nth-of-type(2) {
    background: linear-gradient(135deg, #3b7bff 0%, #2b6cff 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(43, 108, 255, 0.28);
}

.dianle-header .dianle-button a:nth-of-type(2):hover {
    box-shadow: 0 10px 22px rgba(43, 108, 255, 0.4);
    transform: translateY(-1px);
}

.dianle-header .dianle-button a img {
    width: 15px;
    height: 15px;
    object-fit: contain;
}

/* 桌面端：导航容器透明参与父级 flex 布局，汉堡按钮隐藏 */
.dianle-header .dianle-nav-wrap {
    display: contents;
}

.dianle-header .dianle-menu-toggle {
    display: none;
}

/* ============ 手机端适配 ============ */
@media screen and (max-width: 768px) {
    .dianle-header {
        height: 56px;
        position: fixed;
    }

    .dianle-header .dianle-width {
        gap: 0;
        padding: 0 16px;
        justify-content: space-between;
    }

    .dianle-header .dianle-logo {
        width: auto;
        margin-right: 0;
    }

    .dianle-header .dianle-logo img {
        height: 28px;
        width: auto;
    }

    /* 汉堡按钮 */
    .dianle-header .dianle-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        padding: 9px;
        cursor: pointer;
        margin-left: auto;
    }

    .dianle-header .dianle-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background-color: #1f2533;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }

    .dianle-header.is-open .dianle-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .dianle-header.is-open .dianle-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .dianle-header.is-open .dianle-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 下拉面板 */
    .dianle-header .dianle-nav-wrap {
        display: block;
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(180%) blur(14px);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        padding: 0 16px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 16px 32px rgba(20, 40, 90, 0.12);
    }

    .dianle-header.is-open .dianle-nav-wrap {
        max-height: 420px;
        opacity: 1;
        padding: 8px 16px 20px;
    }

    .dianle-header .dianle-header-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: auto;
    }

    .dianle-header .dianle-header-nav .dianle-item {
        color: #1f2533;
        font-size: 16px;
        padding: 15px 4px;
        height: auto;
        border-bottom: 1px solid rgba(20, 40, 90, 0.06);
    }

    .dianle-header .dianle-header-nav .dianle-item::after {
        display: none;
    }

    /* 移动端简化 mega：仅作为普通入口 */
    .dianle-nav-mega {
        display: block;
        height: auto;
    }

    .dianle-nav-caret,
    .dianle-mega-panel {
        display: none;
    }

    .dianle-header .dianle-button {
        margin-left: 0;
        gap: 12px;
        margin-top: 18px;
    }

    .dianle-header .dianle-button a {
        flex: 1;
        height: 44px;
        border-radius: 10px;
        font-size: 15px;
    }
}
