/* =========================================================
   BTC 问答页 · 样式复刻
   深蓝渐变底 + 金色闪烁标题 + 玻璃卡片,窄栏 480px 居中
   ========================================================= */

:root {
  --gold: #f5c842;
  --gold-deep: #c9a227;
  --gold-pale: #fff5b8;
  --red: #ef4444;
  --ink: #0a0e1a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  padding: 0 20px 40px;
  color: #fff;
  background: linear-gradient(180deg, #0d1220 0%, #050810 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

.wrap { max-width: 480px; margin: 0 auto; }

/* ---------------- 顶部:语言下拉 / 会员入口 ---------------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
}

/* 左上角语言下拉,右上角会员入口 */
.langs {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.lang-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  max-width: 132px;
  padding: 6px 26px 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 200, 66, .4);
  background-color: rgba(255, 255, 255, .08);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23f5c842' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.lang-select:hover { background-color: rgba(255, 255, 255, .14); }

.lang-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245, 200, 66, .18);
}

/* 下拉展开后的选项(部分浏览器继承白底白字,这里指定深色) */
.lang-select option {
  background: #131a2b;
  color: #fff;
  font-weight: 600;
}

.auth-btn {
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(135deg, #fffbe0 0%, #ffd84d 50%, #e0b820 100%);
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}

.auth-btn:active { transform: scale(.98); opacity: .9; }

.auth-btn.on {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(245, 200, 66, .4);
  color: #fff;
  font-weight: 600;
}

/* ---------------- 标题 ---------------- */

.title { padding-top: 24px; text-align: center; }

.title h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
}

.gold-shimmer { animation: goldShimmer 2s ease-in-out infinite; }

@keyframes goldShimmer {
  0%   { color: #fff5b8; text-shadow: 0 0 8px rgba(255, 245, 184, .6); }
  25%  { color: #f5c842; text-shadow: 0 0 14px rgba(245, 200, 66, .8); }
  50%  { color: #c9a227; text-shadow: 0 0 10px rgba(201, 162, 39, .6); }
  75%  { color: #f5c842; text-shadow: 0 0 14px rgba(245, 200, 66, .8); }
  100% { color: #fff5b8; text-shadow: 0 0 8px rgba(255, 245, 184, .6); }
}

/* ---------------- 通用卡片 ---------------- */

.quiz-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(245, 200, 66, .2);
  border-radius: 16px;
  padding: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.intro { margin-top: 20px; text-align: center; }

.intro .lead {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

.intro .lead .amount { font-size: 22px; font-weight: 700; color: var(--red); }

.intro .remaining {
  margin: 12px 0 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.intro .remaining b { color: var(--red); font-weight: 600; }

/* ---------------- 题目 ---------------- */

.q-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.q-text {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

.options { display: flex; flex-direction: column; gap: 8px; }

.option-btn {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all .15s ease;
}

.option-btn:active { opacity: .8; }

.option-btn.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.option-btn.disabled { opacity: .5; cursor: not-allowed; }

.gold-gradient-btn {
  border: none;
  background: linear-gradient(135deg, #fffbe0 0%, #ffd84d 50%, #e0b820 100%);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}

.gold-gradient-btn:active:not(:disabled) { transform: scale(.98); opacity: .9; }

.gold-gradient-btn:disabled { opacity: .4; cursor: not-allowed; }

.answer-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 18px;
}

.done-note {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
}

.loading-card { text-align: center; color: rgba(255, 255, 255, .5); }

.loading-card .err { margin: 0 0 12px; color: var(--red); }

.loading-card .reload-btn {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
}

/* ---------------- 页脚说明 ---------------- */

.foot-note {
  margin: 24px 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

/* ---------------- 提交地址 ---------------- */

.submit-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.wallet-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.wallet-input::placeholder { color: rgba(255, 255, 255, .4); }

.wallet-input.invalid { border-color: var(--red); }

.hint {
  margin: 8px 0 12px;
  min-height: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .5);
}

.hint.invalid { color: var(--red); }

.claim-btn {
  width: 100%;
  padding: 14px 0;
  border-radius: 12px;
  font-size: 18px;
}

/* ---------------- 提交成功 ---------------- */

.success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-pale), var(--gold), var(--gold-deep));
}

.success-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--gold); }

.success-desc { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* ---------------- 会员弹窗 ---------------- */

.mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 16, .82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.mask.on { display: flex; }

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 20px;
  border: 1px solid rgba(245, 200, 66, .28);
  border-radius: 18px;
  background: linear-gradient(180deg, #121a2b, #0a0f1a);
  box-shadow: 0 30px 60px -30px #000;
}

.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.auth-tabs { display: flex; gap: 6px; }

.auth-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 200, 66, .4);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.auth-tab.active { background: var(--gold); color: var(--ink); }

.auth-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.auth-field { display: block; margin-bottom: 10px; }

.auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}

.auth-msg {
  min-height: 18px;
  margin: 4px 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--red);
}

.auth-submit {
  width: 100%;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 16px;
}

.auth-logout {
  width: 100%;
  margin-top: 8px;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  cursor: pointer;
}

/* ---------------- 轻提示 ---------------- */

.toasts {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  background: rgba(20, 26, 40, .96);
  border: 1px solid rgba(245, 200, 66, .3);
  box-shadow: 0 12px 30px -12px #000;
  animation: toastIn .18s ease;
}

.toast.err { border-color: rgba(239, 68, 68, .55); }
.toast.ok { border-color: rgba(245, 200, 66, .55); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- 小屏 ---------------- */

@media (max-width: 400px) {
  body { padding: 0 14px 32px; }
  .title h1 { font-size: 30px; }
  .lang-select { max-width: 116px; padding: 5px 24px 5px 10px; font-size: 12px; }
  .auth-btn { padding: 6px 11px; font-size: 12px; }
}
