﻿:root {
  --xinje-blue: #0a5cb8;
  --xinje-blue-deep: #084a96;
  --xinje-blue-soft: rgba(10, 92, 184, 0.08);
  --ink: #1f2733;
  --ink-sub: #6b7686;
  --line: rgba(15, 42, 80, 0.10);
  --glass-bg: rgba(255, 255, 255, 0.32);
  --glass-border: rgba(255, 255, 255, 0.55);
  --radius: 16px;
}

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

html, body { height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 科技线条画布 ---------- */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 页面背景：浅色渐变底 ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: transparent;
}

body {
  background: linear-gradient(135deg, #eef3fa 0%, #e2ebf6 55%, #d8e5f3 100%);
}

/* ---------- 毛玻璃卡片 ---------- */
.glass-card {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 24px 60px rgba(15, 42, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  transition: opacity 0.3s ease;
  overflow: hidden;
}

/* 淡出效果 */
.glass-card.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 左侧品牌区 ---------- */
.brand-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 56px 40px;
  text-align: center;
  background: linear-gradient(160deg, rgba(10, 92, 184, 0.12), rgba(10, 92, 184, 0.03) 60%);
  border-right: 1px solid var(--line);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
}

.brand-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-sub);
}

/* ---------- 右侧登录区 ---------- */
.login-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
}

/* 输入框 */
.field { display: block; margin-bottom: 16px; }
/* hidden 属性优先于任何 display 规则（.field 的 display:block 会覆盖 UA 的 [hidden] 样式） */
.field[hidden], .form-row2[hidden] { display: none !important; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}

.field-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-box:focus-within {
  border-color: var(--xinje-blue);
  box-shadow: 0 0 0 3px var(--xinje-blue-soft);
}

.field-box > svg {
  width: 17px;
  height: 17px;
  color: var(--ink-sub);
  flex-shrink: 0;
}

.field-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
}

/* 覆盖浏览器自动填充的黄色背景 */
.field-box input:-webkit-autofill,
.field-box input:-webkit-autofill:hover,
.field-box input:-webkit-autofill:focus {
 -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
 transition: background-color 0.01s 99999s;
}

.field-box input::placeholder { color: #a6afbc; }

.pwd-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ink-sub);
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}

.pwd-toggle:hover { color: var(--xinje-blue); }
.pwd-toggle svg { width: 17px; height: 17px; }
.pwd-toggle .eye-closed { display: none; }
.pwd-toggle.showing .eye-open { display: none; }
.pwd-toggle.showing .eye-closed { display: block; }

/* 提示语 */
.form-tip {
  min-height: 18px;
  font-size: 12px;
  color: #d4380d;
  margin-bottom: 10px;
}

/* 登录按钮 */
#loginView .btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--xinje-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 6px;
  text-indent: 6px;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 16px rgba(10, 92, 184, 0.28);
}

#loginView .btn-primary:hover { background: var(--xinje-blue-deep); }
#loginView .btn-primary:active { transform: translateY(1px); }

/* 桌面悬浮球下载入口：登录页底部，不干扰登录与注册 */
.desktop-download {
  display: block;
  text-align: center;
  margin-top: 42px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-sub);
}
.desktop-download svg { width: 15px; height: 15px; color: var(--xinje-blue); vertical-align: -3px; }
.desktop-download a { color: var(--xinje-blue); font-weight: 600; text-decoration: none; }
.desktop-download a:hover { text-decoration: underline; }

/* 注册入口 */
.register-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.register-hint {
  font-size: 13px;
  color: var(--ink-sub);
}

#loginView .btn-ghost {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--xinje-blue);
  background: transparent;
  border: 1px solid rgba(10, 92, 184, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

#loginView .btn-ghost:hover {
  background: var(--xinje-blue-soft);
  border-color: var(--xinje-blue);
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translate(-50%, -16px);
  padding: 10px 22px;
  border-radius: 8px;
  background: rgba(31, 39, 51, 0.92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 99;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 参赛选手注册卡片 ---------- */
.register-card {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 24px 60px rgba(15, 42, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  padding: 40px 36px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.register-card.show {
  opacity: 1;
  transform: translateY(0);
}

.register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.register-title {
  font-size: 20px;
  font-weight: 700;
}

.register-back {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--xinje-blue);
  background: transparent;
  border: 1px solid rgba(10, 92, 184, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.register-back:hover {
  background: var(--xinje-blue-soft);
  border-color: var(--xinje-blue);
}

.register-card .btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--xinje-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  text-indent: 3px;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 16px rgba(10, 92, 184, 0.28);
}

.register-card .btn-primary:hover { background: var(--xinje-blue-deep); }
.register-card .btn-primary:active { transform: translateY(1px); }

/* 性别选择 */
.gender-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(10, 92, 184, 0.06);
  border: 1px solid var(--line);
}

.gender-btn {
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sub);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.gender-btn.active {
  background: #fff;
  color: var(--xinje-blue);
  box-shadow: 0 2px 8px rgba(15, 42, 80, 0.12);
}

/* ---------- 移动端：上下堆叠 ---------- */
@media (max-width: 760px) {
  .glass-card { grid-template-columns: 1fr; }

  .brand-pane {
    padding: 36px 24px 28px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    gap: 12px;
  }

  .brand-logo-img { width: 170px; }
  .brand-title { font-size: 21px; }

  .login-pane { padding: 28px 24px 32px; }
  .register-card { padding: 32px 24px; }
}
