/* ===== 赛博算命 · 共享主题 ===== */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #0b0b14;
  color: #c8c8d4;
  min-height: 100vh;
  line-height: 1.6;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0b0b14; }
::-webkit-scrollbar-thumb { background: #2a2a40; border-radius: 3px; }

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a30 100%);
  border-bottom: 1px solid #2a2a40;
  padding: 20px 24px;
  text-align: center;
  position: relative;
}
.header h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #d4a574 0%, #f0d6a8 50%, #d4a574 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 6px;
}
.header .sub {
  color: #6b6b80;
  font-size: 13px;
  margin-top: 4px;
  letter-spacing: 2px;
}
.header .nav-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.header .nav-links a {
  color: #6b6b80;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.header .nav-links a:hover,
.header .nav-links a.active {
  color: #d4a574;
  border-color: #2a2a40;
  background: #12121f;
}

/* ===== Container ===== */
.container { max-width: 820px; margin: 0 auto; padding: 24px 16px; }
.container-wide { max-width: 960px; }

/* ===== Cards ===== */
.card {
  background: #12121f;
  border: 1px solid #222238;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #d4a574;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Buttons ===== */
.btn {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 1px;
}
.btn-primary {
  background: linear-gradient(135deg, #b8863a 0%, #d4a574 100%);
  color: #0b0b14;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212,165,116,0.25);
}
.btn-secondary {
  background: transparent;
  border: 1px solid #333350;
  color: #8888a0;
}
.btn-secondary:hover { border-color: #d4a574; color: #d4a574; }
.btn-row { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* ===== Form ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
label { font-size: 13px; color: #8888a0; font-weight: 500; letter-spacing: 0.5px; }
input, select, textarea {
  background: #1a1a2e;
  border: 1px solid #2a2a40;
  border-radius: 8px;
  padding: 10px 14px;
  color: #d0d0e0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: #d4a574; }
select { cursor: pointer; }
select option { background: #1a1a2e; }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  background: #1a1a30;
  border: 1px solid #2a2a40;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: #6b6b80;
}

/* ===== Tag ===== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
}
.tag.green { background: #1a2e1a; color: #6ab06a; border: 1px solid #2a4a2a; }
.tag.red { background: #2e1a1a; color: #d06a6a; border: 1px solid #4a2a2a; }
.tag.blue { background: #1a1a2e; color: #6a6ad0; border: 1px solid #2a2a4a; }
.tag.gold { background: #2e2a1a; color: #d4a574; border: 1px solid #4a3a2a; }

/* ===== Animations ===== */
.animate-in { animation: fadeUp 0.4s ease-out both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: #6b6b80;
  display: none;
}
.loading .spinner {
  width: 32px; height: 32px;
  border: 2px solid #2a2a40;
  border-top-color: #d4a574;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 20px;
  color: #3a3a50;
  font-size: 12px;
  border-top: 1px solid #181828;
  margin-top: 40px;
}

/* ===== Note ===== */
.note {
  font-size: 11px;
  color: #4a4a60;
  margin-top: 8px;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .header h1 { font-size: 22px; letter-spacing: 4px; }
  .header .nav-links { gap: 10px; flex-wrap: wrap; }
  .container { padding: 16px 12px; }
  .card { padding: 16px; }
}
