/* ==========================================================
   开放平台 / API 技术对接（platform.html）
   依赖：base.css + newnewindex.css（复用首页头部、按钮、标题、字体与变量）
   ========================================================== */

/* ---------------- Hero（纯样式大图区） ---------------- */

.jt-api-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 64px;
    background:
        radial-gradient(ellipse at 80% 28%, #173e85 0%, rgba(23, 62, 133, 0) 44%),
        linear-gradient(115deg, #09162e 0%, #10264d 58%, #142e61 100%);
    color: #fff;
}

.jt-api-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 58px 58px;
    -webkit-mask-image: radial-gradient(circle at 32% 38%, #000 24%, transparent 76%);
    mask-image: radial-gradient(circle at 32% 38%, #000 24%, transparent 76%);
    pointer-events: none;
}

.jt-api-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    align-items: center;
    gap: 56px;
    min-height: 430px;
}

.jt-api-hero-copy h1 {
    margin: 22px 0 20px;
    font-size: 54px;
    line-height: 1.16;
    letter-spacing: -2.5px;
    font-weight: 900;
}

.jt-api-hero-copy h1 em {
    display: block;
    font-style: normal;
    font-size: 30px;
    letter-spacing: -.5px;
    color: #7ba7ff;
    margin-top: 10px;
}

.jt-api-hero-lead {
    max-width: 540px;
    margin: 0;
    color: #b5c5e2;
    font-size: 15px;
    line-height: 1.95;
}

.jt-api-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.jt-api-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.jt-api-trust span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #a9bcdd;
}

.jt-api-trust b {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(120, 165, 255, .16);
    color: #8fb6ff;
    font-size: 11px;
    font-weight: 600;
}

/* 代码卡片 */

.jt-api-hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.jt-code-card {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 430px;
    border-radius: 16px;
    background: #0e1c35;
    border: 1px solid rgba(139, 178, 255, .18);
    box-shadow: 0 30px 80px rgba(2, 11, 31, .55);
    overflow: hidden;
}

.jt-code-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 16px;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(139, 178, 255, .12);
}

.jt-code-head i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34496d;
}

.jt-code-head i:first-child {
    background: #f2777a;
}

.jt-code-head i:nth-child(2) {
    background: #f2c14f;
}

.jt-code-head i:nth-child(3) {
    background: #64c08a;
}

.jt-code-head span {
    margin-left: 8px;
    font-size: 11px;
    color: #7f93b5;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.jt-code-body {
    margin: 0;
    padding: 18px 20px 14px;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.95;
    color: #9fbcf0;
    white-space: pre;
    overflow-x: auto;
}

.jt-code-body b {
    color: #68c9a0;
    font-weight: 400;
}

.jt-code-body i {
    color: #60728f;
    font-style: normal;
}

.jt-code-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(139, 178, 255, .1);
    font-size: 11px;
    color: #6f84a8;
}

.jt-code-ok {
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(41, 188, 131, .14);
    color: #4fd39c;
    transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s ease;
}

.jt-code-ok.is-pop {
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(79, 211, 156, .5);
}

/* 逐字键入效果：字符串着色 + 闪烁光标 */
.jt-code-str {
    color: #7fb0ff;
}

.jt-code-caret {
    display: inline-block;
    width: 7px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -0.18em;
    border-radius: 1px;
    background: #6f9dff;
    box-shadow: 0 0 12px rgba(111, 157, 255, .8);
    animation: jtCaret 1s steps(1, end) infinite;
}

.jt-code-body.is-typing .jt-code-caret {
    animation-duration: .62s;
}

/* 键入结束：光标继续闪烁，模拟编辑器等待输入 */
.jt-code-body.is-done .jt-code-caret {
    animation-duration: 1s;
}

@keyframes jtCaret {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jt-code-caret {
        display: none;
    }
}

.jt-api-float {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border-radius: 12px;
    background: #fff;
    color: #1b2a45;
    box-shadow: 0 16px 42px rgba(2, 11, 31, .38);
}

