/* 全站 CMS 页面统一外壳：标题 + 公告 + 内容区间距（主内容最大宽度与首页 .cms-home-main-column 一致：1600px，见 index.css .container） */

/* 页面底色：与首页 .cms-home-page 一致（淡蓝灰光晕） */
:root {
    --cms-page-bg:
        radial-gradient(ellipse 65% 42% at 8% -8%, rgba(25, 75, 241, 0.07), transparent 55%),
        radial-gradient(ellipse 50% 38% at 95% 5%, rgba(8, 145, 178, 0.06), transparent 52%),
        radial-gradient(ellipse 45% 35% at 50% 100%, rgba(8, 145, 178, 0.05), transparent 50%),
        linear-gradient(165deg, #fafafa 0%, #f0f7ff 40%, #fffbeb 70%, #f8fafc 100%);
}

body.group-page:not(.cms-home-page) {
    background: var(--cms-page-bg);
    background-attachment: fixed;
}

.cms-page-shell {
    padding-top: 20px;
    padding-bottom: 40px;
}

.cms-page-header {
    margin-bottom: 16px;
}

.cms-page-header .cms-page-title {
    margin-bottom: 12px;
}

.cms-page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cms-page-title-row .cms-page-title {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.cms-self-publish-entry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    align-self: center;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid rgba(220, 38, 38, 0.45);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cms-self-publish-entry .fa {
    font-size: 13px;
    color: #fff !important;
    opacity: 0.95;
}

.cms-self-publish-entry:hover,
.cms-self-publish-entry:focus,
.cms-self-publish-entry:active,
.cms-self-publish-entry:visited {
    color: #fff !important;
    text-decoration: none;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

.cms-self-publish-entry--filter {
    padding: 6px 14px;
    font-size: 13px;
}

.version-library-filters .panel-title,
.cms-filter-panel .panel-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.version-library-filters .panel-title .more,
.cms-filter-panel .panel-title .more {
    margin-left: auto;
}

.cms-page-header .cms-page-title-row + .cms-section-marquee,
.cms-page-header .cms-page-title + .cms-section-marquee {
    margin-bottom: 0;
}

.cms-breadcrumb + .cms-page-header {
    margin-top: 0;
}

.cms-page-header + .cms-breadcrumb,
.cms-breadcrumb + .row,
.cms-breadcrumb + .cms-static-page__wrap,
.cms-breadcrumb + .tejia-main,
.cms-page-header + .tejia-nav,
.cms-page-header + .kami-hub-nav,
.cms-page-header + .server-hub-nav,
.cms-page-header + .panel,
.cms-page-header + .section,
.cms-page-header + .version-library-wrap,
.cms-page-header + .cms-library-filter-wrap,
.cms-page-header + .kami-grid-wrap,
.cms-page-header + .blacklist-toolbar,
.cms-page-header + .adcalc-toolbar,
.cms-page-header + .recruit-toolbar,
.cms-page-header + .websitelib-tabs,
.cms-page-header + .websitelib-panel,
.cms-page-header + .requirement-notice,
.cms-page-header + .requirement-intro,
.cms-page-header + .requirement-toolbar,
.cms-page-header + .requirement-list-wrap,
.cms-page-header + .sucai-wheel-stage,
.cms-page-header + .cms-static-page__wrap,
.cms-page-header + .tutorial-library-hero {
    margin-top: 0;
}

/* CMS 单页（关于我们 / 帮助中心等） */
.cms-static-page .cms-breadcrumb {
    margin: 0 0 14px;
}

.cms-static-page .cms-breadcrumb__list {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    border: 1.5px solid color-mix(in srgb, #2861ff 18%, #dbeafe);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.cms-static-page .cms-breadcrumb__list > li + li:before {
    color: #64748b;
    font-weight: 700;
}

.cms-static-page .cms-breadcrumb__list a {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.cms-static-page .cms-breadcrumb__list a:hover {
    color: #2861ff;
}

.cms-static-page .cms-breadcrumb__list > li:last-child,
.cms-static-page .cms-breadcrumb__list > .active {
    color: #0f172a;
    font-weight: 700;
}

.cms-static-page__wrap {
    max-width: 980px;
    margin: 0 auto;
    padding-bottom: 48px;
}

.cms-static-page__body {
    background: #fff;
    border: 1px solid #e8eef9;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.cms-static-page__body > .panel-body {
    padding: 32px 40px;
}

.cms-static-page #comments {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 767px) {
    .cms-static-page__body > .panel-body {
        padding: 20px 18px;
    }
}

.requirement-intro {
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
}

.requirement-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.requirement-list-wrap {
    background: #fff;
    border: 1px solid #e8eef9;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.requirement-list-wrap .table {
    margin-bottom: 0;
}

.requirement-notice {
    margin-bottom: 16px;
}

/* 非首页 header2：搜索条左侧快捷操作（与首页同位置） */
.header2--with-quick .n_box {
    justify-content: flex-start;
    padding-left: 20px;
    box-sizing: border-box;
    width: 100%;
}

.header2--with-quick .n_box .fr {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* 库频道 / 工具库：单行平铺 — 快捷操作 | 搜索 | 保障 | 账户按钮 */
.header2--with-trade-actions .n_box .fr {
    justify-content: flex-start;
    gap: 12px;
}

.header2--with-trade-actions .cms-header2__quick-wrap {
    flex: 0 1 auto;
    width: min(480px, 36vw);
    max-width: 480px;
    min-width: 0;
    overflow: hidden;
}

.header2--with-trade-actions .cms-header2__quick .cms-home-quick-bar {
    overflow: hidden;
    box-sizing: border-box;
}

.header2--with-trade-actions .cms-header2__quick .cms-home-quick-bar__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.header2--with-trade-actions .cms-header2__quick .cms-home-quick-bar__cell {
    padding: 4px 5px;
    font-size: 11px;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.header2--with-trade-actions .cms-header2__quick .cms-home-quick-bar__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header2--with-trade-actions .cms-header2__quick .cms-home-quick-bar__icon {
    width: 20px;
    height: 20px;
    font-size: 11px;
    flex-shrink: 0;
}

.header2--with-trade-actions .cms-home-header2__col {
    flex: 1 1 180px;
    min-width: 160px;
    max-width: none;
}

.header2--with-trade-actions .search_box {
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    box-sizing: border-box;
}

.header2--with-trade-actions .search_box .in1 {
    min-width: 0;
    flex: 1 1 0;
}

.header2--with-trade-actions .search_box .btn,
.header2--with-trade-actions .search_box .search-box__image-btn {
    flex: 0 0 auto;
    flex-shrink: 0;
}

.header2--with-trade-actions .cms-home-header2__assurance-row {
    flex: 0 0 auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 0;
    justify-content: flex-end;
}

/* 库频道页：金框六边形账户/交易按钮（与首页 header2 一致） */
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions {
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    overflow: visible;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions > * {
    margin: 0;
    padding: 0;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions > * + *::before {
    display: none;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 34px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.35px;
    line-height: 34px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(180deg, #fdefb6 0%, #e8c062 42%, #b9842c 100%);
    clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.3));
    transition: transform 0.18s ease, filter 0.18s ease;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item::after,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user-toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 6px rgba(0, 0, 0, 0.22);
    z-index: 0;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__label,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__avatar,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__uname,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user-toggle .caret {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item:hover,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item:focus,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user-toggle:hover,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user-toggle:focus {
    color: #fff;
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.4)) brightness(1.06);
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item--placeholder::after {
    background: linear-gradient(180deg, #ff8fc1 0%, #ec4899 55%, #c81e6b 100%);
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item--trade::after {
    background: linear-gradient(180deg, #ffc061 0%, #f97316 55%, #d35400 100%);
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item--register::after,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__item--login::after,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user-toggle::after {
    background: linear-gradient(180deg, #5b8cff 0%, #1d4ed8 55%, #1336a8 100%);
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user {
    overflow: visible;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user:hover,
.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__user.open {
    z-index: 1100;
}

.header2--with-trade-actions .cms-header2__trade-actions .nav-top-actions__menu {
    z-index: 1100;
}

.header2--with-trade-actions .header2 {
    overflow: visible;
}

.cms-header2__quick-wrap {
    flex: 0 0 auto;
    width: min(580px, 100%);
    max-width: 580px;
    min-width: 0;
    overflow: hidden;
}

.cms-header2__quick {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.cms-header2__quick .cms-home-quick-bar {
    margin: 0;
    padding: 7px 8px 8px;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 12px 32px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cms-header2__quick .cms-home-quick-bar__head {
    margin-bottom: 5px;
    padding-bottom: 5px;
    gap: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.cms-header2__quick .cms-home-quick-bar__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.95);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
}

.cms-header2__quick .cms-home-quick-bar__hint {
    font-size: 10px;
    color: rgba(226, 232, 240, 0.75);
}

.cms-header2__quick .cms-home-quick-bar__grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cms-header2__quick .cms-home-quick-bar__cell {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 5px 6px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.03em;
    /* 配色由 cms-channel-theme.css 统一注入 */
}

.cms-header2__quick .cms-home-quick-bar__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.cms-header2__quick .cms-home-quick-bar__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}

.header2--with-quick .gping {
    flex-shrink: 0;
    align-self: center;
}

.header2--with-quick .gping .item {
    padding: 0 16px;
}

.header2--with-quick .cms-home-header2__col {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
}

/* 单行平铺页（库频道/工具库）由 .header2--with-trade-actions 规则接管，避免固定 340px 搜索框留白 */
.header2--with-quick:not(.header2--with-trade-actions) .search_box {
    width: 340px;
    max-width: 340px;
    flex-shrink: 0;
}

.header2--with-trade-actions.header2--with-quick .cms-home-header2__col {
    flex: 1 1 0;
    min-width: 160px;
    max-width: none;
}

.header2--with-trade-actions.header2--with-quick .search_box {
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .header2--with-quick .n_box {
        padding-left: 0;
        justify-content: center;
    }

    .header2--with-quick .n_box .fr {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header2--with-trade-actions .n_box .fr {
        width: 100%;
    }

    .cms-header2__quick-wrap {
        flex: 1 1 100%;
        max-width: none;
    }

    .cms-header2__quick .cms-home-quick-bar__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cms-header2__quick .cms-home-quick-bar__cell {
        font-size: 12px;
        padding: 6px 8px;
    }

    .header2--with-quick .gping {
        margin-left: 0;
    }
}
