/* 心爱魔力 · 游戏账号站 — 与论坛/赞助页统一的深色金卡风格 */
:root {
  --bg0: #0b1220;
  --bg1: #152238;
  --card: rgba(18, 28, 48, 0.92);
  --card2: rgba(22, 34, 56, 0.88);
  --line: rgba(212, 175, 88, 0.4);
  --gold: #e8c56a;
  --gold2: #f5e6b8;
  --text: #eef3ff;
  --muted: #9aa8c2;
  --ok: #7ddea0;
  --btn: linear-gradient(180deg, #d4a84b 0%, #b8862d 55%, #8f6818 100%);
  --btn-hover: linear-gradient(180deg, #e6bc5e 0%, #c99535 55%, #a07620 100%);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8, 12, 22, 0.78), rgba(8, 12, 22, 0.9)),
    url("../images/page-bg.jpg") center top / cover no-repeat fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
img { max-width: 100%; border: 0; vertical-align: middle; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: rgba(8, 12, 22, 0.88);
  border-bottom: 1px solid rgba(212, 175, 88, 0.25);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold2);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand img { height: 42px; width: auto; }
.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-main a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: .15s;
}
.nav-main a:hover,
.nav-main a.active {
  color: var(--gold2);
  background: rgba(232, 197, 106, 0.12);
}
.nav-user { display: flex; align-items: center; gap: 8px; }
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18, 28, 48, .9);
  color: var(--gold2);
  font-size: 20px;
  cursor: pointer;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #6e5218;
  background: var(--btn);
  color: #2a1c05 !important;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.3);
  cursor: pointer;
  white-space: nowrap;
  transition: .15s;
}
.btn:hover { background: var(--btn-hover); color: #2a1c05 !important; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(232, 197, 106, 0.45);
  color: var(--gold2) !important;
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(232, 197, 106, 0.12); }
.btn-block { width: 100%; padding: 12px 18px; font-size: 15px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ---------- 布局 ---------- */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.hero {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(18, 28, 48, 0.88), rgba(12, 18, 32, 0.75)),
    rgba(18, 28, 48, 0.7);
  box-shadow: var(--shadow);
  padding: 36px 28px;
  margin-bottom: 24px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold2);
  letter-spacing: 0.12em;
  text-shadow: 0 2px 0 #5a4314, 0 0 18px rgba(232, 197, 106, 0.35);
}
.hero p {
  margin: 0 auto 20px;
  max-width: 560px;
  color: #c5d0e4;
  line-height: 1.75;
  font-size: 14px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* 功能卡片 */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 175, 88, 0.35);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  text-align: left;
  color: inherit;
}
.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 197, 106, 0.85);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}
.action-card .ac-top {
  flex: 1;
  padding: 22px 20px 12px;
  background: linear-gradient(160deg, rgba(232, 197, 106, 0.14), transparent 60%);
}
.action-card .ac-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: rgba(232, 197, 106, 0.12);
  border: 1px solid rgba(232, 197, 106, 0.35);
  color: var(--gold2);
}
.action-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--gold2);
  letter-spacing: 0.06em;
}
.action-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.action-card .ac-foot {
  padding: 12px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(212, 175, 88, 0.15);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}
.action-card .ac-foot span:last-child {
  opacity: 0.85;
  transition: transform .15s;
}
.action-card:hover .ac-foot span:last-child {
  transform: translateX(4px);
}
.action-card.reg .ac-icon { background: rgba(125, 222, 160, 0.12); border-color: rgba(125, 222, 160, 0.35); color: var(--ok); }
.action-card.pay .ac-icon { background: rgba(232, 197, 106, 0.18); }

/* 说明面板 */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(212, 175, 88, 0.2);
  background: linear-gradient(90deg, rgba(232, 197, 106, 0.12), transparent);
}
.panel-hd h2 {
  margin: 0;
  font-size: 15px;
  color: var(--gold2);
  letter-spacing: 0.08em;
}
.panel-bd {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.panel-bd ol {
  margin: 0;
  padding-left: 1.2em;
}
.panel-bd li { margin-bottom: 6px; }
.panel-bd strong { color: var(--gold2); font-weight: 600; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--gold2);
  background: rgba(232, 197, 106, 0.12);
  border: 1px solid rgba(232, 197, 106, 0.35);
}

