/* 变量与基础（夜间模式 */
:root {
    --primary: #16baaa;
    --bg: #18181b;
    --card: #27272a;
    --text: #fafafa;
    --muted: #a1a1aa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE / Edge */
}
html::-webkit-scrollbar {
    display: none; /* Chrome / Safari / Edge */
}

/* 进入网站加载动画 */
.tpl-page-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
body.tpl-loaded .tpl-page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.tpl-page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.tpl-page-loader-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tpl-page-loader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: tpl-loader-bounce 0.6s ease-in-out infinite both;
}
.tpl-page-loader-dot:nth-child(1) { animation-delay: 0s; }
.tpl-page-loader-dot:nth-child(2) { animation-delay: 0.1s; }
.tpl-page-loader-dot:nth-child(3) { animation-delay: 0.2s; }
.tpl-page-loader-text {
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.2em;
}
@keyframes tpl-loader-bounce {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50%      { transform: translateY(-12px) scale(1.2); opacity: 1; }
}

/* 跳过导航：键盘聚焦时显示 */
.tpl-skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    z-index: 10001;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 6px;
    transition: left 0.2s ease;
}
.tpl-skip-link:focus {
    left: 1rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.3s ease;
    position: relative;
}

/* 整页动态背景：底层底色 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: var(--bg);
    transition: background 0.4s ease;
}

/* 动态光晕层：缓慢浮动的光球 */
.tpl-bg-dynamic {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.tpl-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
}
.tpl-bg-orb-1 {
    width: 60vmax;
    height: 60vmax;
    left: -20%;
    top: -20%;
    background: radial-gradient(circle, rgba(22, 186, 170, 0.25) 0%, transparent 70%);
    animation: tpl-bg-float-1 22s ease-in-out infinite;
}
.tpl-bg-orb-2 {
    width: 50vmax;
    height: 50vmax;
    right: -15%;
    bottom: -10%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
    animation: tpl-bg-float-2 26s ease-in-out infinite;
}
.tpl-bg-orb-3 {
    width: 45vmax;
    height: 45vmax;
    left: 40%;
    top: 50%;
    background: radial-gradient(circle, rgba(22, 186, 170, 0.12) 0%, transparent 70%);
    animation: tpl-bg-float-3 20s ease-in-out infinite;
}
@keyframes tpl-bg-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(8%, 5%) scale(1.05); }
    66%      { transform: translate(-5%, 10%) scale(0.98); }
}
@keyframes tpl-bg-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-10%, -8%) scale(1.08); }
    66%      { transform: translate(5%, -5%) scale(0.95); }
}
@keyframes tpl-bg-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-8%, -12%) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
    .tpl-bg-orb {
        animation: none;
    }
}

/* 日间主题（切换后生效） */
body.theme-light {
    --bg: #f0f2f5;
    --card: #fff;
    --text: #1f2329;
    --muted: #8f959e;
}
body.theme-light .tpl-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.theme-light .tpl-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* 日间主题：动态光球颜色略淡 */
body.theme-light .tpl-bg-orb-1 {
    background: radial-gradient(circle, rgba(22, 186, 170, 0.12) 0%, transparent 70%);
    opacity: 0.7;
}
body.theme-light .tpl-bg-orb-2 {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    opacity: 0.6;
}
body.theme-light .tpl-bg-orb-3 {
    background: radial-gradient(circle, rgba(22, 186, 170, 0.06) 0%, transparent 70%);
    opacity: 0.6;
}

/* 主题切换提示 */
.tpl-theme-toast {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%) translateY(20px);
    padding: 0.5rem 1rem;
    background: var(--card);
    color: var(--text);
    font-size: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}
