/* ============================================================
   登入頁 — 左側品牌視覺 / 右側登入面板
   依賴 style.css 的代幣與 .btn；錢包連接為主要路徑
   ============================================================ */

.page-login { min-height: 100svh; }

.lg {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 100svh;
}
@media (max-width: 900px) { .lg { grid-template-columns: 1fr; } }

/* ============ 1. 左側視覺 ============ */
.lg-visual {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--pad-lg) var(--pad);
  background:
    radial-gradient(60% 55% at 42% 40%, rgba(210, 160, 110, .22), transparent 70%),
    radial-gradient(50% 50% at 80% 90%, rgba(169, 118, 74, .14), transparent 70%),
    #120E0D;
  border-right: 1px dashed var(--line-on-dark);
}
.lg-visual__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(210, 160, 110, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 160, 110, .06) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 60% at 45% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 45% 40%, #000, transparent 75%);
  pointer-events: none;
}
.lg-visual__home {
  position: absolute; top: var(--pad); left: var(--pad);
  z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  opacity: .6;
  transition: opacity .25s, color .25s;
}
.lg-visual__home:hover { opacity: 1; color: var(--c-accent); }
.lg-visual__home svg { width: 12px; height: 12px; }

/* 種子生長 canvas（js/seed.js） */
.lg-visual__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* 底部暗幕，讓文案在光脈下方仍清楚 */
.lg-visual::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(18, 14, 13, .92), transparent);
  pointer-events: none;
}

.lg-visual__copy { position: relative; z-index: 2; max-width: 620px; }
.lg-visual__eyebrow { color: var(--c-accent); margin-bottom: 16px; display: inline-block; }
.lg-visual__title {
  font-size: clamp(28px, 3.8vw, 56px);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: .01em;
  text-wrap: balance;
}

@media (max-width: 900px) {
  .lg-visual { min-height: 420px; border-right: none; border-bottom: 1px dashed var(--line-on-dark); padding-top: 90px; padding-bottom: 28px; }
  .lg-visual__title { font-size: clamp(24px, 6.4vw, 34px); }
}

/* ============ 2. 右側登入面板 ============ */
.lg-panel {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: var(--pad-lg) var(--pad);
  background: radial-gradient(80% 60% at 50% 100%, rgba(210, 160, 110, .06), transparent 70%), var(--c-bg);
}
.lg-form { width: min(100%, 420px); display: flex; flex-direction: column; }

.lg-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: clamp(36px, 6vh, 64px); }
.lg-brand svg { width: 34px; height: 34px; }
.lg-brand__name { font-size: 22px; font-weight: 500; letter-spacing: .06em; }
.lg-brand__sub { opacity: .45; font-size: 10px; }

