/* Trust Wallet 官网主题 — 青绿 + 琥珀配色 */
:root {
    --primary: #0f766e;
    --primary-dark: #0d5c56;
    --primary-light: #14b8a6;
    --accent: #d97706;
    --accent-light: #fbbf24;
    --surface: #ffffff;
    --surface-alt: #f0fdfa;
    --surface-muted: #ecfdf5;
    --text: #134e4a;
    --text-muted: #5b7c78;
    --border: rgba(15, 118, 110, 0.12);
    --border-strong: rgba(15, 118, 110, 0.22);
    --shadow-sm: 0 1px 3px rgba(13, 92, 86, 0.08);
    --shadow-md: 0 8px 24px rgba(13, 92, 86, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.25s ease;
    --container-max: 1140px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: var(--surface);
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* —— 导航 —— */
.z3f8bdnavbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.z3f8bdnavbar-brand img {
    height: 42px;
    width: auto;
}

.z3f8bdnav-link {
    color: var(--text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    transition: background var(--transition), color var(--transition);
}

.z3f8bdnav-link:hover {
    color: var(--primary) !important;
    background: var(--surface-muted);
}

.z3f8bdnavbar .navbar-toggler {
    border: 1px solid var(--border-strong);
    padding: 0.4rem 0.55rem;
}

.z3f8bdnavbar .navbar-collapse {
    background: var(--surface);
}

@media (max-width: 991px) {
    .z3f8bdnavbar .navbar-collapse {
        margin-top: 0.5rem;
        padding: 0.75rem 0;
        border-top: 1px solid var(--border);
        max-height: 70vh;
        overflow-y: auto;
    }

    .z3f8bdnav-link {
        padding: 0.5rem 0.25rem !important;
    }
}

/* —— 通用区块 —— */
.z3f8bdcontainer.container {
    max-width: var(--container-max);
}

.tw-section {
    padding: 4.5rem 0;
    overflow: hidden;
}

.tw-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.tw-section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.65rem;
}

.tw-section-head p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.05rem;
}

.tw-badge {
    display: inline-block;
    background: var(--surface-muted);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

/* —— Hero —— */
.z3f8bdhero-section {
    background: linear-gradient(160deg, #042f2e 0%, var(--primary-dark) 45%, var(--primary) 100%);
    color: #fff;
    padding: 4rem 0 5rem;
    position: relative;
}

.z3f8bdhero-section::after {
    content: '';
    position: absolute;
    right: -10%;
    top: 20%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.z3f8bdhero-content {
    position: relative;
    z-index: 1;
}

.z3f8bdhero-title {
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.z3f8bdhero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    opacity: 0.92;
    margin-bottom: 1.75rem;
    max-width: 520px;
}

.z3f8bdhero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.z3f8bdhero-buttons .btn {
    padding: 0.7rem 1.35rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition);
}

.z3f8bdhero-buttons .btn-light {
    background: #fff;
    color: var(--primary-dark);
}

.z3f8bdhero-buttons .btn-accent {
    background: var(--accent);
    color: #fff;
}

.z3f8bdhero-buttons .btn-outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.z3f8bdhero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.z3f8bdhero-image-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.z3f8bdhero-image {
    max-width: 280px;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.z3f8bdhero-image-shadow {
    display: none;
}

/* —— 优势 Bento —— */
#features {
    background: var(--surface-alt);
}

.tw-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.tw-bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.tw-bento-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.tw-bento-card.span-4 { grid-column: span 4; }
.tw-bento-card.span-6 { grid-column: span 6; }
.tw-bento-card.span-8 { grid-column: span 8; }

.tw-bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.tw-bento-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.tw-bento-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* —— 数据条 —— */
.z3f8bdstats-section {
    background: var(--primary-dark);
    color: #fff;
    padding: 3rem 0;
}

.z3f8bdstats-section .row {
    --bs-gutter-x: 0;
}

.z3f8bdstat-item {
    text-align: center;
    padding: 1rem 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.z3f8bdstat-item:last-child {
    border-right: none;
}

.z3f8bdstat-number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.z3f8bdstat-label {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* —— 知识区 —— */
#knowledge {
    background: var(--surface);
}

.tw-knowledge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.tw-knowledge-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--surface-alt);
}

.tw-knowledge-block h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.tw-knowledge-block p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* —— 下载 —— */
.z3f8bddownload-section {
    padding: 4.5rem 0;
    background: var(--surface-muted);
}

.z3f8bddownload-header h2 {
    color: var(--text);
    font-weight: 700;
}

.z3f8bddownload-subtitle {
    color: var(--text-muted);
}

.z3f8bddownload-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    height: 100%;
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.z3f8bddownload-card:hover {
    box-shadow: var(--shadow-md);
}

.z3f8bddownload-card .card-body {
    padding: 1.5rem;
}

.z3f8bdplatform-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
}

.z3f8bdios-icon {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.z3f8bdandroid-icon {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.z3f8bddownload-info {
    background: var(--surface-alt);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.z3f8bdinfo-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.z3f8bdinfo-item:last-child {
    margin-bottom: 0;
}

.z3f8bdinfo-item i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.z3f8bddownload-action .btn,
.z3f8bdbtn.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
}

.z3f8bddownload-action .btn:hover,
.z3f8bdbtn.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.z3f8bdbtn.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
}

.z3f8bdbtn.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

/* —— 安全 —— */
.z3f8bdsecurity-section {
    padding: 4.5rem 0;
    background: var(--surface);
}

.z3f8bdsecurity-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.z3f8bdsecurity-card:hover {
    border-color: var(--border-strong);
}

.z3f8bdsecurity-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--surface-muted);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin: 0 auto 1rem;
}

