/* Ledger 主题 — 深青 + 琥珀强调 */
:root {
    --primary-color: #0d3d4a;
    --secondary-color: #062a33;
    --accent-color: #d4a017;
    --accent-hover: #e8b82e;
    --surface: #f4f7f8;
    --surface-card: #ffffff;
    --text-color: #1a2b32;
    --text-muted: #5a6f78;
    --border-color: rgba(13, 61, 74, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(6, 42, 51, 0.06);
    --shadow-md: 0 8px 24px rgba(6, 42, 51, 0.08);
    --transition-speed: 0.25s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1140px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    color: var(--text-color);
    line-height: 1.65;
    background: var(--surface);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
}

/* 导航 */
.z4bd83navbar,
.ldg-nav {
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.65rem 0;
}

.z4bd83navbar-brand img {
    height: 42px;
    width: auto;
}

.z4bd83nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition: color var(--transition-speed), background var(--transition-speed);
}

.z4bd83nav-link:hover,
.z4bd83nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(13, 61, 74, 0.06);
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.55rem;
}

.navbar-collapse {
    background: var(--surface-card);
}

/* 按钮 */
.ldg-btn-primary,
.z4bd83btn.btn-primary,
.btn.ldg-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.ldg-btn-primary:hover,
.z4bd83btn.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ldg-btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-sm);
}

.ldg-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #fff;
}

.ldg-section .ldg-btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.ldg-section .ldg-btn-outline:hover {
    background: rgba(13, 61, 74, 0.08);
    color: var(--primary-color);
}

/* Hero */
.ldg-hero,
.z4bd83hero-section {
    position: relative;
    background: linear-gradient(145deg, var(--secondary-color) 0%, var(--primary-color) 55%, #115566 100%);
    color: #fff;
    padding: clamp(3rem, 8vw, 5.5rem) 0;
    overflow: hidden;
}

.ldg-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 90% 20%, rgba(212, 160, 23, 0.15), transparent),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
}

.ldg-hero-text {
    position: relative;
    z-index: 1;
}

.ldg-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(212, 160, 23, 0.2);
    color: var(--accent-hover);
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 160, 23, 0.35);
}

.ldg-hero-title,
.z4bd83hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.ldg-hero-lead,
.z4bd83hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.92;
    max-width: 36em;
    margin-bottom: 1.5rem;
}

.ldg-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ldg-hero-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.ldg-hero-points li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ldg-hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ldg-hero-img,
.z4bd83hero-image {
    max-width: min(280px, 100%);
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    object-fit: contain;
}

.z4bd83hero-image-shadow {
    display: none;
}

/* 顶栏说明条 */
.ldg-strip {
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
}

.ldg-strip p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 52em;
    margin-inline: auto;
}

.ldg-strip strong {
    color: var(--primary-color);
}

/* 区块通用 */
.ldg-section {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.ldg-section-head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2rem;
}

.ldg-section-head.text-lg-start {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.ldg-section-head-light h2,
.ldg-section-head-light p {
    color: inherit;
}

.ldg-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.ldg-section-head h2 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ldg-section-head p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* 特性面板 */
.ldg-features {
    background: var(--surface);
}

.ldg-panel {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    overflow: hidden;
}

.ldg-panel:hover {
    border-color: rgba(13, 61, 74, 0.22);
    box-shadow: var(--shadow-md);
}

.ldg-panel-accent {
    border-left: 3px solid var(--accent-color);
}

.ldg-panel-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(13, 61, 74, 0.08);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.85rem;
}

.ldg-panel h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ldg-panel p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* 统计 */
.ldg-stats,
.z4bd83stats-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.ldg-stat {
    padding: 1rem 0.5rem;
}

.ldg-stat-num,
.z4bd83stat-number {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--accent-hover);
    margin-bottom: 0.25rem;
}

