/**
 * 信奥AI - 登录注册页面样式
 * 配套 auth.php 使用
 * 版本: 20260623b
 */

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

:root {
  --bg:         #0a0a10;
  --surface:    #12121a;
  --surface-2:  #1a1a26;
  --border:     #252538;
  --accent:     #818CF8;
  --accent-dim: rgba(129,140,248,0.10);
  --accent-hover: #A5B4FC;
  --text:       #e4e4e7;
  --text-muted: #71717a;
  --text-dim:   #52525b;
  --radius:     12px;
  --radius-sm:  8px;
  --danger:     #F87171;
  --success:    #34D399;
}

html[data-theme="light"] {
  --bg:         #f8f8fb;
  --surface:    #ffffff;
  --surface-2:  #f0f0f5;
  --border:     #e4e4e7;
  --accent:     #4F46E5;
  --accent-dim: rgba(79,70,229,0.08);
  --accent-hover: #4338CA;
  --text:       #18181b;
  --text-muted: #71717a;
  --text-dim:   #a1a1aa;
  --danger:     #DC2626;
  --success:    #059669;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Canvas & Overlay ── */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(10,10,16,0.55);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  pointer-events: none;
}
html[data-theme="light"] #overlay {
  background: rgba(240,240,245,0.72);
}

/* ── Auth Wrap ── */
.auth-wrap {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── Auth Card ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(18,18,26,0.78);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px 32px;
  box-shadow: 0 0 0 1px rgba(79,70,229,0.06),
              0 24px 64px rgba(0,0,0,0.5),
              0 0 40px rgba(79,70,229,0.06);
  animation: cardIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
}
html[data-theme="light"] .auth-card {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 1px rgba(79,70,229,0.06),
              0 24px 64px rgba(0,0,0,0.08),
              0 0 40px rgba(79,70,229,0.04);
}
@keyframes cardIn {
  from { opacity:0; transform: translateY(18px) scale(0.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* ── Logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}
.auth-logo-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(79,70,229,0.5));
}
.auth-logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* ── Alert ── */
.auth-alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 18px;
  border: 1px solid transparent;
  animation: alertIn 0.3s ease;
}
@keyframes alertIn {
  from { opacity:0; transform: translateY(-6px); }
  to   { opacity:1; transform: translateY(0); }
}
.auth-alert.success {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.35);
  color: #6ee7b7;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-alert.success::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(52,211,153,0.3);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
html[data-theme="light"] .auth-alert.success {
  background: rgba(5,150,105,0.08);
  color: #047857;
}
.auth-alert.error {
  background: rgba(248,113,113,0.10);
  border-color: rgba(248,113,113,0.25);
  color: #fca5a5;
}
html[data-theme="light"] .auth-alert.error {
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
}
.auth-alert.info {
  background: var(--accent-dim);
  border-color: rgba(79,70,229,0.25);
  color: #7dd3fc;
}
html[data-theme="light"] .auth-alert.info { color: #0e7490; }
.hidden { display: none !important; }

/* ── Tabs ── */
.auth-tabs {
  position: relative;
  display: flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 2px;
}
.auth-tab {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.2s;
}
.auth-tab.active { color: var(--text); }
.auth-tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--surface);
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
html[data-theme="light"] .auth-tab-indicator {
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.auth-tab-indicator.right { transform: translateX(calc(100% + 2px)); }

/* ── Forms ── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.auth-field input {
  width: 100%; padding: 10px 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.auth-field input::placeholder { color: var(--text-muted); }

/* Password eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-eye {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  padding: 4px; display: flex; align-items: center;
  transition: color 0.15s;
}
.pw-eye:hover { color: var(--text-dim); }

/* ── Submit ── */
.auth-submit {
  margin-top: 6px;
  width: 100%; padding: 11px 0;
  background: linear-gradient(135deg, var(--accent) 0%, #A78BFA 100%);
  border: none; border-radius: 10px;
  color: #fff; font-family: inherit;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  gap: 8px;
  box-shadow: 0 0 14px rgba(79,70,229,0.35), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(79,70,229,0.6), 0 4px 14px rgba(0,0,0,0.35);
}
.auth-submit:active { transform: scale(0.98); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.auth-footer-hint { text-align:center; font-size:13px; color:var(--text-muted); padding-top:4px; }
.auth-link {
  background: none; border: none;
  color: var(--accent); font-family: inherit;
  font-size: inherit; cursor: pointer;
  padding: 0; text-decoration: underline; text-underline-offset: 2px;
}
.auth-link:hover { color: var(--accent-hover); }

/* ── ICP ── */
.auth-beian {
  position: fixed; bottom: 16px;
  left: 0; right: 0; text-align: center;
  font-size: 12px; z-index: 10;
}
.auth-beian a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.auth-beian a:hover { color: var(--accent); }

/* ── Social Proof (首页社交证明) ── */
.social-proof {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
}
.social-proof-item { text-align: center; }
.social-proof-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.social-proof-label { font-size: 10.5px; color: var(--text-muted); }

/* ── 动态插图 ── */
.landing-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0 14px;
}
.landing-illustration svg {
  width: 200px;
  height: 80px;
}