.z3f8bdsecurity-card h3 {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.z3f8bdsecurity-features {
    background: var(--surface-alt);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.z3f8bdfeature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.z3f8bdfeature-item:last-child {
    margin-bottom: 0;
}

.z3f8bdfeature-item i {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.z3f8bdcertificate-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    height: 100%;
}

.z3f8bdcertificate-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.z3f8bdcertificate-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.z3f8bdcertificate-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* —— FAQ —— */
#faq {
    background: var(--surface-alt);
    padding: 4.5rem 0;
}

.tw-faq-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.25rem 1.5rem;
    height: 100%;
    margin-bottom: 0;
}

.tw-faq-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.tw-faq-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
}

/* —— 文章区 —— */
#article {
    padding: 4rem 0;
    background: var(--surface);
}

#article .card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

#article .card-body {
    padding: 0.85rem 1rem;
}

.z3f8bdthumb-home {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

#article h3.h5 {
    font-size: 0.95rem;
    line-height: 1.4;
}

#article h3.h5 a {
    color: var(--text);
}

#article h3.h5 a:hover {
    color: var(--primary);
}

/* —— 页脚 —— */
.z3f8bdfooter {
    background: #042f2e;
    color: rgba(255, 255, 255, 0.75);
    padding: 3rem 0 1.5rem;
}

.z3f8bdfooter-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.z3f8bdfooter-link {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.z3f8bdfooter-link:hover {
    color: var(--accent-light);
}

.z3f8bdfooter-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.z3f8bdfooter-links li {
    margin-bottom: 0.5rem;
}

.z3f8bdfooter-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.25rem;
    margin-top: 2rem;
    font-size: 0.88rem;
}

.z3f8bdfooter-bottom a {
    color: rgba(255, 255, 255, 0.7);
}

.z3f8bdfriend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.z3f8bdfriend-links a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.88rem;
}

/* —— 列表/内页 —— */
.z3f8bdpy-5.bg-light {
    background: var(--surface-alt) !important;
    padding: 3rem 0 !important;
}

.z3f8bdpy-5.bg-light .card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.z3f8bdarticle-content {
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.z3f8bdarticle-content img {
    max-width: 100%;
    height: auto;
}

.pagebar .pagelist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagebar .pagelist li {
    display: inline-flex;
}

/* —— 响应式 Bento —— */
@media (max-width: 991px) {
    .tw-bento-card.span-4,
    .tw-bento-card.span-6,
    .tw-bento-card.span-8 {
        grid-column: span 6;
    }

    .tw-knowledge-grid {
        grid-template-columns: 1fr;
    }

    .z3f8bdstat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .z3f8bdstat-item:nth-child(2n) {
        border-right: none;
    }

    .z3f8bdstats-section .col-md-3:nth-child(3) .z3f8bdstat-item,
    .z3f8bdstats-section .col-md-3:last-child .z3f8bdstat-item {
        border-bottom: none;
    }
}

@media (max-width: 767px) {
    .tw-section {
        padding: 3rem 0;
    }

    .z3f8bdhero-section {
        padding: 2.5rem 0 3rem;
    }

    .z3f8bdhero-buttons {
        flex-direction: column;
    }

    .z3f8bdhero-buttons .btn {
        width: 100%;
    }

    .tw-bento {
        grid-template-columns: 1fr;
    }

    .tw-bento-card.span-4,
    .tw-bento-card.span-6,
    .tw-bento-card.span-8 {
        grid-column: span 1;
    }

    .z3f8bddownload-section .row.g-4 {
        --bs-gutter-y: 1rem;
    }

    .z3f8bddownload-card .d-flex.align-items-center {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .z3f8bddownload-card .d-flex.align-items-center .ms-3 {
        margin-left: 0 !important;
        flex: 1 1 100%;
    }

    .z3f8bddownload-action .btn {
        width: 100%;
        white-space: normal;
    }

    .z3f8bdsecurity-section .row.g-4 > [class*="col-"] {
        margin-bottom: 0;
    }

    #article .row-cols-lg-5 {
        --bs-columns: 2;
    }

    .z3f8bdthumb-home {
        height: 96px !important;
    }

    #article h3.h5 {
        font-size: 0.88rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .listbox .e2 li h2.h5 {
        font-size: 0.95rem;
    }

    .z3f8bdthumb-list,
    .z3f8bdthumb-related {
        height: 72px !important;
    }

    .z3f8bdthumb-cover {
        max-width: 100% !important;
        width: 100%;
        height: 170px !important;
    }

    .z3f8bdfooter .row > [class*="col-"] {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .z3f8bdfriend-links {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .z3f8bdnavbar-brand img {
        height: 36px;
    }

    #article .row-cols-md-2 {
        --bs-columns: 1;
    }

    .z3f8bdthumb-home {
        height: 88px !important;
    }

    .z3f8bdthumb-list,
    .z3f8bdthumb-related {
        height: 64px !important;
    }

    .z3f8bdthumb-cover {
        height: 150px !important;
    }

    .z3f8bdstat-item {
        padding: 0.75rem 0.5rem;
    }
}

/* 防止卡片内容溢出 */
.card, .z3f8bddownload-card, .z3f8bdsecurity-card,
.tw-bento-card, .tw-faq-card, .tw-knowledge-block {
    max-width: 100%;
    word-wrap: break-word;
}

.z3f8bddownload-card .card-body,
.z3f8bdsecurity-card {
    min-height: 0;
}
