:root {
  --primary: #0d47a1;
  --primary-2: #1976d2;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text: #0f172a;
  --text-2: #64748b;
  --border: #eef2f7;
  --grad: linear-gradient(135deg, #0d47a1, #1976d2);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { text-decoration: none; color: inherit; }

#site-header {
  position: sticky; top: 0; z-index: 100;
}
nav {
  backdrop-filter: blur(12px); background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: auto;
  display: flex; align-items: center; justify-content: space-between; padding: 16px 24px;
}
.logo { font-size: 20px; font-weight: 800; display: inline-block; }
.nav-links { display: flex; gap: 32px; color: var(--text-2); font-size: 14px; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nav-user { color: var(--text-2); font-size: 14px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-login { color: var(--primary); padding: 8px 12px; cursor: pointer; border: 1px solid transparent; border-radius: 8px; transition: border-color .2s; }
.btn-login:hover { border-color: #0d47a1; }
.btn-signup {
  background: #fff; color: #0d47a1;
  border: 1px solid #d0d9e8;
  border-radius: 8px; padding: 9px 18px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-signup:hover { border-color: #0d47a1; color: #0d47a1; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

footer { border-top: 1px solid var(--border); padding: 40px 24px; }
.footer-inner { max-width: 1200px; margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 24px; color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.copyright { color: #94a3b8; font-size: 13px; }
.footer-left { display: flex; flex-direction: column; gap: 10px; }
.footer-qr { display: flex; gap: 18px; }
.qr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.qr-item img { height: 100px; width: auto; border-radius: 8px; border: 1px solid #eef2f7; background: #fff; }

.page { flex: 1; }
.page.center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.page.pad { padding: 24px 24px 40px; }


.btn:disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.btn:hover:disabled, .btn:hover[disabled] { border-color: #d0d9e8; }

#dpToastBox {
  position: fixed; top: 84px; right: 20px; z-index: 1100;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
@media (max-width: 640px) {
  #dpToastBox { top: auto; bottom: 18px; left: 12px; right: 12px; max-width: none; align-items: center; }
}
.dp-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; color: var(--text);
  box-shadow: 0 12px 30px rgba(15,23,42,.12); animation: dpToastIn .18s ease-out;
  white-space: pre-wrap; word-break: break-word;
}
.dp-toast.ok { border-left-color: #22c55e; }
.dp-toast.err { border-left-color: #ef4444; }
.dp-toast.info { border-left-color: var(--primary); }
.dp-toast .dp-toast-icon { font-weight: 800; }
.dp-toast.ok .dp-toast-icon { color: #22c55e; }
.dp-toast.err .dp-toast-icon { color: #ef4444; }
.dp-toast.info .dp-toast-icon { color: var(--primary); }
.dp-toast .dp-toast-close {
  margin-left: auto; border: none; background: none; color: #94a3b8;
  cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px;
}
@keyframes dpToastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

#dpModalMask {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(15,23,42,.45);
}
#dpModalMask.show { display: flex; }
.dp-modal {
  width: 100%; max-width: 430px; background: #fff; border-radius: 16px;
  padding: 22px 22px 16px; box-shadow: 0 24px 60px rgba(15,23,42,.28);
  animation: dpModalIn .18s ease-out; max-height: calc(100vh - 40px); overflow: auto;
}
@keyframes dpModalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dp-modal h3 { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.dp-modal p { font-size: 13.5px; color: #334155; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.dp-modal .dp-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dp-modal button {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid #d0d9e8; background: #fff; color: var(--primary);
}
.dp-modal button:hover { border-color: var(--primary); }
.dp-modal button.dp-ok { background: var(--grad); border-color: transparent; color: #fff; }
.dp-modal button.dp-ok.danger { background: #ef4444; border-color: #ef4444; }
.dp-modal button:focus-visible { outline: 2px solid rgba(13,71,161,.35); outline-offset: 2px; }

#dpCaptchaMask {
  position: fixed; inset: 0; z-index: 1100; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(15,23,42,.55);
}
#dpCaptchaMask.show { display: flex; }
.dp-captcha { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.dp-captcha input {
  flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid #e2e8f0;
  border-radius: 8px; font-size: 15px; letter-spacing: 2px; outline: none;
}
.dp-captcha input:focus { border-color: var(--primary); }
.dp-captcha img {
  flex: 0 0 auto; width: 120px; height: 40px; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #f8fafc; cursor: pointer;
}
.dp-captcha-err { font-size: 12.5px; color: #ef4444; margin-top: 8px; min-height: 16px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 24px; gap: 16px;
    box-shadow: 0 12px 24px rgba(15,23,42,.08);
  }
}