.tpl-theme-toast.is-show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 头部导航 */
.tpl-header {
    background: var(--card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tpl-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
}
.tpl-nav-wrap {
    display: flex;
    align-items: center;
}
.tpl-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
/* 移动端：汉堡按钮默认隐藏 */
.tpl-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.tpl-nav-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.tpl-nav-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
body.theme-light .tpl-nav-toggle {
    border-color: rgba(0, 0, 0, 0.12);
}

.tpl-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.tpl-logo-img {
    display: block;
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* 双 logo：默认夜间主题显示 logo-dark */
.tpl-logo-day {
    display: none;
}
.tpl-logo-dark {
    display: block;
}
body.theme-light .tpl-logo-day {
    display: block;
}
body.theme-light .tpl-logo-dark {
    display: none;
}

.tpl-logo-text {
    color: inherit;
}

.tpl-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.tpl-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--muted);
    text-decoration: none;
    padding-bottom: 0.25rem;
    transition: color 0.25s ease;
}
.tpl-nav a .fa {
    font-size: 1em;
}
.tpl-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-nav a:hover {
    color: var(--primary);
}
.tpl-nav a:hover::after {
    transform: scaleX(1);
}
.tpl-nav a.is-current {
    color: var(--primary);
    font-weight: 600;
}
.tpl-nav a.is-current::after {
    transform: scaleX(1);
}
.tpl-nav a:focus-visible {
    color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}
.tpl-nav a:focus-visible::after {
    transform: scaleX(1);
}

.tpl-stats {
    font-size: 0.9rem;
    color: var(--muted);
}

/* 简繁切换按钮（与主题按钮同款尺寸） */
.tpl-zh-tw {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
body.theme-light .tpl-zh-tw {
    border-color: rgba(0, 0, 0, 0.12);
}
.tpl-zh-tw:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.tpl-zh-tw:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    color: var(--primary);
    border-color: var(--primary);
}

.tpl-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s;
}
body.theme-light .tpl-theme-toggle {
    border-color: rgba(0, 0, 0, 0.12);
}
.tpl-theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.tpl-theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    color: var(--primary);
    border-color: var(--primary);
}
.tpl-theme-toggle .tpl-theme-icon {
    transition: opacity 0.25s ease;
}
/* 夜间模式：只显示月亮 */
.tpl-theme-toggle .tpl-theme-icon-sun {
    display: none !important;
}
.tpl-theme-toggle .tpl-theme-icon-moon {
    display: inline-block !important;
}
/* 日间模式：只显示太阳 */
body.theme-light .tpl-theme-toggle .tpl-theme-icon-sun {
    display: inline-block !important;
}
body.theme-light .tpl-theme-toggle .tpl-theme-icon-moon {
    display: none !important;
}

/* 移动端导航 */
@media (max-width: 768px) {
    .tpl-header {
        position: relative;
    }
    .tpl-header-inner {
        padding: 0.75rem 1rem;
    }
    .tpl-logo-img {
        max-height: 36px;
    }
    .tpl-logo-text {
        font-size: 1.15rem;
    }
    .tpl-nav-toggle {
        display: inline-flex;
        flex-shrink: 0;
    }
    .tpl-nav-wrap {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: 40%;
        min-width: 160px;
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        background: var(--card);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: max-height 0.3s ease;
    }
    body.theme-light .tpl-nav-wrap {
        border-bottom-color: rgba(0, 0, 0, 0.06);
        border-left-color: rgba(0, 0, 0, 0.08);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
    }
    body.tpl-nav-open .tpl-nav-wrap {
        max-height: 80vh;
    }
    .tpl-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0;
    }
    .tpl-nav a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.9rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 1rem;
    }
    body.theme-light .tpl-nav a {
        border-bottom-color: rgba(0, 0, 0, 0.06);
    }
    .tpl-nav a:last-of-type {
        border-bottom: none;
    }
    .tpl-nav a .fa {
        width: 1.25em;
        text-align: center;
        font-size: 1.1em;
    }
    .tpl-nav a::after {
        display: none;
    }
    /* 汉堡打开时显示关闭图标 */
    body.tpl-nav-open .tpl-nav-toggle .fa-bars {
        display: none;
    }
    body.tpl-nav-open .tpl-nav-toggle .fa-times {
        display: block !important;
    }
    .tpl-nav-toggle .fa-times {
        display: none;
    }
}

