/* ========== 全站统一变量与重置 ========== */
:root {
  --primary: #173a78;
  --secondary: #067278;
  --accent: #ffc800;
  --bg: #f9fafc;
  --text: #17202b;
  --muted: #41526b;
  --surface: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --radius: 1.15rem;
  --maxw: 1200px;
  --contentw: 1040px;
  --inner-pad: 1rem;
  --grad: linear-gradient(90deg, #11aeb2 0%, #ffd700 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: #1753ae;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--secondary);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 0.6rem;
  box-shadow: var(--shadow);
}

/* ========== 容器 ========== */
.wrap,
.module,
.section,
.wrap-tight {
  max-width: var(--contentw);
  margin: 0 auto;
  padding: 0 var(--inner-pad);
}
.wrap {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}
.module,
.section {
  margin: 1.2rem auto;
}

/* ========== 头部 ========== */
header {
  background: var(--primary);
  color: #fff;
}
header .nav-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem var(--inner-pad);
}
.brand {
  font-weight: 800;
  font-size: 1.75rem;
}
.brand a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.3rem 0.4rem;
}
header nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
header nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 0.65rem;
  border: 1.5px solid #ffffff55;
  background: transparent;
  transition: all 0.15s ease;
}
header nav a:hover,
header nav a:focus {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  outline: none;
}
@media (max-width: 900px) {
  .nav-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    font-size: 1.4rem;
  }
}

/* 二级菜单 */
.menu-item-has-children {
  position: relative;
}
.menu-item-has-children > .submenu-toggle {
  margin-left: 0.35rem;
  border: 1.5px solid #ffffff55;
  background: #ffffff20;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 0.45rem;
  transition: all 0.15s ease;
}
.menu-item-has-children > .submenu-toggle:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.menu-item-has-children > .sub-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  background: #fff;
  color: #17202b;
  box-shadow: var(--shadow);
  border-radius: 0.6rem;
  display: none;
  min-width: 220px;
  padding: 0.35rem;
  z-index: 20;
}
.menu-item-has-children.is-open > .sub-menu {
  display: block;
}
.menu-item-has-children > .sub-menu > li {
  list-style: none;
}
.menu-item-has-children > .sub-menu a {
  display: block;
  text-decoration: none;
  color: #17202b;
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid #e8eefb;
  margin: 0.2rem;
}
.menu-item-has-children > .sub-menu a:hover {
  background: #f2f7ff;
}
@media (max-width: 900px) {
  .menu-item-has-children > .sub-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0.3rem 0;
  }
  .menu-item-has-children > .sub-menu a {
    color: #fff;
    border-color: #ffffff55;
  }
}

/* ========== Hero ========== */
.hero {
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(110deg, var(--primary) 60%, var(--secondary));
  padding: 1.2rem var(--inner-pad) 1.6rem;
}
.hero .wrap-tight {
  padding: 0 var(--inner-pad);
}
.hero h1 {
  margin: 0.1rem 0 0.25rem;
  font-size: 2.15rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}
.hero p {
  margin: 0.2rem auto 0.9rem;
  font-size: 1.05rem;
  max-width: 860px;
}
.hero .actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 0.68rem 1.35rem;
  min-height: 48px;
  border-radius: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid #ffffff22;
  background: var(--grad);
  color: #1b2a3d;
  box-shadow: var(--shadow);
}
.btn:hover {
  filter: brightness(1.05);
}
@media (max-width: 520px) {
  .btn {
    padding: 0.52rem 0.9rem;
    min-height: 40px;
    font-size: 0.92rem;
    border-width: 1.5px;
  }
}

/* ========== 标题 / Notes ========== */
.block-title {
  display: inline-block;
  font-weight: 900;
  font-size: 1.35rem;
  margin: 0 0 0.8rem;
  background: linear-gradient(100deg, #e0f7fa 50%, #f5ffc2 100%);
  padding: 0.27em 1.4em 0.27em 1em;
  border-radius: 0.7rem;
  color: var(--primary);
}
.module-note {
  margin: 0.8rem 0 0;
  color: #2d3b51;
  font-size: 1rem;
  line-height: 1.7;
  background: #f7fbff;
  border-left: 4px solid #a7c9ff;
  padding: 0.65rem 0.8rem;
  border-radius: 0.4rem;
}

/* ========== 搜索框 ========== */
.search-bar {
  max-width: var(--contentw);
  margin: 1rem auto 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.search-bar form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 720px;
}
.search-bar input[type="search"] {
  flex: 1;
  border: 1px solid #d7e2f2;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  background: #fff;
  box-shadow: var(--shadow);
}
.search-bar button {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-weight: 800;
  background: var(--grad);
  color: #1b2a3d;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.search-bar button:hover {
  filter: brightness(1.05);
}

/* ========== 平台卡片 ========== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.platform-grid.crypto-only {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1.4rem;
}
@media (max-width: 1100px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .platform-grid.crypto-only {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid.crypto-only {
    grid-template-columns: 1fr;
  }
}
.group-title {
  grid-column: 1 / -1;
  text-align: center;
  background: #e3f7ff;
  color: var(--primary);
  padding: 0.45rem 1rem;
  border-radius: 0.7rem;
  font-weight: 800;
}
.card {
  background: var(--surface);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 300px;
  padding: 1.05rem 0.75rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0.2rem 0 0.15rem;
  font-size: 1.12rem;
  font-weight: 800;
}
.logo {
  width: 210px;
  max-width: 95%;
  height: 116px;
  object-fit: contain;
  border-radius: 12px;
  background: #f6fafc;
  display: block;
  margin: 0 auto 0.3rem;
}
.desc {
  color: #273755;
  text-align: center;
}
.cta {
  margin: 0.4rem auto 0.35rem;
}
.register-btn {
  margin: 0.37rem auto 0.35rem;
  padding: 0.65rem 1.2rem;
  min-height: 48px;
  width: 120px;
  background: var(--secondary);
  color: #fff;
  border-radius: 1.25rem;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  text-align: center;
}
.register-btn:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--primary);
}
.support {
  width: 100%;
  margin-top: 0.1rem;
  font-size: 0.99rem;
  color: #516789;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.icons {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 1.13em;
  margin-bottom: 2px;
  justify-content: center;
  flex-wrap: wrap;
}
.icons img {
  height: 17px;
  width: auto;
  vertical-align: middle;
}
.sup-text {
  font-size: 0.97em;
  color: #273755;
  text-align: center;
  line-height: 1.4;
}

/* ========== 文章模块统一样式（关键：解决图片比例） ========== */
.post-thumb,
.media-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f2f6fb;
  position: relative;
  border-bottom: 1px solid #eef2f7;
  margin: 0;
}
.post-thumb img,
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
.post-card:hover .post-thumb img,
.media-row:hover .media-thumb img {
  transform: scale(1.05);
}
.module--picks .post-thumb {
  aspect-ratio: 4 / 3;
}
@media (max-width: 700px) {
  .module--picks .post-thumb {
    aspect-ratio: 16 / 9;
  }
}

