/* =========================================================
   内容页现代风样式（认证指南 / 常见问题 / 联系我们）
   前置依赖：style.css、header-nav.css、font-awesome
   说明：本文件加载顺序在 style.css 之后，已覆盖旧页面内联样式。
   ========================================================= */

/* ---------- 页面骨架 ---------- */
.api-main-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 24px 24px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--dev-text);
    margin-bottom: 10px;
}

.page-header p {
    max-width: 680px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--dev-text-soft);
}

/* ---------- 通用卡片 ---------- */
.auth-section {
    background: var(--dev-surface);
    border: 1px solid var(--dev-border);
    border-radius: var(--dev-radius-lg);
    padding: 32px 34px;
    margin-bottom: 20px;
    box-shadow: var(--dev-shadow-xs);
}

.section-title {
    position: relative;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -.02em;
    color: var(--dev-text);
    margin-bottom: 18px;
    padding-left: 14px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--dev-brand), var(--dev-brand-2));
}

.auth-section > p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--dev-text-soft);
    margin-bottom: 14px;
}

/* ---------- 认证方式卡片 ---------- */
.auth-method-card {
    background: linear-gradient(135deg, #f8faff, #f4f9ff);
    border: 1px solid var(--dev-border);
    border-radius: var(--dev-radius);
    padding: 26px;
    margin: 20px 0 0;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.auth-method-card:hover {
    transform: translateY(-3px);
    border-color: #d5dff1;
    box-shadow: var(--dev-shadow-sm);
}

.auth-method-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 750;
    color: var(--dev-text);
    margin-bottom: 12px;
}

.auth-method-card h3 i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--dev-brand), #6366f1);
    box-shadow: 0 10px 20px -12px rgba(79, 70, 229, .9);
}

.auth-method-card p,
.auth-method-card li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--dev-text-soft);
}

.auth-method-card ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

.auth-method-card li {
    margin-bottom: 6px;
}

/* ---------- 步骤 ---------- */
.auth-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px dashed var(--dev-border);
}

.auth-step:last-of-type {
    border-bottom: none;
}

.auth-step-number {
    flex: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--dev-brand), #6366f1);
    box-shadow: 0 12px 22px -12px rgba(79, 70, 229, .9);
}

.auth-step-content {
    flex: 1;
    min-width: 0;
}

.auth-step-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dev-text);
    margin-bottom: 6px;
}

.auth-step-content p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--dev-text-soft);
    margin: 0;
}

/* ---------- 安全提示 ---------- */
.security-tips {
    margin-top: 20px;
    padding: 22px 24px;
    border-radius: var(--dev-radius);
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.security-tips h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15.5px;
    font-weight: 750;
    color: #92400e;
    margin-bottom: 10px;
}

.security-tips h3 i {
    color: #f59e0b;
    font-size: 16px;
}

.security-tips ul {
    margin: 0;
    padding-left: 22px;
}

.security-tips li {
    font-size: 13.5px;
    line-height: 1.8;
    color: #8a6416;
    margin-bottom: 6px;
}

/* ---------- 代码块 ---------- */
.code-example {
    margin: 16px 0;
    border-radius: var(--dev-radius);
    overflow: hidden;
    background: #0b1020;
    box-shadow: var(--dev-shadow-sm);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #cbd5e1;
    background: #131a2c;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.code-header::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}

.code-content {
    padding: 18px 20px;
    margin: 0;
    background: #0b1020;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.9;
    overflow-x: auto;
    white-space: pre;
}

/* ---------- 表格 ---------- */
.table-container {
    overflow-x: auto;
    margin: 18px 0;
    border: 1px solid var(--dev-border);
    border-radius: var(--dev-radius);
}

.auth-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.auth-table th {
    padding: 13px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #4b5b75;
    background: var(--dev-soft);
    border-bottom: 1px solid var(--dev-border);
    white-space: nowrap;
}

.auth-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--dev-text);
    border-bottom: 1px solid var(--dev-border);
    vertical-align: top;
}