/* 主容器与底部 */
.tpl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 768px) {
    .tpl-container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.tpl-footer {
    /* margin-top: 3rem; */
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}
.tpl-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 1.75rem;
}
.tpl-footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tpl-footer-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.02em;
    padding-bottom: 0.25rem;
    transition: color 0.2s, opacity 0.2s;
}
.tpl-footer-brand::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-footer-brand:hover {
    opacity: 0.9;
}
.tpl-footer-brand:hover::after {
    transform: scaleX(1);
}
.tpl-footer-brand .tpl-logo-img {
    max-height: 28px;
    width: auto;
}
.tpl-footer-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem 1rem;
}
.tpl-footer-nav a {
    position: relative;
    color: var(--muted);
    font-size: 0.875rem;
    text-decoration: none;
    padding-bottom: 0.25rem;
    transition: color 0.2s;
}
.tpl-footer-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-footer-nav a:hover {
    color: var(--primary);
}
.tpl-footer-nav a:hover::after {
    transform: scaleX(1);
}
.tpl-footer-dot {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    user-select: none;
}
.tpl-footer-bottom {
    font-size: 0.8rem;
    line-height: 1.85;
    color: var(--muted);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.tpl-icp-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0 1rem;
}
.tpl-icp-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.tpl-icp-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}
.tpl-footer-bottom a {
    position: relative;
    color: var(--primary);
    text-decoration: none;
    padding-bottom: 0.2rem;
    transition: color 0.2s;
}
.tpl-footer-bottom a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-footer-bottom a:hover::after {
    transform: scaleX(1);
}
body.theme-light .tpl-footer-top {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.theme-light .tpl-footer-dot {
    color: rgba(0, 0, 0, 0.25);
}
@media (max-width: 768px) {
    .tpl-footer-inner {
        padding: 1.25rem 8px 1.5rem;
    }
    .tpl-footer-top {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    .tpl-footer-brand {
        display: none;
    }
    .tpl-footer-bottom {
        font-size: 0.75rem;
        line-height: 1.75;
    }
}

/* 关于我们弹窗 */
.tpl-footer-about-btn {
    cursor: pointer;
}
.tpl-about-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.tpl-about-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.tpl-about-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.tpl-about-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.tpl-about-modal.is-open .tpl-about-box {
    transform: scale(1);
}
body.theme-light .tpl-about-box {
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.tpl-about-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
}
body.theme-light .tpl-about-head {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}
.tpl-about-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}
.tpl-about-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s, transform 0.15s;
}
.tpl-about-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}
.tpl-about-close:active {
    transform: scale(0.98);
}
body.theme-light .tpl-about-close:hover {
    background: rgba(0, 0, 0, 0.06);
}
.tpl-about-body {
    padding: 1.5rem;
    overflow-y: auto;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.75;
}
.tpl-about-body::-webkit-scrollbar {
    width: 6px;
}
.tpl-about-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
body.theme-light .tpl-about-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
.tpl-about-body h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}
.tpl-about-body p {
    margin: 0 0 0.75rem;
}
.tpl-about-body p:last-child {
    margin-bottom: 0;
}
.tpl-about-body a {
    position: relative;
    color: var(--primary);
    text-decoration: none;
}
.tpl-about-body a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-about-body a:hover::after {
    transform: scaleX(1);
}
@media (max-width: 768px) {
    .tpl-about-modal {
        padding: 0.75rem;
    }
    .tpl-about-box {
        max-height: 80vh;
        border-radius: 14px;
    }
    .tpl-about-head {
        padding: 1rem 1.25rem;
    }
    .tpl-about-body {
        padding: 1.25rem;
    }
}

