/* ══════════════════════════════════════════════════════════════
   IMC MediaBrain — 公共样式
   所有页面共享的 CSS 变量、基础排版、登录/注册/重置密码 UI
   ══════════════════════════════════════════════════════════════ */

/* ── CSS 变量 ── */
:root {
  --bg: #08131d;
  --panel: rgba(10, 24, 37, 0.78);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef6fb;
  --muted: #9bb0bf;
  --accent: #4ed9c8;
  --warm: #ffbf69;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --font-sans: "Segoe UI Variable Display", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(78, 217, 200, 0.16), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(255, 191, 105, 0.15), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(35, 84, 130, 0.4), transparent 40%),
    linear-gradient(180deg, #07111a 0%, #0b1824 45%, #09131d 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 90%);
  pointer-events: none;
  opacity: 0.35;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* ── Hero badge（登录卡片品牌标识） ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(78, 217, 200, 0.32);
  background: rgba(78, 217, 200, 0.08);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pulse-dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(78, 217, 200, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(78, 217, 200, 0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(78, 217, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 217, 200, 0); }
}

/* ── 登录 Overlay ── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 10% 10%, rgba(78, 217, 200, 0.16), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(255, 191, 105, 0.15), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(35, 84, 130, 0.4), transparent 40%),
    linear-gradient(180deg, #07111a 0%, #0b1824 45%, #09131d 100%);
}
.login-overlay.hidden {
  display: none;
}

/* ── 登录卡片 ── */
.login-card {
  width: min(400px, calc(100% - 40px));
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(12px);
  text-align: center;
}
.login-card.wide {
  width: min(460px, calc(100% - 40px));
}
.login-card h2 {
  margin: 18px 0 28px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

/* ── 表单字段 ── */
.login-field {
  margin-bottom: 16px;
  text-align: left;
}
.login-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 12, 18, 0.72);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}
.login-field input:focus {
  border-color: rgba(78, 217, 200, 0.5);
}
.login-field input::placeholder {
  color: var(--muted);
}

.login-field-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.login-field-row .login-field {
  flex: 1;
  margin-bottom: 0;
}

/* ── 验证码行 ── */
.login-captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.login-captcha-row input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 12, 18, 0.72);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}
.login-captcha-row input:focus {
  border-color: rgba(78, 217, 200, 0.5);
}
.login-captcha-row input::placeholder {
  color: var(--muted);
}
.login-captcha-row img {
  height: 45px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── 消息提示 ── */
.login-error {
  color: var(--danger);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  min-height: 30px;
  margin-bottom: 12px;
}
.login-error:not(:empty) {
  padding: 10px 12px;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 10px;
}
.login-success {
  color: var(--accent);
  font-size: 14px;
  min-height: 22px;
  margin-bottom: 12px;
}
.login-info {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── 提交按钮 ── */
.login-submit {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(78, 217, 200, 0.32), rgba(18, 178, 163, 0.22));
  border: 1px solid rgba(78, 217, 200, 0.3);
  color: #e9fffb;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(78, 217, 200, 0.42), rgba(18, 178, 163, 0.32));
}
.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── 发送验证码按钮 ── */
.login-send-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(78, 217, 200, 0.15);
  border: 1px solid rgba(78, 217, 200, 0.25);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 16px;
}
.login-send-btn:hover:not(:disabled) {
  background: rgba(78, 217, 200, 0.25);
}
.login-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 底部链接 ── */
.login-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  font-size: 0.85rem;
}
.login-links a {
  color: var(--muted);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
  text-decoration: none;
}
.login-links a:hover {
  opacity: 1;
  color: var(--accent);
}
