body {
  background: #18191e;
  font-family: 'Noto Sans TC', 'Arial', sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  width: 100vw;
}

.card {
  width: 340px;
  background: #23252c;
  padding: 40px 36px 32px 36px;
  border-radius: 24px;
  box-shadow: 0 3px 24px #0006;
  position: relative;
  font-weight: bold;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.day {
  font-size: 38px;
  letter-spacing: 6px;
  text-align: center;
  margin-bottom: 24px;
  margin-top: 4px;
  font-weight: 900;
  color: #fff;
}

.buy-row {
  margin-bottom: 32px;
  text-align: center;
  width: 100%;
}

.btc-row-flex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.btc-row-text {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  white-space: nowrap;
  color: #f5f6fa;
}

.btc-row-logo {
  width: 22px;
  height: 22px;
  display: block;
}

.goal-row {
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 20px;
  letter-spacing: 1px;
  width: 100%;
  color: #c9cbce;
}

.progress-bg {
  width: 100%;
  height: 17px;
  background: #353843;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px #0004 inset;
  margin-bottom: 4px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f8ae31 60%, #f8d37a 100%);
  border-radius: 14px 0 0 14px;
  transition: width 0.4s cubic-bezier(.4,1,.5,1);
  min-width: 3px;
}

.total-row {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  margin-top: 18px;
  letter-spacing: 1px;
  color: #f6d86a;
  width: 100%;
}

.home-btn-outer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.home-btn {
  background: linear-gradient(90deg, #f7ae31 20%, #f0971a 100%);
  color: #18191e;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  padding: 14px 48px 12px 48px;
  cursor: pointer;
  box-shadow: 0 2px 10px #0005;
  letter-spacing: 2px;
  text-decoration: none;
  transition: background 0.18s, transform 0.13s;
  display: block;
  text-align: center;
}

.home-btn:hover {
  background: linear-gradient(90deg, #ffe178 10%, #f7ae31 100%);
  color: #18191e;
  transform: translateY(-1px) scale(1.03);
}

.footer-powered {
  width: 100vw;
  text-align: center;
  font-size: 14px;
  color: #888b97;
  margin-top: 32px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  font-weight: 400;
}

.footer-powered a {
  color: #f7ae31;
  text-decoration: none;
  margin-left: 4px;
  font-weight: bold;
}

.footer-powered a:hover {
  text-decoration: underline;
  color: #ffe178;
}

/* --- 歷史紀錄區域 --- */
.history-container {
  width: 100%;
  margin-top: 24px;
  margin-bottom: 12px;
  border-top: 1px solid #353843;
  padding-top: 16px;
}

.history-title {
  font-size: 13px;
  color: #888b97;
  text-align: center;
  margin-bottom: 12px;
  font-weight: normal;
  letter-spacing: 1px;
}

.history-list {
  width: 100%;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar {
  width: 4px;
}
.history-list::-webkit-scrollbar-track {
  background: #23252c; 
}
.history-list::-webkit-scrollbar-thumb {
  background: #353843; 
  border-radius: 4px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #2c2f38;
}

.history-item:last-child {
  border-bottom: none;
}

.history-date {
  color: #c9cbce;
  font-weight: 400;
  font-size: 12px;
}

/* 存入 (綠色) */
.history-amount { 
  color: #70c464; 
  font-family: monospace;
  font-weight: bold;
  letter-spacing: -0.5px;
}

/* 提走 (紅色/橘紅色) */
.history-withdrawal {
  color: #f86969; 
  font-family: monospace;
  font-weight: bold;
  letter-spacing: -0.5px;
}

.history-loading {
  text-align: center;
  color: #555;
  font-size: 12px;
  padding: 10px;
}

/* --- 底部按鈕 (等寬置中) --- */
.links-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;             
  width: 100%;
  margin-top: 24px;
  position: relative;    
  z-index: 10;           
}

.kaspa-pool {
  flex: 1;               
  background-color: #353843;
  color: #ffffff;
  padding: 12px 0;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  border: 1px solid #464a55;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.2s ease;

  position: relative;    
  z-index: 20;           
}

.kaspa-pool:hover {
  background-color: #454955;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
  color: #fff;
}

/* 手機版 RWD */
@media (max-width: 500px) {
  .wrapper {
    min-height: 86vh;
  }
  .card {
    width: 94vw;
    min-width: 0;
    padding: 28px 8vw 22px 8vw;
    border-radius: 18px;
  }
  .day {
    font-size: 8vw;
    margin-bottom: 18px;
  }
  .btc-row-text {
    font-size: 4.2vw;
  }
  .btc-row-logo {
    width: 5vw;
    height: 5vw;
    min-width: 18px;
    min-height: 18px;
  }
  .goal-row, .total-row, .home-btn {
    font-size: 3.5vw;
  }
  .progress-bg {
    height: 13px;
  }
  .home-btn {
    padding: 12px 0 10px 0;
    min-width: 70vw;
    width: 94vw;
    border-radius: 11px;
  }
  .home-btn-outer {
    margin-top: 20px;
  }
  .footer-powered {
    font-size: 12px;
    margin-top: 22px;
    margin-bottom: 10px;
  }
  
  /* 手機版按鈕調整 */
  .links-container {
    gap: 10px;
  }
  .kaspa-pool {
    font-size: 13px;
    padding: 10px 0;
  }
}