* {
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  color: #172b4d;
  background: #f6f8fc;
}

header {
  background: #ffcf00;
  backdrop-filter: blur(1rem);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  height: 4rem;
  margin: auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  text-decoration: none;
  color: #566579;
  padding: 0.7rem 1.2rem;
  border-radius: 0.7rem;
  font-size: 1rem;
  transition: 0.25s;
}

nav a:hover {
  background: #fff4c7;
  color: #0056a6;
}

.title {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf4ff 0%, #f8fbff 50%, #eef0ff 100%);
}

.title-inner {
  max-width: 1200px;
  min-width: 240px;
  margin: auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  background: #fff1b4;
  color: #1264a3;
}

.tag:hover {
  box-shadow: 0 0.5rem 0.8rem rgba(0, 86, 166, 0.3);
}

.title h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.25;
  color: #123b68;
  letter-spacing: 1px;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.45;
}

.circle.one {
  width: 300px;
  height: 300px;
  right: 15%;
  top: -100px;
  background: #d5e9ff;
}

.circle.two {
  width: 220px;
  height: 220px;
  right: 2%;
  bottom: -100px;
  background: #dfe2ff;
}

main {
  max-width: 1200px;
  min-width: 240px;
  padding: 0.7rem 1rem 1.2rem;
}

.content-card {
  background: white;
  border-radius: 1rem;
  padding: 1.2rem;
  border: 0.4rem solid #edf1f6;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.content-card h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #173c68;
  margin-block-end: 1rem;
}

.content-card h2 table tr td:first-child {
  text-align: center;
  vertical-align: top;
}

.content-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #172b4d;
  margin-block-end: 0.1rem;
}

.content-card p {
  color: #64748b;
  font-size: 1.1rem;
  margin-block-start: 0.3rem;
  margin-block-end: 0.3rem;
}

.content-card p a {
  word-break: break-all;
}

footer {
  background: #ffcf00;
  color: #566579;
  border-bottom: 0.3rem solid #d51524;
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-size: 1rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .header-inner {
    height: auto;
    padding: 0.7rem 1rem;
  }

  .title-inner {
    padding: 0.7rem 1rem;
  }

  .title h1 {
    font-size: 1.5rem;
  }

  .content-card {
    padding: 0.7rem;
    padding-top: clamp(10px, 1vh, 10px);
    padding-bottom: clamp(10px, 1vh, 10px);
    padding-left: 1.5rem;
    padding-right: 1.5rem;

    width: 100%;
    box-sizing: border-box;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

.result-area{
  display: none;
}

.button {
  display: block;
  background: #ffcf00;
  color: #3E210D;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
  -webkit-box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
}

.line-button {
  display: none;
  background: #06C775;
  color: #FFFFFF;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
  -webkit-box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
  border: none; /* 建議加上，清除按鈕預設邊框 */
}

.line-button a {
  color: #FFFFFF;
  text-decoration: none;
  display: block;
}


.qrcode-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* 讓內容水平置中 */
  justify-content: center;

  /* 畫出外框與外觀 */
  border: 1px solid #e0e0e0; /* 灰色外框，也可改為 #ccc 或其它顏色 */
  border-radius: 12px; /* 圓角 */
  padding: 16px; /* 框內留白 */
  background-color: #ffffff; /* 背景白底 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 淡淡的陰影增加質感 */

  /* 限制整體區塊寬度 */
  width: fit-content; /* 根據內容自動縮小 */
  margin: 15px auto; /* 上下留白，左右自動置中 */
}

/* 控制 QR Code 圖片/繪圖板本身的大小 */
.qrcode-container img,
.qrcode-container canvas {
  width: 160px !important; /* 調整為你希望的大小（例如 150px~180px） */
  height: 160px !important;
}

.startArea {
  display: block;
}

.resultArea {
  display: none;
}