/* 全局样式 */
:root {
  --bg: #fff;
  --bg-dark: #0f1115; 
  --dark-color: #ddd;
  --search: #fff;
  --search-dark: #0f1115;
  --card: #fff;
  --card-boxshadow:  0 2px 8px #eee;
  --card-dark: #0f1115;
  --card-dark-boxshadow:  0 4px 20px rgba(0,0,0,0.4);
  --main: #409eff;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  /* background: #f8f8f8; */
  background: var(--bg-dark);
}
.up {
  color: #31b938 !important;
}
.down {
  color: #e53935 !important;
}
.hot-box {
  padding: 15px;
  background: var(--bg-dark);
  color: var(--dark-color);
  margin-top: 10px;
  border-radius: 8px;
}
.hot-scroll {
  display: flex;
  max-width: 100%;
  overflow: scroll;
  margin: 0;
  padding: 0;
}
.hot-scroll li {
  background: var(--card-dark);
  color: var(--dark-color);
  margin: 5px 5px;
  border-radius: 12px;
  box-shadow: var(--card-dark-boxshadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(70, 70, 70, 1);
}
.hot-scroll li .coin-info {
  padding: 15px;
}
.hot-scroll strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-scroll p {
  margin: 0;
  padding-top: 5px;
}
.hot-info {
  font-size: 12px;
  padding-top: 5px;
}

.banner img {
  width: 100%;
  height: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-box {
  padding: 15px;
  background: var(--search-dark);
  color: var(--dark-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 10px;
  border-radius: 8px;
}

.search-box input {
  background: var(--search-dark);
  color: var(--dark-color);
  width: 92%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--main);
}

.coin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.coin-list li {
  background: var(--card-dark);
  color: var(--dark-color);
  margin: 12px 10px;
  padding: 5px 15px;
  border-radius: 12px;
  box-shadow: var(--card-dark-boxshadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid rgba(70, 70, 70, 1);
}

.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;
  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: var(--main);
  color: var(--dark-color);
  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: var(--bg-dark);
  /* 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: var(--dark-color);
  /* color: #333; */
}

.nav .active {
  color: var(--main);
}

@media (max-width: 768px) {
  body {
    padding-bottom: 60px;
  }
  .nav a {
    font-size: 14px;
  }
}

/* 详情页样式 */
.detail-container {
  padding: 15px;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-dark);
  color: var(--dark-color);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.coin-header {
  display: flex;
  flex-direction: column;
}

.coin-header h2 {
  font-size: 25px;
  font-weight: bold;
  margin-bottom: 10px;
}

.price-info {
  font-size: 14px;
  margin-top: 15px;
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

#coinPrice {
  font-size: 17px;
  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: var(--main);
  color: var(--dark-color);
  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: var(--main);
  color: var(--dark-color);
  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;
}
