:root {
    --primary: #2980FE;
    --primary-dark: #1462d8;
    --primary-soft: #eef6ff;
    --bg: #f6f8fc;
    --soft: #f1f5fb;
    --line: #e4e9f2;
    --text: #1f2937;
    --muted: #657085;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(31, 41, 55, .08);
    --radius: 24px;
    --radius-lg: 32px;
}

* { box-sizing: border-box; }
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: var(--bg);
    line-height: 1.75;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.88);
    border-bottom: 1px solid rgba(228,233,242,.9);
    backdrop-filter: blur(18px);
}
.header-inner {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; color: #12223d; }
.logo { width: 36px; height: 36px; object-fit: contain; }
.nav-toggle {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--white);
    color: var(--text);
    font-weight: 700;
}
.site-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 74px;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.site-nav.open { display: flex; }
.site-nav a { padding: 10px 12px; border-radius: 14px; color: var(--muted); font-size: 15px; font-weight: 700; }
.site-nav a.active, .site-nav a:hover { color: var(--primary); background: var(--primary-soft); }

.section { padding: 56px 0; }
.section-title { margin: 0 0 14px; font-size: clamp(28px, 4vw, 46px); line-height: 1.18; color: #162338; }
.section-lead { margin: 0 auto 28px; color: var(--muted); max-width: 760px; }
.eyebrow, .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}
.eyebrow::before, .badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(41,128,254,.28);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.download-btn:hover { transform: translateY(-2px); background: var(--primary-dark); box-shadow: 0 18px 38px rgba(41,128,254,.34); }
.text-link { color: var(--primary); font-weight: 800; }
.text-link:hover { text-decoration: underline; }