/* 公告弹窗 */
.tpl-gg-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.tpl-gg-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.tpl-gg-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.tpl-gg-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.tpl-gg-modal.is-open .tpl-gg-box {
    transform: scale(1);
}
body.theme-light .tpl-gg-box {
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.tpl-gg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
}
body.theme-light .tpl-gg-head {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}
.tpl-gg-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.tpl-gg-title-icon {
    font-size: 1.05em;
    color: var(--primary);
    opacity: 0.95;
}
.tpl-gg-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s, transform 0.15s;
}
.tpl-gg-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}
.tpl-gg-close:active {
    transform: scale(0.98);
}
body.theme-light .tpl-gg-close:hover {
    background: rgba(0, 0, 0, 0.06);
}
.tpl-gg-body {
    padding: 1.25rem 1.5rem 1.5rem;
    overflow-y: auto;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.tpl-gg-body > div,
.tpl-gg-body [style] {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    border: none !important;
    box-shadow: none !important;
    max-width: none !important;
}
.tpl-gg-body > *:first-child {
    margin-top: 0 !important;
}
.tpl-gg-body p {
    margin: 0 0 0.625rem;
    text-indent: 0;
}
.tpl-gg-body p:last-child {
    margin-bottom: 0;
}
.tpl-gg-body a {
    position: relative;
    color: var(--primary);
    text-decoration: none;
}
.tpl-gg-body a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-gg-body a:hover::after {
    transform: scaleX(1);
}
.tpl-gg-body::-webkit-scrollbar {
    width: 6px;
}
.tpl-gg-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
body.theme-light .tpl-gg-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
    .tpl-gg-modal {
        padding: 0.75rem;
    }
    .tpl-gg-box {
        max-height: 80vh;
        border-radius: 14px;
    }
    .tpl-gg-head {
        padding: 1rem 1.25rem;
    }
    .tpl-gg-body {
        padding: 1.25rem;
    }
}