.jt-api-float b,
.jt-api-float small {
    display: block;
}

.jt-api-float b {
    font-size: 11px;
}

.jt-api-float small {
    margin-top: 4px;
    font-size: 10px;
    color: #8b98ad;
}

.jt-api-float i {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eaf1ff;
    color: #3975f4;
    font-style: normal;
    font-size: 13px;
}

.jt-api-float i.green {
    background: #e7f9f1;
    color: #25a978;
}

.jt-api-float-a {
    top: -18px;
    right: -8px;
}

.jt-api-float-b {
    bottom: -20px;
    left: -8px;
}

.jt-api-hero-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 52px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 11px;
    color: #8095b9;
}

/* ---------------- 能力特性 ---------------- */

.jt-api-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.jt-api-feature {
    padding: 26px 24px;
    border: 1px solid #eef2f9;
    border-radius: 16px;
    background: #fff;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.jt-api-feature:hover {
    transform: translateY(-5px);
    border-color: #d9e5ff;
    box-shadow: 0 18px 50px rgba(23, 55, 111, .10);
}

.jt-api-feature-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eef4ff;
    color: #3975f4;
    font-size: 19px;
}

.jt-api-feature h3 {
    margin: 18px 0 9px;
    font-size: 16px;
    font-weight: 700;
    color: #1a2740;
}

.jt-api-feature p {
    margin: 0;
    font-size: 12px;
    line-height: 1.85;
    color: #7c899e;
}

/* ---------------- 接口清单 ---------------- */

.jt-api-section {
    background: #f5f8fd;
}

.jt-api-section .jt-heading > p {
    max-width: 660px;
}

.jt-api-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.jt-api-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px solid #eef2f9;
    border-radius: 16px;
    background: #fff;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.jt-api-card:hover {
    transform: translateY(-5px);
    border-color: #d9e5ff;
    box-shadow: 0 18px 50px rgba(23, 55, 111, .10);
}

.jt-api-card-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    padding: 8px;
    border-radius: 14px;
    background: #f2f6ff;
    object-fit: contain;
}

.jt-api-card-body {
    min-width: 0;
    flex: 1;
}

.jt-api-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2740;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jt-api-card-title span {
    flex: 0 0 auto;
    font-size: 13px;
    color: #3975f4;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s, transform .2s;
}

.jt-api-card:hover .jt-api-card-title span {
    opacity: 1;
    transform: translateX(0);
}

.jt-api-card-desc {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.7;
    color: #8793a7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jt-api-note {
    margin: 34px 0 0;
    text-align: center;
    font-size: 11px;
    color: #9aa6b8;
}

/* ---------------- 接入方式 ---------------- */

.jt-api-step-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.jt-api-step {
    position: relative;
    padding: 26px 24px 24px;
    border: 1px solid #eef2f9;
    border-radius: 16px;
    background: #fff;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.jt-api-step:hover {
    transform: translateY(-5px);
    border-color: #d9e5ff;
    box-shadow: 0 18px 50px rgba(23, 55, 111, .10);
}

.jt-api-step-no {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #b9c4d6;
}

.jt-api-step h3 {
    margin: 14px 0 9px;
    font-size: 16px;
    font-weight: 700;
    color: #1a2740;
}

.jt-api-step p {
    margin: 0;
    font-size: 12px;
    line-height: 1.85;
    color: #7c899e;
}

.jt-api-step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.jt-api-step-tags span {
    padding: 5px 10px;
    border-radius: 20px;
    background: #f2f6ff;
    color: #5b79ad;
    font-size: 11px;
}

/* ---------------- 对接优势对比 ---------------- */

.jt-api-compare {
    background: #f5f8fd;
}

.jt-compare-grid {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    align-items: center;
    gap: 0;
}

.jt-compare-col {
    padding: 30px 30px 26px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eef2f9;
}