.web3-hero {
    position: relative;
    padding: 54px 0 42px;
    background:
        radial-gradient(circle at 18% 8%, rgba(41,128,254,.13), transparent 34%),
        radial-gradient(circle at 90% 18%, rgba(41,128,254,.09), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    overflow: hidden;
}
.web3-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -20% auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(41,128,254,.08);
}
.hero-grid { display: grid; gap: 34px; align-items: center; position: relative; z-index: 1; }
.hero-content h1 { margin: 0 0 18px; font-size: clamp(36px, 8vw, 68px); line-height: 1.05; letter-spacing: -1.8px; color: #112039; }
.hero-content p { margin: 0 0 22px; color: var(--muted); font-size: 17px; max-width: 660px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-tags span, .floating-tag, .status-card {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.86);
    color: #30415c;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
}
.hero-visual {
    position: relative;
    padding: 20px;
    min-height: 410px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(228,233,242,.95);
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(238,246,255,.96));
    box-shadow: var(--shadow);
}
.hero-visual img { width: min(330px, 82%); margin: auto; filter: drop-shadow(0 24px 35px rgba(20, 42, 72, .16)); }
.floating-tag { position: absolute; box-shadow: 0 10px 24px rgba(31,41,55,.07); }
.tag-web3 { top: 26px; left: 22px; }
.tag-hardware { top: 82px; right: 18px; }
.tag-assets { bottom: 84px; left: 18px; }
.tag-swap { bottom: 28px; right: 30px; }
.status-card { position: absolute; left: 28px; right: 28px; bottom: 28px; display: none; border-radius: 20px; }
.status-card strong { display: block; color: #112039; }

.ecosystem-nav { padding: 38px 0 18px; background: #fff; }
.ecosystem-grid { display: grid; gap: 14px; }
.ecosystem-card, .feature-card, .risk-card, .faq-item, .guide-card, .info-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 28px rgba(31,41,55,.05);
}
.ecosystem-card { padding: 20px; min-height: 150px; }
.ecosystem-card .mini-label { display: inline-block; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.ecosystem-card h3, .feature-card h3, .risk-card h3, .guide-card h3, .info-card h3 { margin: 0 0 8px; color: #15233a; line-height: 1.25; }
.ecosystem-card p, .feature-card p, .risk-card p, .guide-card p, .info-card p { margin: 0 0 12px; color: var(--muted); }

.service-section { padding: 66px 0; }
.service-grid { display: grid; gap: 28px; align-items: center; }
.service-copy { max-width: 620px; }
.service-copy h2 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 44px); line-height: 1.15; }
.service-copy p { color: var(--muted); margin: 0 0 14px; }
.service-copy ul { margin: 16px 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.service-copy li { position: relative; padding-left: 28px; color: #3b4657; }
.service-copy li::before { content: ""; position: absolute; left: 0; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }
.visual-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; background: var(--white); box-shadow: var(--shadow); }
.visual-card img { border-radius: 24px; width: 100%; object-fit: contain; background: #f8fbff; }
.web3-section { background: #fff; }
.hardware-wallet-section { background: linear-gradient(180deg, #f6f9ff, #eef4fb); }
.digital-assets-section { background: #fff; }
.swap-section { background: linear-gradient(180deg, #f8fbff, #ffffff); }
.privacy-section, .submit-chain-section { background: #fff; }
.developer-center-section { background: #f3f7fc; }

.privacy-panel, .submit-panel, .developer-panel, .safety-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #ffffff, #f4f8ff);
    padding: 24px;
    box-shadow: var(--shadow);
}
.panel-grid { display: grid; gap: 18px; }
.code-panel {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #102033;
    color: #dbeafe;
    border-radius: 22px;
    padding: 20px;
    overflow: hidden;
    line-height: 1.7;
    font-size: 13px;
}
.code-panel span { color: #93c5fd; }
.code-panel strong { color: #ffffff; }

.process-steps { display: grid; gap: 14px; counter-reset: step; }
.step-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    padding: 22px 18px 18px;
    box-shadow: 0 12px 26px rgba(31,41,55,.05);
}
.step-card::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    margin-bottom: 12px;
}
.step-card h3 { margin: 0 0 6px; }
.step-card p { margin: 0 0 12px; color: var(--muted); }

.risk-grid, .category-grid, .feature-grid { display: grid; gap: 16px; }
.risk-card { padding: 18px; border-left: 4px solid var(--primary); }
.risk-card small { display: block; color: var(--primary); font-weight: 900; margin-top: 10px; }
.faq-list { display: grid; gap: 14px; }
.faq-item { padding: 20px; }
.faq-item h3 { margin: 0 0 8px; }
.faq-item p { margin: 0; color: var(--muted); }

.cta-section {
    padding: 70px 0;
    background: linear-gradient(135deg, #eef6ff, #ffffff 55%, #f4f7fb);
    text-align: center;
}
.cta-box {
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(255,255,255,.86);
    box-shadow: var(--shadow);
    padding: 34px 22px;
}
.cta-box h2 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 44px); }
.cta-box p { margin: 0 auto 22px; color: var(--muted); max-width: 720px; }

.page-hero {
    padding: 56px 0 38px;
    background: radial-gradient(circle at 20% 0, rgba(41,128,254,.12), transparent 35%), linear-gradient(180deg, #fff, #f5f8ff);
}
.page-hero-inner { max-width: 840px; }
.page-hero h1 { margin: 0 0 14px; font-size: clamp(34px, 6vw, 58px); line-height: 1.1; letter-spacing: -1px; }
.page-hero p { margin: 0 0 22px; color: var(--muted); font-size: 17px; }
.content-section { padding: 48px 0 68px; }
.guide-layout { display: grid; gap: 24px; }
.article-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.article-panel h2 { margin: 0 0 10px; font-size: 26px; }
.article-panel p { color: var(--muted); margin: 0 0 16px; }
.article-panel ul, .article-panel ol { color: #3f4b5f; padding-left: 22px; }
.sidebar { display: grid; gap: 16px; align-content: start; }
.guide-card, .info-card { padding: 18px; }
.check-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #f8fbff; color: #3f4b5f; }

.download-page-grid { display: grid; gap: 20px; }
.download-card { padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.download-card ol { margin: 0; padding-left: 22px; color: #3f4b5f; }
.download-card li { margin: 10px 0; }

.site-footer { background: #162133; color: #d7deeb; padding: 46px 0 0; }
.footer-grid { display: grid; gap: 26px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { width: 34px; height: 34px; object-fit: contain; }
.site-footer p { color: #aeb9ca; margin: 0; max-width: 460px; }
.site-footer h3 { color: #fff; margin: 0 0 12px; font-size: 16px; }
.site-footer a { display: block; color: #aeb9ca; margin: 8px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding: 18px; text-align: center; color: #9ca9bb; font-size: 14px; }

@media (min-width: 640px) {
    .ecosystem-grid, .category-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .risk-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .download-page-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 920px) {
    .nav-toggle { display: none; }
    .site-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .site-nav a { padding: 8px 10px; font-size: 14px; }
    .hero-grid, .service-grid, .panel-grid, .guide-layout { grid-template-columns: 1.02fr .98fr; }
    .hero-visual { min-height: 520px; }
    .status-card { display: block; }
    .ecosystem-grid { grid-template-columns: repeat(4, 1fr); }
    .ecosystem-card:nth-child(1), .ecosystem-card:nth-child(7) { grid-column: span 2; }
    .category-grid { grid-template-columns: repeat(4, 1fr); }
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
    .risk-grid { grid-template-columns: repeat(4, 1fr); }
    .process-steps { grid-template-columns: repeat(3, 1fr); }
    .reverse .visual-card { order: -1; }
    .footer-grid { grid-template-columns: 1.4fr .8fr .8fr; }
    .article-panel { padding: 34px; }
}

@media (min-width: 1120px) {
    .site-nav a { padding: 8px 12px; }
    .section { padding: 76px 0; }
}

@media (max-width: 420px) {
    .container { width: min(100% - 24px, 1120px); }
    .header-inner { width: min(100% - 22px, 1180px); }
    .download-btn { width: 100%; }
    .hero-visual { min-height: 340px; padding: 14px; }
    .floating-tag { font-size: 12px; padding: 7px 9px; }
    .tag-hardware { right: 10px; }
    .tag-web3 { left: 10px; }
}