/* 文章网格 */
.module .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.module .head h2 {
  margin: 0;
}
.view-all {
  font-weight: 800;
  text-decoration: underline;
}
.posts-grid {
  display: grid;
  gap: 1rem;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
.post-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.post-body {
  padding: 0.8rem 0.9rem 1rem;
}
.post-title {
  margin: 0.1rem 0 0.2rem;
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.35;
}
.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.post-meta--inline {
  margin-top: 0.2rem;
  font-size: 0.8rem;
}

/* Feature 模块（大图） */
.mod--feature .posts-grid {
  grid-template-columns: repeat(3, 1fr);
}
.mod--feature .post-card.feature {
  grid-column: span 2;
}
.mod--feature .post-thumb {
  aspect-ratio: 16 / 9;
}
.mod--feature .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .mod--feature .post-card.feature {
    grid-column: span 1;
  }
}

/* Media list */
.mod--media .media-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.media-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 0.6rem;
  overflow: hidden;
}
.media-thumb {
  width: 140px;
  flex-shrink: 0;
  border-bottom: none;
  aspect-ratio: 16 / 9;
}
.media-thumb img {
  border-radius: 0.6rem;
}
.media-title {
  font-weight: 800;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .media-thumb {
    width: 120px;
  }
}

/* Titles list */
.titles-list {
  padding-left: 1rem;
  margin: 0.2rem 0;
}
.titles-list li {
  margin: 0.35rem 0;
}
.titles-list a {
  text-decoration: none;
}
.titles-list a:hover {
  text-decoration: underline;
}

/* News 模块及统一卡片（与通用模块样式一致，无需额外重写） */
#news-filter .posts-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}
#news-filter .post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
#news-filter .post-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
#news-filter .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#news-filter .post-body {
  margin-top: 0.4rem;
}
#news-filter .post-title {
  margin: 0.15rem 0 0;
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

/* 标签 chips */
#news-filter .chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.8rem;
}
#news-filter .chip {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #cfe3ff;
  background: #fff;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-size: 0.95rem;
}
#news-filter .chip:hover {
  background: #f6fbff;
}
#news-filter .chip.is-active {
  background: #eef6ff;
  border-color: #a7c9ff;
  color: var(--primary);
}
#news-filter .chip:focus {
  outline: 2px solid #a7c9ff;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  #news-filter .chip {
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
  }
}

/* FAQ */
.faq .item {
  margin-bottom: 0.7rem;
}
.faq .q {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  position: relative;
  padding: 0.65em 0.2em 0.65em 0.7em;
  min-height: 44px;
  border-radius: 0.6em;
}
.faq .a {
  display: none;
  padding: 0.25rem 0 0 0.9rem;
  color: var(--muted);
}

/* ========== 页脚 ========== */
footer {
  background: var(--primary);
  color: #fff;
  padding: 0.8rem var(--inner-pad);
}
.footer-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.fcol {
  flex: 1 1 240px;
  min-width: 220px;
}
.fcol .footer-title {
  margin: 0.2rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
}
.fcol a {
  color: #ffd700;
  text-decoration: underline;
}
.fcol a:hover {
  background: #173a7817;
}
.footer-copy {
  text-align: center;
  color: #e3e8f5;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}
.brand.small {
  font-size: 1rem;
}

/* ========== 移动端页脚优化：品牌列独占一行，后两列并排 ========== */
@media (max-width: 768px) {
  footer {
    padding: 0.5rem var(--inner-pad);
  }
  .footer-wrap {
    gap: 0.75rem;
  }
  /* 第一个 .fcol (品牌信息) 占满整行 */
  .fcol:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  /* 第二、三个 .fcol 各占一半宽度，并排显示 */
  .fcol:nth-child(2),
  .fcol:nth-child(3) {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
  }
  /* 调整内部间距 */
  .fcol .footer-title {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
  }
  .fcol ul {
    margin: 0 0 0.2rem;
    padding-left: 0;
  }
  .fcol li {
    margin-bottom: 0.2rem;
  }
  .fcol a {
    font-size: 0.9rem;
  }
  .footer-copy {
    margin-top: 0.6rem;
    font-size: 0.8rem;
  }
  .brand.small {
    font-size: 0.95rem;
  }
}