* {
    box-sizing: border-box;
}

:root {
    --primary: #2980FE;
    --primary-dark: #1268df;
    --bg: #ffffff;
    --bg-soft: #f6f8fb;
    --bg-blue: #f2f7ff;
    --border: #e5ebf4;
    --text: #1f2937;
    --muted: #657085;
    --deep: #101827;
    --card: #ffffff;
    --shadow: 0 18px 50px rgba(31, 41, 55, 0.08);
    --radius-lg: 32px;
    --radius-md: 24px;
    --radius-sm: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 42%, #ffffff 100%);
    line-height: 1.75;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 235, 244, 0.9);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--deep);
    letter-spacing: -0.02em;
}

.logo img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: contain;
}

.nav-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--deep);
    font-size: 22px;
    cursor: pointer;
}

.site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.site-nav.is-open {
    display: grid;
    gap: 6px;
}

.site-nav a {
    padding: 12px 14px;
    color: var(--muted);
    border-radius: 14px;
    font-size: 15px;
    transition: 0.2s ease;
}

.site-nav a:hover {
    color: var(--primary);
    background: var(--bg-blue);
}

.section,
.web3-section,
.hardware-wallet-section,
.digital-assets-section,
.swap-section,
.privacy-section,
.submit-chain-section,
.developer-center-section,
.process-section,
.risk-section,
.faq-summary,
.cta-section,
.page-hero,
.content-section {
    padding: 58px 0;
}

.web3-hero {
    position: relative;
    padding: 56px 0 48px;
    overflow: hidden;
}

.web3-hero::before,
.gradient-bg::before {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(41, 128, 254, 0.22), rgba(41, 128, 254, 0));
    right: -180px;
    top: -140px;
    z-index: -1;
}

.hero-grid,
.split-grid,
.feature-split,
.submit-grid,
.developer-grid,
.page-layout {
    display: grid;
    gap: 28px;
    align-items: center;
}

.eyebrow,
.category-badge,
.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(41, 128, 254, 0.1);
    border: 1px solid rgba(41, 128, 254, 0.18);
    font-size: 14px;
    font-weight: 700;
}

h1,
h2,
h3 {
    color: var(--deep);
    line-height: 1.18;
    margin: 0 0 14px;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(36px, 9vw, 72px);
}

h2 {
    font-size: clamp(28px, 5vw, 44px);
}

h3 {
    font-size: 22px;
}

p {
    margin: 0 0 16px;
    color: var(--muted);
}

.lead {
    font-size: 18px;
    color: #4b5565;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 24px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(41, 128, 254, 0.24);
    transition: transform 0.2s ease, background 0.2s ease;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 24px;
}

.security-tags,
.tag-row,
.check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.security-tags span,
.tag-row span,
.check-list li {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #526071;
    background: #fff;
    font-size: 14px;
}

.hero-visual {
    position: relative;
    min-height: 400px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #ffffff, #edf5ff);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(41, 128, 254, 0.13);
    border-radius: 28px;
    background-image: linear-gradient(rgba(41, 128, 254, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(41, 128, 254, 0.08) 1px, transparent 1px);
    background-size: 36px 36px;
}

.hero-visual img {
    position: relative;
    z-index: 2;
    width: min(76%, 360px);
    filter: drop-shadow(0 32px 50px rgba(17, 24, 39, 0.16));
}

.float-label {
    position: absolute;
    z-index: 3;
    padding: 10px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    color: var(--deep);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.float-label:nth-of-type(1) { top: 24px; left: 20px; }
.float-label:nth-of-type(2) { top: 82px; right: 20px; }
.float-label:nth-of-type(3) { bottom: 86px; left: 18px; }
.float-label:nth-of-type(4) { bottom: 28px; right: 26px; }

.ecosystem-nav {
    padding: 26px 0 58px;
}

.section-head {
    display: grid;
    gap: 12px;
    margin-bottom: 26px;
}

.ecosystem-grid,
.category-grid,
.risk-grid,
.faq-grid,
.card-grid {
    display: grid;
    gap: 16px;
}

.ecosystem-card,
.info-card,
.risk-card,
.faq-item,
.step-card,
.tip-box,
.related-card,
.code-panel,
.cta-card,
.page-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: 0 12px 34px rgba(31, 41, 55, 0.06);
}

.ecosystem-card {
    padding: 22px;
    display: grid;
    gap: 12px;
}

.ecosystem-card strong {
    color: var(--deep);
    font-size: 20px;
}

.text-link,
.ecosystem-card a,
.related-card a,
.info-card a {
    color: var(--primary);
    font-weight: 800;
}

.panel-soft,
.hardware-wallet-section,
.swap-section,
.process-section {
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.visual-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
}

.visual-card img {
    width: min(100%, 460px);
    margin: 0 auto;
    border-radius: 24px;
}

.info-card {
    padding: 24px;
}

.info-card.accent {
    border-top: 4px solid var(--primary);
}

.safety-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #ffffff, #f3f8ff);
    border: 1px solid rgba(41, 128, 254, 0.18);
}

