# ===== 随思AI · 登录/注册页主题 =====
/* 只在 /login 和 /register 生效 */

html[data-route^="/login"],
html[data-route^="/register"] {
  background: #070b18;
}
html[data-route^="/login"] body,
html[data-route^="/register"] body {
  background: transparent !important;
  color: #e8edf7;
}

/* ---------- 动态背景 ---------- */
.ws-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1100px 760px at 12% 8%, #16307a 0%, transparent 60%),
    radial-gradient(900px 700px at 88% 12%, #6b2196 0%, transparent 58%),
    radial-gradient(1000px 820px at 52% 106%, #7a1f5c 0%, transparent 62%),
    #070a17;
}
.ws-bg::before,
.ws-bg::after {
  content: "";
  position: absolute;
  width: 58vmax;
  height: 58vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.ws-bg::before {
  background: #4f8cff;
  left: -18%;
  top: -18%;
  animation: wsFloat1 20s ease-in-out infinite alternate;
}
.ws-bg::after {
  background: #a855f7;
  right: -20%;
  bottom: -22%;
  animation: wsFloat2 24s ease-in-out infinite alternate;
}
.ws-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
}
.ws-orb.o1 { width: 24vmax; height: 24vmax; background: #f472b6; left: 55%; top: 8%;  animation: wsFloat3 16s ease-in-out infinite alternate; }
.ws-orb.o2 { width: 18vmax; height: 18vmax; background: #38bdf8; left: 18%; top: 62%; animation: wsFloat2 19s ease-in-out infinite alternate; }
.ws-orb.o3 { width: 14vmax; height: 14vmax; background: #c084fc; left: 72%; top: 66%; animation: wsFloat1 22s ease-in-out infinite alternate; }

@keyframes wsFloat1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(6vw, 5vh, 0) scale(1.15); }
}
@keyframes wsFloat2 {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  100% { transform: translate3d(-7vw, -4vh, 0) scale(0.92); }
}
@keyframes wsFloat3 {
  0%   { transform: translate3d(0, 0, 0) scale(0.95); }
  100% { transform: translate3d(-4vw, 6vh, 0) scale(1.2); }
}

/* 细网格纹理，增加质感 */
.ws-bg .ws-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.9), transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.9), transparent 72%);
}

/* ---------- 布局：居中 ---------- */
html[data-route^="/login"] .container,
html[data-route^="/register"] .container {
  justify-content: center !important;
  align-items: center !important;
  padding-top: 0 !important;
  min-height: 100dvh;
}

/* ---------- 玻璃卡片 ---------- */
html[data-route^="/login"] .container > div:has(form),
html[data-route^="/register"] .container > div:has(form) {
  width: 428px !important;
  max-width: calc(100vw - 32px);
  padding: 40px 36px !important;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  animation: wsIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes wsIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 文案 ---------- */
html[data-route^="/login"] .container h1,
html[data-route^="/register"] .container h1,
html[data-route^="/login"] .container > div:has(form) h2,
html[data-route^="/register"] .container > div:has(form) h2 {
  color: #ffffff;
}
html[data-route^="/login"] .container > div:has(form) h1,
html[data-route^="/register"] .container > div:has(form) h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
html[data-route^="/login"] .container label,
html[data-route^="/register"] .container label {
  color: rgba(232, 237, 247, 0.72) !important;
  font-size: 13px;
}
html[data-route^="/login"] .container a,
html[data-route^="/register"] .container a {
  color: #7dd3fc !important;
  text-decoration: none;
}
html[data-route^="/login"] .container a:hover,
html[data-route^="/register"] .container a:hover {
  color: #bae6fd !important;
}
html[data-route^="/login"] .container p,
html[data-route^="/register"] .container p,
html[data-route^="/login"] .container span,
html[data-route^="/register"] .container span {
  color: rgba(232, 237, 247, 0.72);
}

/* ---------- 输入框 ---------- */
html[data-route^="/login"] .container input,
html[data-route^="/register"] .container input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  height: 46px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
html[data-route^="/login"] .container input:focus,
html[data-route^="/register"] .container input:focus {
  border-color: rgba(125, 211, 252, 0.8) !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}
html[data-route^="/login"] .container input::placeholder,
html[data-route^="/register"] .container input::placeholder {
  color: rgba(232, 237, 247, 0.38) !important;
}

/* ---------- 主按钮 ---------- */
html[data-route^="/login"] .container button[type="submit"],
html[data-route^="/register"] .container button[type="submit"] {
  height: 46px;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(135deg, #4f8cff 0%, #a855f7 55%, #f472b6 100%) !important;
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 12px 30px rgba(79, 140, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
html[data-route^="/login"] .container button[type="submit"]:hover,
html[data-route^="/register"] .container button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 38px rgba(79, 140, 255, 0.5);
}

/* 卡片外品牌字 */
html[data-route^="/login"] .container + * ,
html[data-route^="/login"] header a,
html[data-route^="/register"] header a {
  color: #fff !important;
}

@media (max-width: 640px) {
  html[data-route^="/login"] .container,
  html[data-route^="/register"] .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  html[data-route^="/login"] .container > div:has(form),
  html[data-route^="/register"] .container > div:has(form) {
    width: 100% !important;
    max-width: 100% !important;
    padding: 26px 20px !important;
    border-radius: 20px;
  }
  html[data-route^="/login"] .container > div:has(form) h1,
  html[data-route^="/register"] .container > div:has(form) h1 {
    font-size: 24px;
  }
}
