/* 通用样式 */
body {
  font-family: sans-serif;
  margin: 0;
  line-height: 1.6;
  background: #fff;
  color: #333;
  scroll-behavior: smooth;
}

h1, h2, h3 {
  margin: 0 0 15px;
}

h2, h3 {
  font-size: 26px;
}

p {
  margin: 0 0 15px;
}

/* 页头和导航栏 */
header {
  background-color: #343a40;
  padding: 10px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title a {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

nav ul, .site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

nav ul li, .site-nav ul li {
  margin: 0 15px;
}

.site-nav ul li {
  margin-left: 20px;
}

nav ul li a, .site-nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}

nav ul li a:hover, .site-nav ul li a:hover {
  text-decoration: underline;
}

/* 容器布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

section {
  padding: 60px 0;
}

/* 首页部分 */
#home {
  background: linear-gradient(180deg, #2185f3, #0d4cac);
  text-align: center;
}

#home h1 {
  color: #fff;
  font-size: 2.5em;
  margin-bottom: 20px;
}

#home p {
  text-align: left;
  font-size: 1em;
  color: #f0f4f8;
}

/* 行情数据模块 */
#market h3, #market p {
  text-align: left;
}

.market-data.btc-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 40px;
  width: 100%;
}

.market-data.others-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 20px;
}

@media screen and (max-width: 768px) {
  .market-data.others-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 行情币种卡片 */
#market .coin {
  background: #19263c;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#market .coin h3 {
  color: #ffdb21;
  margin-bottom: 10px;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

#market .coin p {
  font-weight: bold;
  color: #AA9346;
  font-size: 1.3em;
  margin: 0;
}

/* 常用工具区块 */
#tools {
  padding: 60px 0;
}

#tools h3 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  color: #333;
}

#tools .baise {
  color: #fff;
  text-align: center;
  margin-bottom: 30px;
}

.tools-box {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
}

.tools-box a {
  position: relative;
  display: inline-block;
  text-align: center;
  animation: wave 1.5s ease-in-out infinite;
}

.tools-box img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tools-box img:hover {
  transform: scale(1.2);
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.tools-box a:nth-child(1) { animation-delay: 0s; }
.tools-box a:nth-child(2) { animation-delay: 0.2s; }
.tools-box a:nth-child(3) { animation-delay: 0.4s; }
.tools-box a:nth-child(4) { animation-delay: 0.6s; }
.tools-box a:nth-child(5) { animation-delay: 0.8s; }
.tools-box a:nth-child(6) { animation-delay: 1s; }

.tooltip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.tools-box a:hover .tooltip-text {
  opacity: 1;
}

@media screen and (max-width: 768px) {
  .tools-box {
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    padding: 0 10px;
  }

  .tools-box img {
    width: 40px;
    height: 40px;
  }

  .tooltip-text {
    font-size: 10px;
    padding: 2px 6px;
  }
}

@media screen and (max-width: 480px) {
  .tools-box {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .tools-box img {
    width: 35px;
    height: 35px;
  }
}

/* 新手教程区块 */
#guide h2 {
  text-align: center;
  margin-bottom: 40px;
}

#guide h3 {
  font-size: 1.1em;
  color: #333;
  margin-top: 20px;
}

/* 安全提示区块 */
#security h2 {
  text-align: left;
}

#security ul {
  list-style: disc;
  padding-left: 20px;
}

#security ul li {
  margin-bottom: 10px;
}

/* 常见问题 (FAQ) */
#faq details {
  margin-bottom: 15px;
}

#faq summary {
  cursor: pointer;
  font-weight: bold;
}

#faq summary::-webkit-details-marker, #faq summary::marker {
  display: none;
  content: "";
}

#faq summary::after {
  content: " ➕";
}

#faq details[open] summary::after {
  content: " ➖";
}

#faq p {
  margin: 5px 0 0 15px;
}

/* 页脚 */
footer {
  background: #343a40;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 0.9em;
}

/* 价格涨跌样式 */
.price-up, .price-down, .price-neutral {
  font-weight: bold;
}

.price-up {
  color: green;
  animation: fadeIn 0.5s ease-in-out;
}

.price-down {
  color: red;
  animation: fadeIn 0.5s ease-in-out;
}

.price-neutral {
  color: #333;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* USDT 汇率计算器 */
.calculator {
  margin-top: 20px;
  text-align: center;
}

.calculator select, .calculator input {
  width: 300px;
  padding: 10px;
  font-size: 1.2em;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 0 10px 10px 0;
  box-sizing: border-box;
}

.calculator button {
  background-color: #007BFF;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.calculator button:hover {
  background-color: #0056b3;
}

.calculator p {
  font-size: 1.8em;
}

.result-text {
  color: #ec7a1c;
  font-weight: bold;
  font-size: 1.2em;
  display: inline-block;
  margin-top: 10px;
}

/* 通用辅助色 */
.huise {
  background: #f0f4f8;
}

.baise {
  color: #fff;
}

/* 币种图标 */
.coin-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 8px;
}

/* 交易所面板 - Banner */
.banner {
  display: flex;
  align-items: center;
  background: rgba(0, 23, 180, 0.2);
  padding: 15px 20px;
  border: 1px solid rgba(0, 194, 255, 0.42);
  border-radius: 6px;
  width: calc(33.333% - 20px);
  box-sizing: border-box;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.banner:hover {
  transform: scale(1.05);
}

.banner-imgbox img {
  height: 50px;
  width: auto;
}

.banner-text {
  flex: 1;
  color: #fff;
}

.banner-text h3 {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
}

.banner-btn a {
  background-color: #007BFF;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.banner-btn a:hover {
  background-color: #09356b;
}

/* 面板容器 */
.panel-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-americano;
  gap: 20px;
  margin-top: 30px;
}

@media screen and (max-width: 768px) {
  .banner {
    flex-direction: column;
    width: calc(50% - 10px);
    text-align: center;
  }

  .banner-imgbox {
    margin: 0 auto 10px;
  }

  .banner-text {
    margin-bottom: 10px;
  }

  .banner-btn a {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}

/* 书籍展示 */
.book {
  text-align: center;
  margin: 20px auto;
  transition: transform 0.3s ease;
}

.book:hover {
  transform: scale(1.05);
}

.book img {
  width: 60%;
  height: auto;
  display: inline-block;
}

@media screen and (max-width: 768px) {
  .book img {
    width: 100%;
  }
}

/* BTC 图表容器 */
#btcChart {
  width: 100% !important;
  height: 200px !important;
  display: block;
}
/* 强制 .anquan 占满一行并用 Flex 居中内容 */
#home .panel-box .anquan {
  flex: 0 0 100% !important;   /* 占满整行 */
  display: flex !important;     /* 变为 Flex 容器 */
  justify-content: center !important; /* 水平居中 */
  align-items: center !important;     /* 垂直（可选） */
  padding: 8px 0 !important;           /* 根据需要调整上下内边距 */
}

/* 设置文字样式 */
#home .panel-box .anquan p {
  font-size: 14px !important;
  color:     #0295ff !important;
  margin:    0          !important;  /* 去掉默认段落间距 */
  line-height: 1.4;                   /* 保证行高清晰 */
}