.jt-compare-col h3 {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: #1a2740;
}

.jt-compare-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jt-compare-col li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    font-size: 13px;
    color: #6d7890;
    border-top: 1px solid #f1f5fb;
}

.jt-compare-col li:first-child {
    border-top: 0;
}

.jt-compare-col li i {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-style: normal;
    font-size: 11px;
}

.jt-compare-col.bad li i {
    background: #f4f6fa;
    color: #97a3b7;
}

.jt-compare-col.good {
    border-color: #d8e6ff;
    box-shadow: 0 18px 46px rgba(23, 55, 111, .10);
}

.jt-compare-col.good li {
    color: #33415c;
}

.jt-compare-col.good li i {
    background: #e8f8f1;
    color: #1fa878;
}

.jt-compare-arrow {
    text-align: center;
    font-size: 22px;
    color: #b9cbe8;
}

/* ---------------- 常见问题 ---------------- */

.jt-faq-list {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid #e9eef7;
}

.jt-faq {
    border-bottom: 1px solid #e9eef7;
}

.jt-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 4px;
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    font-weight: 600;
    color: #1a2740;
}

.jt-faq summary::-webkit-details-marker {
    display: none;
}

.jt-faq summary i {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.jt-faq summary i::before,
.jt-faq summary i::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 1.5px;
    border-radius: 2px;
    background: #8b98ad;
    transform: translate(-50%, -50%);
    transition: transform .25s;
}

.jt-faq summary i::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.jt-faq[open] summary i::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.jt-faq[open] summary {
    color: #2764f5;
}

.jt-faq-body {
    padding: 0 4px 22px;
    font-size: 13px;
    line-height: 1.95;
    color: #7c899e;
}

/* ---------------- 底部转化 ---------------- */

.jt-api-cta {
    position: relative;
    overflow: hidden;
    padding: 62px 0;
    background: linear-gradient(110deg, #2459dc, #3478ff);
    color: #fff;
}

.jt-api-cta::after {
    content: "";
    position: absolute;
    right: 6%;
    top: -240px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255, 255, 255, .05), 0 0 0 78px rgba(255, 255, 255, .04);
}

.jt-api-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.jt-api-cta h2 {
    margin: 14px 0 10px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.jt-api-cta p {
    margin: 0;
    font-size: 13px;
    color: #dae6ff;
}

.jt-api-cta .jt-tag {
    background: rgba(255, 255, 255, .16);
    color: #eaf1ff;
}

.jt-api-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.jt-api-cta .jt-btn-white {
    background: #fff;
    color: #2459df;
    box-shadow: 0 10px 26px rgba(9, 30, 80, .18);
}

.jt-api-cta .jt-btn-white:hover {
    color: #1a49c4;
    box-shadow: 0 14px 32px rgba(9, 30, 80, .26);
}

/* ---------------- 接口支持的活动 ---------------- */

.jt-act {
    margin-top: 40px;
    padding: 26px 26px 24px;
    border: 1px solid #eef2f9;
    border-radius: 18px;
    background: #fff;
}

.jt-act-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.jt-act-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #14213b;
}

.jt-act-head p {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.8;
    color: #8793a7;
}

.jt-act-total {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f2f6ff;
    font-size: 12px;
    color: #3975f4;
    white-space: nowrap;
}

.jt-act-total b {
    font-size: 14px;
    font-weight: 700;
}

/* 平台切换 */

.jt-act-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #eef2f9;
}

.jt-act-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid #e9eef7;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #55627a;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s, box-shadow .18s;
}

.jt-act-tab:hover {
    border-color: #c9dbff;
    color: #2563f5;
}

.jt-act-tab i {
    font-style: normal;
    font-size: 11px;
    color: #9aa6b8;
    transition: color .18s;
}

.jt-act-tab.is-on {
    border-color: #2563f5;
    background: #2563f5;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 245, .22);
}

.jt-act-tab.is-on i {
    color: rgba(255, 255, 255, .78);
}