.z4bd83stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 知识区 */
.ldg-knowledge {
    background: var(--surface-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ldg-knowledge-body p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.ldg-knowledge-body p:last-child {
    margin-bottom: 0;
}

/* 下载 */
.ldg-download,
.z4bd83download-section {
    background: var(--surface);
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.ldg-dl-card,
.z4bd83download-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow var(--transition-speed);
}

.ldg-dl-card:hover {
    box-shadow: var(--shadow-md);
}

.ldg-dl-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ldg-dl-head h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.ldg-dl-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
}

.ldg-dl-win {
    background: linear-gradient(135deg, #0d3d4a, #1a5f6e);
}

.ldg-dl-android {
    background: linear-gradient(135deg, #2d8f5c, #1e6b45);
}

.ldg-dl-list,
.z4bd83download-info {
    list-style: none;
    padding: 0.85rem 1rem;
    margin: 0 0 1rem;
    background: rgba(13, 61, 74, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    flex-grow: 1;
}

.ldg-dl-list li,
.z4bd83info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.ldg-dl-list li:last-child,
.z4bd83info-item:last-child {
    margin-bottom: 0;
}

.ldg-dl-list i,
.z4bd83info-item i {
    color: var(--accent-color);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.z4bd83download-action {
    margin-top: auto;
}

.z4bd83download-action .btn {
    white-space: normal;
}

/* 安全 */
.ldg-security,
.z4bd83security-section {
    background: var(--surface-card);
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.ldg-sec-card,
.z4bd83security-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.35rem;
    text-align: center;
    box-shadow: none;
    height: 100%;
    overflow: hidden;
}

.ldg-sec-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0.75rem 0 0.5rem;
}

.ldg-sec-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}

.ldg-sec-icon,
.z4bd83security-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1a5f6e);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ldg-cert,
.z4bd83certificate-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.ldg-cert i {
    font-size: 1.75rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.ldg-cert h4,
.z4bd83certificate-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.ldg-cert p,
.z4bd83certificate-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* FAQ */
.ldg-faq {
    background: var(--surface);
}

.ldg-faq-item {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    overflow: hidden;
}

.ldg-faq-item summary {
    padding: 1rem 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none;
}

.ldg-faq-item summary::-webkit-details-marker {
    display: none;
}

.ldg-faq-item summary::after {
    content: '+';
    float: right;
    font-weight: 400;
    color: var(--accent-color);
}

.ldg-faq-item[open] summary::after {
    content: '−';
}

.ldg-faq-item p {
    padding: 0 1.15rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

/* 文章 */
.ldg-articles {
    background: var(--surface-card);
    border-top: 1px solid var(--border-color);
}

.ldg-article-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-speed);
}

.ldg-article-card:hover {
    box-shadow: var(--shadow-md);
}

.ldg-article-thumb {
    display: block;
    overflow: hidden;
}

.z4bd83thumb-home {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.ldg-article-card .card-body {
    padding: 0.75rem;
}

.ldg-article-card h3 {
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 页脚 */
.ldg-footer,
.z4bd83footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.85);
    padding: 2.5rem 0 1.5rem;
}

.z4bd83footer-title,
.ldg-footer .footer-title {
    color: var(--accent-hover);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.z4bd83footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.z4bd83footer-link,
.ldg-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.z4bd83footer-link:hover,
.ldg-footer a:hover {
    color: var(--accent-hover);
}

.ldg-friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.ldg-friend-links a {
    font-size: 0.85rem;
}

.z4bd83footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

/* 列表/内页 */
.ldg-page-main {
    padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.ldg-page-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ldg-page-card .card-body {
    padding: 1.25rem;
}

.ldg-sidebar-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.ldg-sidebar-card .card-body {
    padding: 1rem 1.15rem;
}

.z4bd83article-content {
    font-size: 1rem;
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.z4bd83article-content img {
    max-width: 100%;
    height: auto;
}

.z4bd83thumb-list,
.z4bd83thumb-related {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.z4bd83thumb-side {
    width: 100%;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.z4bd83thumb-cover {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* 分页 */
.pagebar .pagelist {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.pagebar .pagelist li {
    display: inline-flex;
    margin: 0;
}

/* 兼容旧类名 */
.z4bd83feature-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 100%;
}

.z4bd83container.container {
    max-width: var(--container-max);
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 响应式 */
@media (max-width: 991px) {
    .ldg-section-head.text-lg-start {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .z4bd83navbar .navbar-collapse {
        margin-top: 0.5rem;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        max-height: 70vh;
        overflow-y: auto;
    }
}

@media (max-width: 767px) {
    .ldg-hero-actions {
        flex-direction: column;
    }

    .ldg-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .ldg-hero-points {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ldg-dl-head {
        flex-wrap: wrap;
    }

    .z4bd83thumb-home {
        height: 96px;
    }

    .z4bd83thumb-list,
    .z4bd83thumb-related {
        height: 72px;
    }

    .z4bd83thumb-side {
        height: 50px;
    }

    .z4bd83thumb-cover {
        max-height: 180px;
    }

    .ldg-footer .row > div {
        text-align: center;
    }

    .ldg-friend-links {
        justify-content: center;
    }

    .z4bd83footer-links {
        text-align: center;
    }

    .listbox .e2 li h2.h5 {
        font-size: 1rem;
    }

    .listbox .e2 li p {
        font-size: 0.88rem;
    }
}

@media (max-width: 575px) {
    .z4bd83navbar-brand img {
        height: 36px;
    }

    .ldg-strip p {
        font-size: 0.88rem;
        text-align: left;
    }

    .ldg-panel,
    .ldg-dl-card,
    .ldg-sec-card {
        padding: 1rem 1.1rem;
    }

    #article .row-cols-2 > .col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .z4bd83thumb-home {
        height: 140px;
    }

    .pagebar .pagelist {
        gap: 0.35rem;
        font-size: 0.9rem;
    }
}

/* 防止边框溢出 */
.row {
    margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
}

[class*="col-"] {
    min-width: 0;
}

.card,
.ldg-panel,
.ldg-dl-card,
.ldg-sec-card,
.ldg-faq-item,
.ldg-article-card,
.ldg-page-card,
.ldg-sidebar-card {
    max-width: 100%;
}

.btn {
    max-width: 100%;
}

@media (max-width: 767px) {
    .z4bd83download-section .row.g-4,
    .z4bd83download-section .row.g-3 {
        --bs-gutter-x: 0.75rem;
    }

    .z4bd83security-section .row.g-4,
    .z4bd83security-section .row.g-3 {
        --bs-gutter-y: 0.75rem;
    }
}