.auth-table tbody tr:last-child td {
    border-bottom: none;
}

.auth-table tbody tr:hover {
    background: #f8fafd;
}

/* ---------- 内容通用排版 ---------- */
.api-main-content a {
    color: var(--dev-brand);
    font-weight: 600;
    text-decoration: none;
}

.api-main-content a:hover {
    text-decoration: underline;
}

.api-main-content code {
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--dev-soft);
    color: #4b5b75;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

/* =========================================================
   常见问题
   ========================================================= */
.faq-search {
    position: relative;
    max-width: 620px;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 46px 0 18px;
    border-radius: 999px;
    border: 1px solid var(--dev-border);
    background: var(--dev-surface);
    font-size: 14px;
    color: var(--dev-text);
    outline: none;
    box-shadow: var(--dev-shadow-xs);
    transition: border-color .25s, box-shadow .25s;
}

.search-input::placeholder {
    color: #9aa9bf;
}

.search-input:focus {
    border-color: var(--dev-brand);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    font-size: 15px;
    color: #9aa9bf;
    pointer-events: none;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--dev-border);
    background: var(--dev-surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--dev-text-soft);
    text-decoration: none;
    transition: all .25s;
}

.quick-link:hover {
    color: var(--dev-brand);
    border-color: var(--dev-brand);
    background: #fff;
    text-decoration: none;
}

.faq-container {
    max-width: 100%;
}

.faq-category {
    margin-bottom: 14px;
    border: 1px solid var(--dev-border);
    border-radius: var(--dev-radius-lg);
    background: var(--dev-surface);
    box-shadow: var(--dev-shadow-xs);
    overflow: hidden;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -.01em;
    color: var(--dev-text);
    cursor: pointer;
    user-select: none;
    transition: background .25s;
}

.category-title:hover {
    background: #f8fafd;
}

.category-title.active {
    color: var(--dev-brand);
    background: linear-gradient(135deg, rgba(79, 70, 229, .06), rgba(6, 182, 212, .06));
}

.category-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--dev-soft);
    color: #7c8aa3;
    font-size: 11px;
    transition: transform .3s, background .3s, color .3s;
}

.category-title.active .category-icon {
    transform: rotate(180deg);
    background: var(--dev-brand);
    color: #fff;
}

.category-content {
    padding: 0 24px 8px;
    border-top: 1px solid var(--dev-border);
}

.category-content.collapsed {
    display: none;
}

.faq-item {
    border-bottom: 1px solid var(--dev-border);
    padding: 4px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    position: relative;
    padding: 15px 30px 15px 0;
    font-size: 14.5px;
    font-weight: 650;
    line-height: 1.6;
    color: var(--dev-text);
    cursor: pointer;
    transition: color .25s;
}

.faq-question::after {
    content: "\f067";
    font-family: FontAwesome;
    position: absolute;
    right: 4px;
    top: 16px;
    font-size: 12px;
    color: #9aa9bf;
    transition: transform .3s, color .3s;
}

.faq-question:hover {
    color: var(--dev-brand);
}

.faq-answer {
    display: none;
    padding: 0 30px 16px 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--dev-text-soft);
}

.faq-answer.show {
    display: block;
}

.faq-item:has(.faq-answer.show) .faq-question::after {
    content: "\f068";
    color: var(--dev-brand);
}

.no-results {
    padding: 70px 20px;
    text-align: center;
}

.no-results-icon {
    display: inline-grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--dev-soft);
    color: #a8b6cc;
    font-size: 22px;
}

.no-results-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--dev-text);
    margin-bottom: 6px;
}

.no-results-subtext {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--dev-text-soft);
}

/* =========================================================
   联系我们
   ========================================================= */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 32px 30px;
    border-radius: var(--dev-radius-xl);
    background: var(--dev-surface);
    border: 1px solid var(--dev-border);
    box-shadow: var(--dev-shadow-xs);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
}