/* 子分类 */

.jt-act-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 4px;
}

.jt-act-sub:empty {
    display: none;
}

.jt-act-chip {
    padding: 5px 12px;
    border: 1px solid #e9eef7;
    border-radius: 8px;
    background: #fafbfe;
    font-size: 12px;
    color: #6d7890;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}

.jt-act-chip:hover {
    border-color: #c9dbff;
    color: #2563f5;
}

.jt-act-chip.is-on {
    border-color: #bcd3ff;
    background: #eef4ff;
    color: #2563f5;
    font-weight: 600;
}

/* 活动列表 */

.jt-act-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.jt-act-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #f0f3f9;
    border-radius: 12px;
    background: #fbfcff;
    transition: border-color .18s, background .18s;
}

.jt-act-item:hover {
    border-color: #dbe6fb;
    background: #f6f9ff;
}

.jt-act-item img {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: contain;
}

.jt-act-item-main {
    min-width: 0;
    flex: 1;
}

.jt-act-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #28354e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jt-act-item-meta {
    display: flex;
    gap: 10px;
    margin-top: 3px;
    font-size: 11.5px;
    color: #98a4b8;
    overflow: hidden;
    white-space: nowrap;
}

.jt-act-item-meta b {
    font-weight: 600;
    color: #2563f5;
}

.jt-act-state {
    grid-column: 1 / -1;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
    color: #98a4b8;
}

.jt-act-more[hidden] {
    display: none;
}

.jt-act-more {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 11px 0;
    border: 1px solid #e9eef7;
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
    color: #55627a;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}

.jt-act-more:hover {
    border-color: #c9dbff;
    background: #f6f9ff;
    color: #2563f5;
}

.jt-act-more span {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    transition: transform .2s;
}

.jt-act-more.is-open span {
    transform: rotate(180deg);
}

.jt-act-tip {
    margin: 16px 0 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: #9aa6b8;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1240px) {
    .jt-api-hero-copy h1 {
        font-size: 46px;
    }

    .jt-api-hero-copy h1 em {
        font-size: 26px;
    }

    .jt-api-feature-grid,
    .jt-api-step-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .jt-api-hero {
        padding: 60px 0 54px;
    }

    .jt-api-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        min-height: 0;
    }

    .jt-api-hero-visual {
        min-height: 0;
        padding: 10px 0;
    }

    .jt-api-hero-foot {
        margin-top: 34px;
    }

    .jt-api-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .jt-act-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jt-compare-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .jt-compare-arrow {
        transform: rotate(90deg);
    }

    .jt-api-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .jt-api-hero {
        padding: 46px 0 44px;
    }

    .jt-api-hero-copy h1 {
        font-size: 34px;
        letter-spacing: -1px;
    }

    .jt-api-hero-copy h1 em {
        font-size: 20px;
    }

    .jt-api-hero-lead {
        font-size: 13px;
    }

    .jt-api-trust {
        gap: 14px;
    }

    .jt-api-float {
        display: none;
    }

    .jt-code-body {
        font-size: 11px;
        padding: 14px 16px 10px;
    }

    .jt-api-feature-grid,
    .jt-api-step-grid,
    .jt-api-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .jt-api-feature,
    .jt-api-step {
        padding: 20px;
    }

    .jt-api-card {
        padding: 18px;
    }

    .jt-api-card-desc {
        white-space: normal;
    }

    .jt-act {
        padding: 20px 16px;
    }

    .jt-act-head {
        flex-direction: column;
        gap: 10px;
    }

    .jt-act-head h3 {
        font-size: 16px;
    }

    .jt-act-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .jt-compare-col {
        padding: 22px 20px;
    }

    .jt-faq summary {
        font-size: 14px;
        padding: 18px 2px;
    }

    .jt-api-cta {
        padding: 44px 0;
    }

    .jt-api-cta h2 {
        font-size: 22px;
    }
}