.safety-panel ul,
.clean-list,
.number-list {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.clean-list li,
.number-list li,
.safety-panel li {
    margin: 8px 0;
}

.process-steps {
    display: grid;
    gap: 14px;
}

.step-card {
    position: relative;
    padding: 22px 22px 22px 72px;
}

.step-number {
    position: absolute;
    left: 22px;
    top: 22px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.risk-card {
    padding: 20px;
    border-left: 4px solid var(--primary);
}

.risk-card h3,
.faq-item h3 {
    font-size: 19px;
}

.code-panel {
    padding: 24px;
    background: linear-gradient(145deg, #101827, #1e334f);
    color: #e8f1ff;
    overflow: hidden;
}

.code-panel p,
.code-panel li {
    color: #c7d8ef;
}

.code-line {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #dfeeff;
    font-size: 14px;
}

.faq-item {
    padding: 22px;
}

.cta-section {
    text-align: center;
}

.cta-card {
    padding: 34px 22px;
    background: linear-gradient(135deg, #f5f9ff, #ffffff);
}

.page-hero {
    background: radial-gradient(circle at top right, rgba(41, 128, 254, 0.16), transparent 35%), linear-gradient(180deg, #ffffff, #f7faff);
}

.page-hero .container {
    display: grid;
    gap: 18px;
}

.page-layout {
    align-items: start;
}

.article-body {
    display: grid;
    gap: 18px;
}

.page-card {
    padding: 24px;
}

.sidebar {
    display: grid;
    gap: 16px;
}

.related-card {
    padding: 22px;
}

.site-footer {
    margin-top: 40px;
    background: #f5f7fb;
    border-top: 1px solid var(--border);
    padding: 46px 0 22px;
}

.footer-grid {
    display: grid;
    gap: 24px;
}

.site-footer h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

@media (min-width: 640px) {
    .ecosystem-grid,
    .category-grid,
    .risk-grid,
    .faq-grid,
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .site-nav a {
        padding: 9px 10px;
        font-size: 14px;
    }

    .hero-grid,
    .split-grid,
    .feature-split,
    .submit-grid,
    .developer-grid,
    .page-layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
        gap: 46px;
    }

    .feature-split.reverse > .visual-card,
    .split-grid.reverse > .visual-card {
        order: -1;
    }

    .ecosystem-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ecosystem-grid .wide {
        grid-column: span 2;
    }

    .risk-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.4fr repeat(3, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1120px) {
    .web3-hero {
        padding: 84px 0 58px;
    }

    .section,
    .web3-section,
    .hardware-wallet-section,
    .digital-assets-section,
    .swap-section,
    .privacy-section,
    .submit-chain-section,
    .developer-center-section,
    .process-section,
    .risk-section,
    .faq-summary,
    .cta-section,
    .page-hero,
    .content-section {
        padding: 78px 0;
    }
}
