/* 全局样式 */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: #f8f8f8;
}

.banner img {
  width: 100%;
  height: auto;
  /* border-radius: 8px; */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-box {
  padding: 15px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 10px;
  border-radius: 8px;
}

.search-box input {
  width: 92%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
}

.search-box input:focus {
  border-color: #409eff;
}

.coin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.coin-list li {
  background: #fff;
  margin: 12px 10px;
  padding: 5px 15px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coin-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.coin-list .coin-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.coin-list h4 {
  font-size: 18px;
  /* margin-bottom: 5px; */
  font-weight: 600;
}

.coin-list p {
  margin: 5px 0;
  font-size: 14px;
}

.coin-list .mini-chart {
  width: 80px;
  height: 50px;
  margin-left: 20px;
}

.coin-list button {
  padding: 8px 16px;
  background-color: #409eff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.coin-list button:hover {
  background-color: #66b1ff;
}

.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  background: #fff;
  border-top: 1px solid #ddd;
  z-index: 1000;
}

.nav a {
  flex: 1;
  text-align: center;
  padding: 20px 0;
  text-decoration: none;
  font-weight: 600;
  color: #333;
}

.nav .active {
  color: #409eff;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 60px;
  }
  .nav a {
    font-size: 14px;
  }
}

/* 详情页样式 */
.detail-container {
  padding: 15px;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.coin-header {
  text-align: center;
}

.coin-header h2 {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 10px;
}

.price-info {
  font-size: 18px;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#coinPrice {
  font-size: 22px;
  font-weight: bold;
  margin-right: 10px;
}

.price-change {
  font-size: 16px;
  color: #28a745;
}

.price-change.down {
  color: #dc3545;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.tabs button {
  background-color: #409eff;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.tabs button:hover {
  background-color: #66b1ff;
}

.tabs button.active {
  background-color: #1e90ff;
}

.chart-container {
  width: 100%;
  height: 350px;
  margin-top: 20px;
  border-radius: 10px;
}

.follow-btn {
  width: 100%;
  padding: 10px;
  background-color: #409eff;
  color: white;
  font-size: 18px;
  text-align: center;
  border: none;
  border-radius: 10px;
  margin-top: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.follow-btn:hover {
  background-color: #66b1ff;
}
/* 遮罩层样式 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* 半透明黑色 */
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* 防止遮罩层阻挡点击事件 */
}

/* 弹窗样式 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 居中 */
  padding: 15px 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  color: #333;
  font-size: 16px;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 弹窗显示的过渡效果 */
.toast-show {
  opacity: 1;
  visibility: visible;
}

/* 遮罩层显示 */
.overlay-show {
  opacity: 1;
}
