:root{
  --bg: #0b1020;
  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --muted2: rgba(255,255,255,0.5);
  --accent: #5dd6ff;
  --primary: #7c5cff;

  /* 警示色：鮮豔但在深色背景可讀 */
  --warn: #ffcc00;

  --shadow: 0 20px 60px rgba(0,0,0,0.35);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans TC", Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 20%, rgba(124,92,255,0.25), transparent 60%),
              radial-gradient(1000px 700px at 80% 30%, rgba(93,214,255,0.20), transparent 55%),
              var(--bg);
  color: var(--text);

  /* 桌機整體文字 +2px（常見預設 16px → 18px） */
  font-size: 18px;

  display: flex;
  flex-direction: column;
}

.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.topbar{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 18px;
  z-index: 10;
}

.topbar__actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.main{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 86px 16px 56px; /* topbar + footer spacing */
}

.card{
  width: min(720px, 94vw);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
  backdrop-filter: blur(10px);
}

.title{
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: 0.4px;

  /* 需求：標題置中 */
  text-align: center;
}

.subtitle{
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.form{
  margin-top: 8px;
}

.label{
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}

.inputRow{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.input{
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
  font-size: 15px;
}

.input:focus{
  border-color: rgba(93,214,255,0.55);
  box-shadow: 0 0 0 4px rgba(93,214,255,0.18);
}

.btn{
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  color: var(--text);
  background: rgba(255,255,255,0.12);
  transition: transform 0.06s ease, background 0.2s ease, opacity 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:hover{ background: rgba(255,255,255,0.16); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: 0.6; cursor: not-allowed; }

.btn--primary{
  background: rgba(124,92,255,0.55);
}
.btn--primary:hover{ background: rgba(124,92,255,0.65); }

.btn--accent{
  background: rgb(0, 195, 255);
  color: rgb(255, 255, 255);
}
.btn--accent:hover{ background: rgba(93,214,255,0.70); }

.btn--secondary{
  background: rgba(255,255,255,0.10);
}
.btn--ghost{
  background: rgba(255,255,255,0.06);
}

.hint{
  margin-top: 14px;
  color: var(--muted2);
  font-size: 13px;
}

.resultArea{
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
}

.resultArea.is-hidden{ display: none; }

.resultHeader{
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  align-items: start;
}

.resultLabel{
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.resultLink{
  display: inline-block;
  word-break: break-all;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.resultLink:hover{ text-decoration: underline; }

.qrcodeBox{
  width: 200px;
  height: 200px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resultActions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer{
  padding: 14px 18px 18px;
  color: var(--muted);
  text-align: center;
}

.footer__line{
  font-size: 13px;
  line-height: 1.5;
}

/* 需求：頁尾註記使用鮮豔警示色 */
.footer__note{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--warn);
  font-weight: 800;
  letter-spacing: 0.2px;

  /* 讓警示更明顯但不刺眼 */
  text-shadow: 0 0 14px rgba(255, 204, 0, 0.22);
}

/* 原本 720px 的 QR/結果區排版調整：保留 */
@media (max-width: 720px){
  .resultHeader{
    grid-template-columns: 1fr;
  }
  .qrcodeBox{
    width: 180px;
    height: 180px;
  }
}

/* 行動裝置排版（文字大小維持原本剛好，不跟著桌機 +2px） */
@media (max-width: 520px){
  body{
    font-size: 16px; /* 手機維持較舒適的大小 */
  }

  .topbar{
    padding: 12px 12px;
  }

  .topbar__actions{
    gap: 8px;
  }

  .btn{
    padding: 10px 12px;
  }

  .card{
    padding: 20px 16px;
  }

  .title{
    font-size: 26px;
  }

  /* 手機：輸入框與確認按鈕改成上下堆疊，避免擠壓 */
  .inputRow{
    grid-template-columns: 1fr;
  }

  #btnCreate{
    width: 100%;
  }

  /* 手機：結果區的兩顆按鈕改成滿版更好按 */
  .resultActions{
    flex-direction: column;
  }

  .resultActions .btn{
    width: 100%;
  }

  .qrcodeBox{
    width: 170px;
    height: 170px;
  }
}