/* 侧边快捷按钮 */
.tpl-side-btns {
    position: fixed;
    right: 1.25rem;
    bottom: 5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.tpl-side-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.25s, visibility 0.25s;
    text-decoration: none;
    font-size: 1rem;
}
.tpl-side-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: var(--primary);
}
.tpl-side-btn:active {
    transform: scale(0.98);
}
.tpl-side-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.tpl-back-top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.tpl-back-top.is-visible,
.tpl-back-bottom.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.tpl-back-bottom {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.theme-light .tpl-side-btn {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
body.theme-light .tpl-side-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
    .tpl-side-btns {
        right: 0.75rem;
        bottom: 4rem;
    }
    .tpl-side-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* 打赏弹窗 - 简洁版 */
.tpl-reward-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.tpl-reward-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.tpl-reward-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.tpl-reward-box {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border-radius: 24px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.98);
    transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.tpl-reward-modal.is-open .tpl-reward-box {
    transform: scale(1);
}
body.theme-light .tpl-reward-box {
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18);
}
.tpl-reward-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    flex-shrink: 0;
}
.tpl-reward-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.tpl-reward-title-icon {
    font-size: 1em;
    color: var(--primary);
}
.tpl-reward-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.tpl-reward-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
body.theme-light .tpl-reward-close:hover {
    background: rgba(0, 0, 0, 0.06);
}
.tpl-reward-body {
    padding: 0 1.5rem 1.5rem;
}
/* 分段式 Tab */
.tpl-reward-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 1.5rem;
}
body.theme-light .tpl-reward-tabs {
    background: rgba(0, 0, 0, 0.06);
}
.tpl-reward-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 0 0.5rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease;
}
.tpl-reward-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}
body.theme-light .tpl-reward-tab:hover {
    background: rgba(0, 0, 0, 0.06);
}
.tpl-reward-tab.is-active {
    background: var(--card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
body.theme-light .tpl-reward-tab.is-active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tpl-reward-tab-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
}
.tpl-reward-tab.is-active .tpl-reward-tab-icon {
    opacity: 1;
}
.tpl-reward-panels {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tpl-reward-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.tpl-reward-panel.is-active {
    display: flex;
}
.tpl-reward-panel.is-active .tpl-reward-qr-wrap {
    animation: tpl-reward-fade 0.25s ease;
}
@keyframes tpl-reward-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tpl-reward-qr-wrap {
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
body.theme-light .tpl-reward-qr-wrap {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.tpl-reward-qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
}
.tpl-reward-qr-label {
    font-size: 0.8125rem;
    color: var(--muted);
}
@media (max-width: 768px) {
    .tpl-reward-modal {
        padding: 1rem;
    }
    .tpl-reward-box {
        max-width: 100%;
        border-radius: 20px;
    }
    .tpl-reward-tab {
        min-height: 64px;
    }
    .tpl-reward-tab-icon {
        width: 72px;
        height: 72px;
    }
    .tpl-reward-qr-img {
        width: 180px;
        height: 180px;
    }
    .tpl-reward-qr-wrap {
        padding: 1.25rem;
    }
}

/* ========== 友情链接页（link.html）========== */
.link-page { 
    max-width: 1200px; 
    margin: 0 auto; 
    /* padding: 2rem 1rem 3rem; */
 }
.link-hero {
    text-align: center;
    margin-bottom: 1rem;
    background: var(--card);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.4rem 1.6rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
body.theme-light .link-hero {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.link-hero-title { font-size: 1.75rem; font-weight: 700; color: var(--text); margin: 0 0 0.5rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.link-hero-title .fa { color: var(--primary); }
.link-hero-desc { font-size: 0.9375rem; color: var(--muted); margin: 0; line-height: 1.6; max-width: 480px; margin-left: auto; margin-right: auto; }

.link-section-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.4rem 1.6rem 1.6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    margin-top: 0.5rem;
}
body.theme-light .link-section-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.link-section-title { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 0 0 1rem; display: flex; align-items: center; gap: 0.5rem; }
.link-section-title .fa { color: var(--primary); opacity: 0.9; }
.link-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 0 0 2.5rem; }
.link-card { display: block; padding: 1.25rem 1.35rem; background: var(--bg); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; text-decoration: none; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.link-card:hover { border-color: var(--primary); box-shadow: 0 10px 28px rgba(0,0,0,0.25); transform: translateY(-3px); }
body.theme-light .link-card { border-color: rgba(0,0,0,0.08); background: #fff; }
body.theme-light .link-card:hover { border-color: var(--primary); box-shadow: 0 10px 28px rgba(0,0,0,0.08); }
.link-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.link-card-ico { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.link-card-name { font-size: 1.05rem; font-weight: 600; color: var(--primary); margin: 0; }
.link-card-desc { font-size: 0.8125rem; color: var(--muted); line-height: 1.55; margin: 0; }
.link-empty { text-align: center; padding: 2.5rem 1.5rem; color: var(--muted); font-size: 0.95rem; border: 1px dashed rgba(255,255,255,0.12); border-radius: 14px; background: rgba(255,255,255,0.02); }
body.theme-light .link-empty { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.02); }
.link-empty .fa { font-size: 2.2rem; margin-bottom: 0.75rem; opacity: 0.5; display: block; }

.link-apply-wrap { background: var(--card); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1.75rem 1.5rem; margin-top: 1rem; }
body.theme-light .link-apply-wrap { background: #fff; border-color: rgba(0,0,0,0.08); }
.link-apply-title { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 0 0 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.link-apply-title .fa { color: var(--primary); }
.link-apply-form .form-row { margin-bottom: 1rem; }
.link-apply-form label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 0.4rem; }
.link-apply-form label .opt { font-weight: normal; color: var(--muted); opacity: 0.85; }
.link-apply-form input, .link-apply-form textarea { width: 100%; padding: 0.65rem 0.9rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.2); color: var(--text); font-size: 0.9375rem; outline: none; transition: border-color 0.2s; }
body.theme-light .link-apply-form input, body.theme-light .link-apply-form textarea { background: #f8f9fa; border-color: rgba(0,0,0,0.12); color: #1f2937; }
.link-apply-form input:focus, .link-apply-form textarea:focus { border-color: var(--primary); }
.link-apply-form textarea { min-height: 80px; resize: vertical; }
.link-apply-form .btn-submit { margin-top: 0.5rem; padding: 0.7rem 1.5rem; font-size: 0.9375rem; font-weight: 600; color: #fff; background: var(--primary); border: none; border-radius: 10px; cursor: pointer; transition: opacity 0.2s, transform 0.15s; }
.link-apply-form .btn-submit:hover { opacity: 0.92; transform: translateY(1px); }
.link-apply-form .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.link-captcha-row .link-captcha-wrap { display: flex; align-items: center; gap: 0.5rem; }
.link-captcha-row .link-captcha-wrap input { flex: 1; max-width: 140px; }
.link-captcha-img { height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); cursor: pointer; background: rgba(0,0,0,0.2); }
body.theme-light .link-captcha-img { border-color: rgba(0,0,0,0.12); background: #f8f9fa; }
.link-apply-msg { margin-top: 1rem; padding: 0.65rem 0.9rem; border-radius: 10px; font-size: 0.875rem; display: none; }
.link-apply-msg.show { display: block; }
.link-apply-msg.success { background: rgba(22,186,170,0.15); border: 1px solid rgba(22,186,170,0.35); color: var(--primary); }
.link-apply-msg.error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }

@media (max-width: 768px) {
    /*.link-page { padding-left: 0.75rem; padding-right: 0.75rem; }*/
    .link-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .link-apply-wrap { padding: 1.35rem 1rem; }
}
/* ========== API 文档页（api-doc-*） ========== */
.api-doc-page {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 0 0 3rem; */
}
.api-doc-hero-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.4rem 1.6rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    text-align: center;
    margin-bottom: 1rem;
}
.api-doc-hero-title {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
}
.api-doc-hero-sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}
.api-doc-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.4rem 1.6rem 1.6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    color: var(--text);
}
.api-doc-card a:not(.api-doc-copy-btn) {
    color: var(--primary);
}
.api-doc-card p code,
.api-doc-card li code {
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.88em;
    padding: 0.12em 0.38em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
}
.api-doc-card-title {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
}
.api-doc-card-sub {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.api-doc-tabs {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.4rem;
    justify-content: center;
}
.api-doc-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--muted);
    text-decoration: none;
    padding-bottom: 0.25rem;
    transition: color 0.25s ease;
}
.api-doc-tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.3rem;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.api-doc-tab:hover {
    color: var(--primary);
}
.api-doc-tab:hover::after {
    transform: scaleX(1);
}
.api-doc-tab.is-active {
    color: var(--primary);
    font-weight: 600;
}
.api-doc-tab.is-active::after {
    transform: scaleX(1);
}
.api-doc-row {
    display: flex;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.api-doc-row:first-of-type {
    border-top: none;
}
.api-doc-label {
    width: 90px;
    flex-shrink: 0;
    color: var(--muted);
}
.api-doc-value {
    flex: 1;
    color: var(--text);
}
.api-doc-text-blue {
    color: #16a34a;
}
.api-doc-text-orange {
    color: #f97316;
}
.api-doc-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.api-doc-tag--free {
    background: #ecfdf5;
    color: #15803d;
    border-color: #bbf7d0;
}
.api-doc-tag--paid {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}
.api-doc-tag--maint {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fdba74;
}
.api-doc-tag--off {
    background: rgba(113, 113, 122, 0.15);
    color: #71717a;
    border-color: rgba(113, 113, 122, 0.25);
}
.api-doc-maint-banner {
    margin: 0 0 1rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.15), rgba(251, 191, 36, 0.12));
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #ea580c;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
}
body.theme-light .api-doc-maint-banner {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}
.api-doc-url {
    display: inline-block;
    padding: 0.35rem 0.5rem;
    background: transparent;
    border-radius: 4px;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.85rem;
    color: #2563eb;
}
.api-doc-url--green {
    color: #16a34a;
}
.api-doc-section {
    margin-top: 1.4rem;
    font-size: 0.9rem;
}
.api-doc-section-title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}
.api-doc-subtitle {
    margin: 0.6rem 0 0.3rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.api-doc-subtitle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.6rem 0 0.3rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.api-doc-lang-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.api-doc-lang-chip {
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: var(--muted);
}
.api-doc-lang-chip.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
.api-doc-copy-btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    border: none;
    background: #3b82f6;
    color: #ffffff;
    cursor: pointer;
    margin-left: 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
a.api-doc-copy-btn,
a.api-doc-copy-btn:visited {
    color: #ffffff;
}
.api-doc-copy-btn:hover {
    background: #2563eb;
    color: #ffffff;
}
.api-doc-copy-btn--secondary {
    background: #16a34a;
}
.api-doc-copy-btn--secondary:hover {
    background: #15803d;
    color: #ffffff;
}
.api-doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.api-doc-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.api-doc-table-wrap::-webkit-scrollbar {
    height: 6px;
}
.api-doc-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.6);
    border-radius: 3px;
}
.api-doc-table th,
.api-doc-table td {
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}
.api-doc-table th {
    background: rgba(0, 0, 0, 0.25);
    color: var(--muted);
    font-weight: 500;
}
.api-doc-table td {
    color: var(--text);
}
.api-doc-table code {
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.85rem;
}
.api-doc-code {
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-family: Consolas, Menlo, Monaco, monospace;
}
.api-doc-example-rich {
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
}
.api-doc-example-rich img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.25rem 0;
    cursor: zoom-in;
}
.api-doc-back {
    margin-top: 1.4rem;
    font-size: 0.9rem;
}
.api-doc-back a {
    color: var(--primary);
    text-decoration: none;
}
.api-doc-back a:hover {
    text-decoration: underline;
}

