/* Drawer 弹窗样式 */
.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 9999;
  display: none;
  transition: background 0.3s;
}
.drawer-show {
  display: block;
}
.drawer-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(37, 99, 235, 0.12);
  padding: 32px 24px 32px 24px;
  animation: drawerUp 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.drawer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #2563eb;
}
.drawer-coin-img {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  object-fit: contain;
}
.drawer-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: left;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.drawer-coins {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
}
.drawer-subtitle {
  font-size: 0.8rem;
  text-align: center;
  font-weight: 500;
}
.drawer-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 12px;
}
.drawer-channel {
  width: 100%;
  padding: 16px 0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  box-shadow: 0 2px 8px #2563eb22;
  transition:
    border 0.2s,
    background 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.drawer-channel.selected {
  border: 2px solid #2563eb;
  background: #f7fcff;
}
.drawer-channel-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: inline-block;
}
.drawer-channel-amount {
  font-size: 1rem;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  padding: 4px 12px;
  margin-left: 8px;
}
@keyframes drawerUp {
  from {
    transform: translateX(-50%) translateY(100%);
  }
  to {
    transform: translateX(-50%) translateY(0);
  }
}
@keyframes drawerDown {
  from {
    transform: translateX(-50%) translateY(0);
  }
  to {
    transform: translateX(-50%) translateY(100%);
  }
}
@media (max-width: 600px) {
  .drawer-content {
    max-width: 98vw;
    padding: 18px 8px 24px 8px;
  }
  .drawer-title {
    font-size: 1rem;
    margin-bottom: 0px;
  }
  .drawer-channel {
    font-size: 1rem;
    padding: 10px 10px;
  }
}
@media (min-width: 600px) {
  .drawer-content {
    left: 50%;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100vw;
    min-width: 320px;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 24px rgba(37, 99, 235, 0.12);
    padding: 32px 24px 32px 24px;
    box-sizing: border-box;
    /* 居中且最大宽度不超过600px */
  }
  .drawer-content .drawer-channel {
    padding: 16px 18px;
  }
}