/* 页脚 */
.site-footer {
  text-align: center;
  padding: 8px 16px 40px;
  color: #6f7d96;
  font-size: 12px;
  line-height: 1.8;
}
.site-footer a { color: #9aa8c2; margin: 0 6px; }
.site-footer a:hover { color: var(--gold2); }

/* ---------- 弹层 ---------- */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  padding: 24px 12px;
  overflow: auto;
}
.modal-mask.open { display: flex; align-items: flex-start; justify-content: center; }
.modal-box {
  width: min(520px, 100%);
  margin: 40px auto;
  background: #121c30;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(212, 175, 88, 0.25);
  background: linear-gradient(90deg, rgba(232, 197, 106, 0.12), transparent);
}
.modal-hd strong {
  color: var(--gold2);
  font-size: 14px;
  letter-spacing: 0.06em;
}
.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(232, 197, 106, 0.35);
  border-radius: 8px;
  background: transparent;
  color: var(--gold2);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { background: rgba(232, 197, 106, 0.12); }
.modal-box iframe {
  display: block;
  width: 100%;
  height: min(72vh, 640px);
  border: 0;
  background: #0d1528 !important;
  color-scheme: dark;
}

/* ---------- 表单页（iframe / 独立） ---------- */
/* 强制深色底，避免 iframe 默认白底 / 外链 CSS 未加载时露白 */
html.form-html,
html.form-html body,
body.form-page {
  margin: 0 !important;
  min-height: 100% !important;
  height: 100% !important;
  background: #0d1528 !important;
  background-color: #0d1528 !important;
  background-image: none !important;
  color: #eef3ff !important;
}
body.form-page {
  background:
    linear-gradient(180deg, #121c30 0%, #0d1528 45%, #0b1220 100%) !important;
}
.form-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 24px;
  min-height: 100%;
  background: transparent;
}
.form-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(212, 175, 88, 0.25);
  background: linear-gradient(90deg, rgba(232, 197, 106, 0.14), transparent);
}
.form-head h1 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--gold2);
  letter-spacing: 0.08em;
}
.form-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.form-body { padding: 18px 20px 8px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--gold2);
  font-weight: 600;
}
.field label em {
  color: #ff8f8f;
  font-style: normal;
  margin-left: 2px;
}
.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #3a4a66;
  background: #0d1528 !important;
  color: #eef3ff !important;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #6f7d96; }
.field input:focus {
  border-color: #c2a04a !important;
  box-shadow: 0 0 0 1px rgba(232, 197, 106, 0.35);
  background: #152238 !important;
  color: #fff !important;
}
.field .hint {
  margin-top: 5px;
  font-size: 12px;
  color: #6f7d96;
  line-height: 1.5;
}
.form-actions {
  padding: 8px 20px 22px;
}
.form-note {
  margin: 0 20px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(232, 197, 106, 0.08);
  border: 1px solid rgba(232, 197, 106, 0.22);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* 手机侧栏 */
.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
}
.drawer.open { display: block; }
.drawer-panel {
  width: min(78vw, 300px);
  height: 100%;
  background: #121c30;
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  box-shadow: var(--shadow);
}
.drawer-panel p {
  color: #f5e6b8;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: .1em;
}
.drawer-panel a {
  display: block;
  padding: 12px 10px;
  color: var(--text);
  border-bottom: 1px dashed rgba(154, 168, 194, 0.15);
  font-size: 15px;
}

@media (max-width: 860px) {
  .action-grid { grid-template-columns: 1fr; }
  .nav-main { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .hero { padding: 28px 18px; }
}
@media (max-width: 480px) {
  .topbar-inner { height: 56px; }
  .brand span { font-size: 0.95rem; }
  .modal-box iframe { height: min(78vh, 580px); }
}