.contact-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--dev-brand), var(--dev-brand-2), transparent);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: #d5dff1;
    box-shadow: var(--dev-shadow-md);
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 16px;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--dev-brand), var(--dev-brand-2));
    box-shadow: 0 16px 30px -16px rgba(79, 70, 229, .9);
}

.contact-type {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.015em;
    color: var(--dev-text);
    margin-bottom: 8px;
}

.contact-content {
    font-size: 15px;
    font-weight: 700;
    color: var(--dev-brand);
    margin-bottom: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.contact-description {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--dev-text-soft);
    margin-bottom: 12px;
}

.contact-time {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: var(--dev-soft);
    font-size: 12.5px;
    font-weight: 600;
    color: #5c6b83;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    margin-top: auto;
    border-radius: var(--dev-radius);
    font-size: 14px;
    font-weight: 650;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--dev-brand), #6366f1);
    box-shadow: 0 16px 30px -16px rgba(79, 70, 229, .9);
    transition: transform .28s, box-shadow .28s;
}

.contact-link:hover {
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 22px 40px -16px rgba(79, 70, 229, 1);
}

/* 覆盖 .api-main-content a 的默认链接色，保证按钮文字为白色 */
.api-main-content a.contact-link {
    color: #fff;
    text-decoration: none;
}

.api-main-content a.contact-link:hover {
    color: #fff;
    text-decoration: none;
}

/* ---------- 右侧标签导航（认证指南） ---------- */
.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 208px;
    gap: 24px;
    align-items: start;
}

.auth-body {
    min-width: 0;
}

.auth-section {
    scroll-margin-top: 88px;
}

.page-toc {
    position: sticky;
    top: 88px;
    padding: 18px 16px;
    border-radius: var(--dev-radius-lg);
    background: var(--dev-surface);
    border: 1px solid var(--dev-border);
    box-shadow: var(--dev-shadow-xs);
}

.page-toc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--dev-border);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dev-text-soft);
}

.page-toc-title i {
    color: var(--dev-brand);
    font-size: 12px;
}

.page-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    border-left: 2px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--dev-text-soft);
    text-decoration: none !important;
    transition: all .25s;
}

.toc-link:hover {
    background: var(--dev-soft);
    color: var(--dev-text);
}

.toc-dot {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background .25s, box-shadow .25s;
}

.toc-link.active {
    color: var(--dev-brand);
    border-left-color: var(--dev-brand);
    background: linear-gradient(90deg, rgba(79, 70, 229, .10), transparent);
}

.toc-link.active .toc-dot {
    background: var(--dev-brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}

@media (max-width: 1024px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .page-toc {
        display: none;
    }
}

/* ---------- 关于我们 ---------- */
.about-section {
    margin-top: 24px;
    padding: 32px 34px;
    border-radius: var(--dev-radius-lg);
    background: var(--dev-surface);
    border: 1px solid var(--dev-border);
    box-shadow: var(--dev-shadow-xs);
}

.about-section h2 {
    position: relative;
    padding-left: 14px;
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -.02em;
    color: var(--dev-text);
}

.about-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--dev-brand), var(--dev-brand-2));
}

.about-section > p {
    font-size: 14px;
    line-height: 1.85;
    color: var(--dev-text-soft);
}

.about-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.about-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: var(--dev-radius);
    background: var(--dev-soft);
}

.about-point i {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--dev-brand), var(--dev-brand-2));
    box-shadow: 0 10px 20px -12px rgba(79, 70, 229, .9);
}

.about-point strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--dev-text);
}

.about-point span {
    display: block;
    font-size: 13px;
    line-height: 1.7;
    color: var(--dev-text-soft);
}

@media (max-width: 768px) {
    .about-section {
        padding: 24px 20px;
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .api-main-content {
        padding: 24px 16px 16px;
    }

    .auth-section {
        padding: 24px 20px;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .category-title {
        padding: 16px 18px;
        font-size: 15px;
    }

    .category-content {
        padding: 0 18px 6px;
    }

    .code-content {
        font-size: 12px;
        padding: 14px 16px;
    }
}
