/* XXX數字錢包：Web3 操作中樞響應式樣式 */
:root {
  --primary: #2980FE;
  --primary-weak: #EAF3FF;
  --primary-soft: #F4F8FF;
  --white: #ffffff;
  --bg: #F6F8FC;
  --bg-soft: #F9FBFF;
  --line: #E3E8F2;
  --text: #243044;
  --muted: #667085;
  --deep: #121826;
  --shadow: 0 18px 45px rgba(41, 128, 254, 0.10);
  --radius: 24px;
}

* {
  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: linear-gradient(180deg, #ffffff 0%, #f7faff 38%, #ffffff 100%);
  line-height: 1.75;
  overflow-x: hidden;
}

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

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

p {
  margin: 0 0 16px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(227, 232, 242, 0.85);
}

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

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

.brand img,
.footer-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-toggle {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--text);
  font-weight: 700;
}

.site-nav {
  display: none;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 72px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

.site-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
  background: var(--primary-weak);
}

main {
  min-height: 70vh;
}

.section {
  padding: 58px 0;
}

.section-tight {
  padding: 38px 0;
}

.gradient-background {
  background:
    radial-gradient(circle at 18% 5%, rgba(41, 128, 254, 0.12), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(41, 128, 254, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.eyebrow,
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  background: var(--primary-weak);
  border: 1px solid rgba(41, 128, 254, 0.14);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  color: var(--deep);
  line-height: 1.18;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(34px, 7vw, 64px);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(26px, 4.2vw, 42px);
  letter-spacing: -0.035em;
}

h3 {
  font-size: 20px;
}

.lead {
  color: var(--muted);
  font-size: 17px;
}

.download-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 26px rgba(41, 128, 254, 0.24);
  border: 1px solid rgba(41, 128, 254, 0.25);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(41, 128, 254, 0.28);
}

.web3-dashboard-hero {
  padding: 62px 0 36px;
}

.hero-grid,
.split-panel,
.digital-assets-hub,
.web3-ecosystem-section,
.hardware-wallet-section,
.swap-service-section,
.developer-center-section,
.submit-chain-section {
  display: grid;
  gap: 24px;
  align-items: center;
}

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

.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span,
.meta-row span {
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  padding: 18px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(41, 128, 254, 0.12), rgba(255,255,255,0.88)),
    var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(41, 128, 254, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.hero-visual img {
  width: min(360px, 78%);
  margin: 0 auto;
  filter: drop-shadow(0 18px 28px rgba(36,48,68,.12));
}

.status-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.status-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
}

.status-card strong {
  color: var(--deep);
}

.status-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.service-index {
  padding: 26px 0 56px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.service-grid,
.category-grid,
.risk-grid,
.faq-grid,
.info-grid,
.related-grid {
  display: grid;
  gap: 16px;
}

.service-card,
.info-card,
.risk-card,
.faq-item,
.step-card,
.related-card,
.panel,
.code-card,
.notice-card,
.check-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 28px rgba(18, 24, 38, 0.05);
}

.service-card {
  position: relative;
  min-height: 210px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -34px;
  top: -34px;
  border-radius: 50%;
  background: rgba(41,128,254,.10);
}

.service-card .label {
  display: inline-flex;
  width: max-content;
  color: var(--primary);
  background: var(--primary-weak);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-link,
.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-weight: 800;
  margin-top: 8px;
}

.feature-card {
  padding: 26px;
  border-radius: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-card.blue-soft,
.hardware-wallet-section,
.privacy-boundary-section {
  background: linear-gradient(135deg, #ffffff 0%, #f1f7ff 100%);
}

.feature-media {
  border-radius: 26px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 18px;
  overflow: hidden;
}

.feature-media img {
  margin: 0 auto;
  max-height: 420px;
  object-fit: contain;
}

.feature-list,
.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.feature-list li,
.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
}

.feature-list li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(41,128,254,.12);
}

.privacy-boundary-section,
.submit-chain-section,
.developer-center-section {
  border-radius: 32px;
  padding: 28px;
  border: 1px solid var(--line);
}

.boundary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.boundary-tags span {
  padding: 9px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
}

.process-steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding-top: 58px;
}

.step-card::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--primary);
  font-weight: 900;
  font-size: 20px;
}

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

.risk-card .risk-action {
  color: var(--primary);
  font-weight: 800;
  margin-top: 8px;
}

.faq-item h3 {
  font-size: 18px;
}

.cta-section {
  text-align: center;
  padding: 52px 20px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 10%, rgba(41,128,254,.14), transparent 30%),
    linear-gradient(135deg, #f1f7ff 0%, #ffffff 100%);
  border: 1px solid var(--line);
  margin-bottom: 62px;
}

.cta-section p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero .lead {
  max-width: 780px;
}

.content-layout {
  display: grid;
  gap: 24px;
  align-items: start;
  padding-bottom: 62px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.article-card h2 {
  font-size: 28px;
  margin-top: 8px;
}

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

.notice-card {
  background: var(--primary-soft);
}

.notice-card strong {
  color: var(--deep);
}

.check-card {
  background: var(--white);
}

.download-area {
  margin-top: 22px;
}

.download-page-card {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 34px 22px;
  box-shadow: var(--shadow);
}

.steps-list {
  display: grid;
  gap: 14px;
  text-align: left;
  margin: 28px 0;
}

.steps-list div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
}

.steps-list span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary);
  font-weight: 900;
}

.code-card {
  background: #f8fbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #31506f;
  overflow-x: auto;
}

.code-card .code-line {
  display: block;
  padding: 5px 0;
  border-bottom: 1px solid rgba(227,232,242,.7);
}

.site-footer {
  background: #f7f9fd;
  border-top: 1px solid var(--line);
  padding: 42px 0 24px;
}

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

.site-footer p {
  color: var(--muted);
  max-width: 520px;
}

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

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

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

.footer-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 700px) {
  .service-grid,
  .category-grid,
  .risk-grid,
  .faq-grid,
  .info-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

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

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

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

  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
  }

  .split-panel,
  .digital-assets-hub,
  .web3-ecosystem-section,
  .hardware-wallet-section,
  .swap-service-section,
  .submit-chain-section,
  .developer-center-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hardware-wallet-section .feature-media,
  .swap-service-section .feature-media {
    order: -1;
  }

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

  .service-grid .service-card:nth-child(1),
  .service-grid .service-card:nth-child(7) {
    grid-column: span 2;
  }

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

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

  .content-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .article-card {
    padding: 34px;
  }
}

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

  .web3-dashboard-hero {
    padding-top: 86px;
  }

  .section {
    padding: 76px 0;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .download-btn {
    width: 100%;
  }

  .service-card,
  .info-card,
  .risk-card,
  .faq-item,
  .step-card,
  .related-card,
  .panel,
  .article-card {
    padding: 19px;
    border-radius: 20px;
  }

  .privacy-boundary-section,
  .submit-chain-section,
  .developer-center-section {
    padding: 20px;
    border-radius: 24px;
  }
}
