/* ── OSSD PLUS Login Page Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --maple: #e63946;
  --maple-dark: #c1121f;
  --teal: #2ec4b6;
  --gold: #ffd60a;
  --navy: #0d1b2a;
  --navy-card: #112136;
  --navy-light: #1a2e45;
  --border: #1e3a55;
  --text: #e8f0f7;
  --text-dim: #7a9cb8;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,.45);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 背景动效 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 20% 30%, rgba(230,57,70,.08) 0%, transparent 70%),
    radial-gradient(ellipse 600px 800px at 80% 70%, rgba(46,196,182,.06) 0%, transparent 70%);
  pointer-events: none;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* Logo 区域 */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .maple-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 10px;
  animation: float 3s ease-in-out infinite;
}
.login-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .5px;
}
.login-logo .subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 登录卡片 */
.login-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.tab-group {
  display: flex;
  gap: 4px;
  background: var(--navy-light);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}
.tab-btn {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.tab-btn.active {
  background: var(--maple);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230,57,70,.4);
}

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  border-color: var(--maple);
  box-shadow: 0 0 0 3px rgba(230,57,70,.12);
}
.form-input::placeholder { color: #4a6a85; }

/* 按钮 */
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--maple), var(--maple-dark));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(230,57,70,.4); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* 提示信息 */
.msg-error {
  background: rgba(230,57,70,.1);
  border: 1px solid rgba(230,57,70,.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ff8c94;
  margin-top: 12px;
  display: none;
}
.msg-error.show { display: block; }
.msg-success {
  background: rgba(46,196,182,.1);
  border: 1px solid rgba(46,196,182,.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--teal);
  margin-top: 12px;
  display: none;
}
.msg-success.show { display: block; }

/* 分割线 */
.divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin: 20px 0;
  position: relative;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

/* 加载动效 */
.spinner-sm {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.btn-login.loading .spinner-sm { display: block; }
.btn-login.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 底部提示 */
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-dim);
}

/* 注册成功提示 */
.register-success {
  text-align: center;
  padding: 24px 0;
}
.register-success .icon { font-size: 48px; margin-bottom: 12px; }
.register-success h3 { font-size: 18px; margin-bottom: 8px; }
.register-success p { font-size: 13px; color: var(--text-dim); }