.lg-title { text-align: center; font-size: clamp(24px, 2.4vw, 30px); font-weight: 300; letter-spacing: .04em; }
.lg-sub { margin-top: 12px; text-align: center; font-size: 14px; opacity: .65; }
.lg-sub a { color: var(--c-accent); border-bottom: 1px dashed rgba(210, 160, 110, .5); margin-left: 6px; transition: color .25s; }
.lg-sub a:hover { color: #E6BC8E; }

/* 主要路徑：連接錢包 */
.lg-wallet { margin-top: clamp(28px, 4vh, 40px); display: flex; flex-direction: column; gap: 12px; }
.lg-main {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  padding: 17px 22px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #16120F;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .04em;
  box-shadow: 0 14px 40px rgba(210, 160, 110, .22);
  transition: background-color .25s, transform .3s var(--ease-power4), box-shadow .3s;
}
.lg-main:hover { background: #E0B384; transform: translateY(-2px); box-shadow: 0 18px 46px rgba(210, 160, 110, .3); }
.lg-main:disabled { cursor: progress; transform: none; }
.lg-main svg { width: 18px; height: 18px; flex: none; }
.lg-main__tag {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(22, 18, 15, .88);
  color: var(--c-accent);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.lg-note { text-align: center; font-size: 12px; opacity: .5; }

.lg-providers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.lg-prov {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 6px 10px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 8px;
  font-size: 11px;
  color: rgba(247, 247, 247, .65);
  transition: border-color .25s, color .25s, background-color .25s;
}
.lg-prov:hover { border-color: rgba(210, 160, 110, .55); color: var(--c-text); background: rgba(210, 160, 110, .06); }
.lg-prov:disabled { opacity: .45; cursor: progress; }
.lg-prov svg { width: 24px; height: 24px; }

/* 分隔線 */
.lg-or {
  display: flex; align-items: center; gap: 14px;
  margin: clamp(26px, 4vh, 36px) 0 20px;
  font-size: 12px;
  opacity: .5;
}
.lg-or::before, .lg-or::after { content: ''; flex: 1; height: 1px; border-top: 1px dashed var(--line-on-dark); }

/* 次要路徑：Email / Google */
.lg-alt { display: flex; flex-direction: column; gap: 10px; }
.lg-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 999px;
  background: rgba(247, 247, 247, .03);
  color: var(--c-text);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color .25s;
}
.lg-input::placeholder { color: rgba(247, 247, 247, .35); }
.lg-input:focus { outline: none; border-color: rgba(210, 160, 110, .65); }
.lg-input.is-invalid { border-color: #C08A7A; border-style: solid; }
.lg-ghost {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  font-size: 14px;
  color: rgba(247, 247, 247, .85);
  transition: border-color .25s, color .25s, background-color .25s;
}
.lg-ghost:hover { border-color: rgba(210, 160, 110, .6); color: var(--c-text); background: rgba(247, 247, 247, .03); }
.lg-ghost:disabled { opacity: .45; cursor: progress; }
.lg-ghost__g {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(247, 247, 247, .35);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.lg-err { min-height: 18px; font-size: 12px; color: #D9A08C; padding-left: 18px; }

.lg-foot {
  margin-top: clamp(26px, 4vh, 40px);
  padding-top: 18px;
  border-top: 1px dashed var(--line-on-dark);
  text-align: center;
  font-size: 11.5px;
  opacity: .45;
  line-height: 1.8;
}
.lg-foot a { border-bottom: 1px dashed rgba(247, 247, 247, .35); }
.lg-foot a:hover { color: var(--c-accent); }

/* 連接中／成功的狀態 */
.spin {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(22, 18, 15, .25);
  border-top-color: #16120F;
  animation: spin .8s linear infinite;
  flex: none;
}
.lg-prov .spin, .lg-ghost .spin { border-color: rgba(247, 247, 247, .2); border-top-color: var(--c-accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.lg-status {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--c-accent);
}
.lg-status__ok {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-accent);
  color: #16120F;
}
.lg-status__ok svg { width: 10px; height: 10px; }

@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 2.4s; }
  .lg-main, .lg-prov, .lg-ghost, .lg-input { transition: none; }
}

/* ---------- 測試帳號（mock）：三個會員等級各一 ---------- */
.lg-demo { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px dashed rgba(247, 247, 247, .14); }
.lg-demo__k { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: rgba(247, 247, 247, .45); }
.lg-demo__list { display: flex; flex-direction: column; gap: 6px; }
.lg-demo__acct {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px dashed rgba(247, 247, 247, .16); border-radius: 8px; text-align: left; color: rgba(247, 247, 247, .82);
  transition: border-color .25s, background-color .25s, color .25s;
}
.lg-demo__acct:hover, .lg-demo__acct:focus-visible { border-color: rgba(210, 160, 110, .6); background: rgba(247, 247, 247, .03); color: var(--c-text); }
.lg-demo__acct:disabled { opacity: .45; cursor: progress; }
.lg-demo__lv { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.lg-demo__acct--silver .lg-demo__lv { color: #D9D4CE; }
.lg-demo__acct--blue .lg-demo__lv { color: #9FC0D8; }
.lg-demo__acct--gold .lg-demo__lv { color: var(--c-accent); }
.lg-demo__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-demo__who b { font-size: 13px; font-weight: 500; }
.lg-demo__who small { font-family: var(--mono); font-size: 11px; color: rgba(247, 247, 247, .5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-demo__go { font-family: var(--mono); color: rgba(247, 247, 247, .4); transition: transform .25s, color .25s; }
.lg-demo__acct:hover .lg-demo__go { color: var(--c-accent); transform: translateX(3px); }