.api-doc-debug {
    margin-top: 0.4rem;
    padding: 0.9rem 1rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
}
.api-doc-debug-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}
.api-doc-debug-label {
    width: 90px;
    flex-shrink: 0;
    color: var(--muted);
    padding-top: 0.25rem;
}
.api-doc-debug-control {
    flex: 1;
}
.api-doc-debug-input,
.api-doc-debug-select {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.88rem;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
}
.api-doc-debug-textarea {
    width: 100%;
    min-height: 68px;
    padding: 0.4rem 0.55rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.88rem;
    resize: vertical;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
}
.api-doc-debug-result-section {
    margin-top: 0.4rem;
}
.api-doc-debug-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.6rem;
}

.api-doc-debug-result-pre[hidden] {
    display: none !important;
}
.api-doc-debug-result-visual {
    margin-top: 0.35rem;
}
.api-doc-debug-result-img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: min(420px, 70vh);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    object-fit: contain;
    cursor: zoom-in;
}
.api-doc-debug-result-video {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(360px, 55vh);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #000;
}
.api-doc-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
}
.api-doc-image-lightbox[hidden] {
    display: none !important;
}
.api-doc-image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.82);
    cursor: pointer;
}
.api-doc-image-lightbox-frame {
    position: relative;
    z-index: 1;
    max-width: 96vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.api-doc-image-lightbox-img {
    display: block;
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.api-doc-debug-result-note {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

.api-doc-debug-quick {
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.api-doc-debug-quick-label {
    margin-right: 0.25rem;
}

body.theme-light .api-doc-hero-card,
body.theme-light .api-doc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
body.theme-light .api-doc-card {
    color: #1f2937;
}
body.theme-light .api-doc-card a:not(.api-doc-copy-btn) {
    color: #2563eb;
}
body.theme-light .api-doc-card p code,
body.theme-light .api-doc-card li code {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #1f2937;
}
body.theme-light .api-doc-hero-title,
body.theme-light .api-doc-card-title,
body.theme-light .api-doc-section-title {
    color: #111827;
}
body.theme-light .api-doc-hero-sub,
body.theme-light .api-doc-card-sub {
    color: #6b7280;
}
body.theme-light .api-doc-tabs {
    border-bottom-color: rgba(148, 163, 184, 0.45);
}
body.theme-light .api-doc-row {
    border-top-color: #edf2f7;
}
body.theme-light .api-doc-label {
    color: #6b7280;
}
body.theme-light .api-doc-value {
    color: #111827;
}
body.theme-light .api-doc-subtitle,
body.theme-light .api-doc-subtitle-row {
    color: #4b5563;
}
body.theme-light .api-doc-lang-chip {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
}
body.theme-light .api-doc-lang-chip.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
body.theme-light .api-doc-table th,
body.theme-light .api-doc-table td {
    border-color: #e5e7eb;
}
body.theme-light .api-doc-table th {
    background: #f9fafb;
    color: #4b5563;
}
body.theme-light .api-doc-table td {
    color: #111827;
}
body.theme-light .api-doc-code {
    background: #f9fafb;
    color: #1f2937;
    border-color: #e5e7eb;
}
body.theme-light .api-doc-example-rich {
    background: #f9fafb;
    color: #1f2937;
    border-color: #e5e7eb;
}
body.theme-light .api-doc-debug {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #1f2937;
}
body.theme-light .api-doc-debug-label {
    color: #6b7280;
}
body.theme-light .api-doc-debug-input,
body.theme-light .api-doc-debug-select,
body.theme-light .api-doc-debug-textarea {
    border-color: #d1d5db;
    background: #ffffff;
    color: #1f2937;
}
body.theme-light .api-doc-debug-quick {
    color: #6b7280;
}
body.theme-light .api-doc-image-lightbox-backdrop {
    background: rgba(15, 23, 42, 0.78);
}
body.theme-light .api-doc-debug-result-img {
    border-color: #e5e7eb;
    background: #ffffff;
}
body.theme-light .api-doc-debug-result-video {
    border-color: #e5e7eb;
}
body.theme-light .api-doc-debug-result-note {
    color: #6b7280;
}
body.theme-light .api-doc-back a {
    color: #3b82f6;
}

@media (max-width: 768px) {
   /* .api-doc-page {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }*/
    .api-doc-card {
        padding: 1.1rem 1.1rem 1.4rem;
    }
    .api-doc-row {
        flex-direction: column;
    }
    .api-doc-label {
        width: auto;
        margin-bottom: 0.25rem;
    }

    /* 在线调试：移动端标题在上、控件在下 */
    .api-doc-debug-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }
    .api-doc-debug-label {
        width: auto;
        flex-shrink: 0;
        padding-top: 0;
        font-weight: 500;
    }
    .api-doc-debug-control {
        width: 100%;
        min-width: 0;
    }

    /* 发起请求 与 返回结果 标题同一行两端对齐；结果区占满下一行 */
    .api-doc-debug-result-section {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.35rem 0.65rem;
        align-items: center;
        margin-top: 0.4rem;
    }
    .api-doc-debug-result-section .api-doc-debug-actions {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        align-self: center;
    }
    .api-doc-debug-result-section .api-doc-debug-row--result {
        display: contents;
    }
    .api-doc-debug-result-section .api-doc-debug-row--result > .api-doc-debug-label {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
        min-width: 0;
    }
    .api-doc-debug-result-section .api-doc-debug-row--result > .api-doc-debug-control {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}
