:root {
  --bg: #07110d;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-2: rgba(10, 17, 31, 0.9);
  --text: #f2ebd4;
  --muted: #9ba7a0;
  --gold: #c9a96b;
  --gold-2: #f0d79f;
  --line: rgba(201, 169, 107, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, #0a0e1a 0%, #111827 40%, #0f1a2e 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

.topnav { margin-bottom: 10px; }
.topnav a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topnav a:hover { color: var(--gold-2); border-color: rgba(201, 169, 107, 0.6); }

.page {
  max-width: 540px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

/* 桌面端自适应加宽 */
@media (min-width: 820px) {
  .page { max-width: 760px; }
}

.site-header {
  text-align: center;
  padding: 12px 8px 6px;
}

.site-title {
  font-size: 1.9rem;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
  background: linear-gradient(120deg, var(--gold-2), var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(201, 169, 107, 0.25);
}

/* 网站标题 Logo */
.site-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
  box-shadow: 0 0 14px rgba(201, 169, 107, 0.4);
}

/* 所有下拉框深色 */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c9a96b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 12px !important;
  padding: 11px 10px !important;
  padding-right: 28px !important;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
}
select:hover { border-color: rgba(201, 169, 107, 0.6); }
select:focus { border-color: rgba(201, 169, 107, 0.7); background-color: rgba(255, 255, 255, 0.07); }
select option { background-color: #0d1a14; color: #f2ebd4; }
.dt-row { display: flex; gap: 6px; }
.dt-row select { flex: 1; min-width: 0; padding: 11px 6px !important; font-size: 0.9rem; }

.site-subtitle {
  color: var(--muted);
  letter-spacing: 0.16em;
  margin: 0;
  font-size: 0.88rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  margin-top: 20px;
}

.card-title {
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 6px;
  font-weight: 700;
}

.hint {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 4px 0 14px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--gold-2);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input[type="text"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus, select:focus {
  border-color: rgba(201, 169, 107, 0.7);
  background: rgba(255, 255, 255, 0.07);
}

/* 日期/时间选择器在部分安卓浏览器会强制浅色，这里做兜底 */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
}

.radio-row {
  display: flex;
  gap: 12px;
}

.radio {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.radio input { display: none; }

.radio span { color: var(--muted); font-size: 0.95rem; }

.radio:has(input:checked) {
  border-color: rgba(201, 169, 107, 0.8);
  background: rgba(201, 169, 107, 0.14);
}

.radio:has(input:checked) span { color: var(--gold-2); }

.place-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.place-row select { padding: 10px 6px; font-size: 0.86rem; }

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #7ec8a8 0%, #5ab08a 100%);
  color: #0a0e1a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.1em;
  transition: transform 0.2s ease, filter 0.2s ease;
  margin-top: 6px;
}

.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn:disabled { filter: grayscale(0.4); cursor: wait; }

.btn.unlock-btn {
  margin-top: 16px;
  background: linear-gradient(135deg, #f0d79f 0%, #c9a96b 100%);
}

.error {
  color: #ff9a8a;
  font-size: 0.85rem;
  margin: 12px 0 0;
  text-align: center;
  line-height: 1.5;
}

/* ============ 结果卡片 ============ */
.result-card { padding: 22px 20px; }

.result-head {
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}

.result-title {
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: 6px;
}

.solar-note {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.kv-row {
  display: flex;
  align-items: baseline;
  padding: 7px 0;
  gap: 10px;
}

.kv-k {
  flex: 0 0 72px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.kv-v { color: var(--text); font-size: 0.95rem; line-height: 1.5; }

.kv-v.big {
  font-size: 1.12rem;
  letter-spacing: 0.14em;
  color: var(--gold-2);
  font-weight: 700;
}

.kv-v.xi { color: #8fd0aa; font-weight: 700; letter-spacing: 0.1em; }
.kv-v.ji { color: #d98a86; font-weight: 700; letter-spacing: 0.1em; }

.wuxing-bars { margin: 4px 0 10px 82px; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.bar-name { flex: 0 0 20px; font-size: 0.82rem; }

.bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

.bar-val { flex: 0 0 46px; font-size: 0.78rem; color: var(--muted); text-align: right; }

.sentence {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 14px;
}

.sentence-title {
  color: var(--gold-2);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.sentence p {
  margin: 0;
  line-height: 1.85;
  font-size: 0.95rem;
  color: var(--text);
}

.unlock {
  margin-top: 20px;
  text-align: center;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

.unlock-title {
  color: var(--gold-2);
  margin: 0 0 4px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.unlock-sub {
  color: var(--muted);
  margin: 0;
  font-size: 0.78rem;
}

.footer {
  text-align: center;
  color: rgba(155, 167, 160, 0.6);
  font-size: 0.72rem;
  line-height: 1.7;
  margin-top: 22px;
  letter-spacing: 0.04em;
}

.footer p { margin: 0; }

@media (max-width: 380px) {
  .place-row { grid-template-columns: 1fr; }
  .wuxing-bars { margin-left: 0; }
}
