/* ==== 基礎設定 ==== */
body, html {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans TC", sans-serif;
  width: 100%;
  height: 100%;
  background-color: #ebf0f3;
}

/* ==== 背景容器 ==== */
.container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  background: url("../images/bg.png") no-repeat center top;
  background-size: 100% auto; /* 寬度填滿，高度自動 */
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ebf0f3;
}

/* ==== Header ==== */
.text {
  margin: 2rem auto 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.text img {
  width: 90%;
  height: auto;
}

/* ==== 內層背景區塊 ==== */
.conbg {
  width: 100%;
  min-height: 100vh;
  background-color: #ebf0f3;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  padding: 30px 20px 140px 20px;
  box-sizing: border-box;
  box-shadow: 0px 8px 30px rgba(214, 210, 199, 0.53);
}

/* ==== Tabs ==== */
.tab-content {
  display: block;
}

.tab-content.active {
  display: block;
}

.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.tab {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 1;
  max-width: 33%;
  transition: transform 0.2s ease;
}

.tab img {
  width: 100%;
  height: auto;
  display: block;
}

.tab:active {
  transform: scale(0.97);
}

/* === 兌換商品框 === */
.exchange-box {
  width: 90%; /* ✅ 改為百分比，會自動縮放 */
  max-width: 860px;
  height: auto; /* ✅ 高度自動調整 */
  margin: 1rem auto;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #f5f4ed, #f4f1e1);
  border: 2px solid #d5cbaf;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(229, 225, 212, 0.8);
  box-sizing: border-box;
  color: #fff;
  gap: 1px;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* === 左側圖片 === */
.item-img {
  width: 45%; /* ✅ 改為比例寬度 */
  max-width: 290px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-img img {
  width: 100%;
  height: auto;
}

/* === 右側文字內容 === */
.info {
  color: #333333;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.info-points {
  font-size: 1.6rem;
  margin-bottom: 0px;
  line-height: 0.1; /* 行距 */
}

.info-item {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

/* === 按鈕 === */
.exchange-btn {
  width: 70%;
  max-width: 240px;
  height: 60px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #272727;
  background: linear-gradient(to right, #e4d9bc, #d5cbaf);
  border: none;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 4px 10px #d5cbaf;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  border: 2px solid #efe7d1;
}

.exchange-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* === 響應式字級調整 === */

/* 當螢幕寬度 ≤ 520px */
@media (max-width: 520px) {
  .info-points {
    font-size: 1.2rem;
  }

  .info-item {
    font-size: 1.0rem;
  }

  .exchange-btn {
    font-size: 1.1rem;
    height: 35px;  }

}

/* 當螢幕寬度 ≤ 430px */
@media (max-width: 430px) {
  .info-points {
    font-size: 1.1rem;
  }

  .info-item {
    font-size: 0.9rem;
  }

  .exchange-btn {
    font-size: 1.2rem;
    height: 35px;  }

}

/* 當螢幕寬度 ≤ 360px */
@media (max-width: 360px) {
  .info-points {
    font-size: 1rem;
  }

  .info-item {
    font-size: 0.8rem;
  }

  .exchange-btn {
    font-size: 1rem;
    height: 30px;
  }
    
}



/* === 兌換商品框 === */


/* ==== Footer 固定底部 ==== */
.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%); /* ✅ 左右置中關鍵 */
  width: 100%;
  max-width: 960px; /* ✅ 限制最大寬度 */
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background: linear-gradient(to top, #e4d9bc, rgba(219, 212, 189, 0.7));
  box-shadow: 0 -3px 20px #c1b89f;
  z-index: 999;
  box-sizing: border-box;
}


.footer-btn {
  flex: 1;
  margin: 0 5px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.footer-btn img {
  width: 100%;
  height: auto;
  display: block;
}

.footer-btn:active {
  transform: scale(0.95);
}

/* ==== 彈窗設定 ==== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.9));
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  max-width: 94%;
  max-height: 90vh;
  margin: 5% auto;
  background: #000;
  border-radius: 28px;
  overflow-y: auto;
  border: 3px solid #FFD700;
  box-sizing: border-box;
}

/* 自訂滾動條樣式 */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 0, 0.4);
  border-radius: 3px;
}

.rule-img {
  width: 100%;
  display: block;
}

.close {
  position: absolute;
  top: 10px;
  right: 7px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
}

