/* LongLoop 登录页（3D 海岸世界 · three.js） —— 独立样式，不依赖 style.css */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.login-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0a1622;
  color: #e8f1fa;
}

/* WebGL 画布铺满；初始化失败时保留 CSS 渐变兜底 */
.login-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.login-page:not(.webgl) {
  background: linear-gradient(to bottom, #0b2740 0%, #16405e 42%, #2e7392 62%, #1c5674 100%);
}

/* 场景暗角：让视线聚向地平线与标题；底部加深保证文字对比度 */
.login-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(0, 0, 0, 0) 42%, rgba(4, 12, 20, 0.34) 100%),
    linear-gradient(to top, rgba(3, 12, 20, 0.62) 0%, rgba(3, 12, 20, 0.28) 22%, rgba(3, 12, 20, 0) 42%);
}

.login-box {
  position: absolute;
  left: 50%;
  bottom: 5.2vh;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  width: min(560px, 92vw);
  animation: login-enter 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-enter {
  from { opacity: 0; transform: translate(-50%, 22px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.login-title {
  margin: 0;
  font-size: clamp(26px, 4.2vw, 40px);
  font-weight: 200;
  letter-spacing: 10px;
  text-indent: 10px;
  color: rgba(242, 248, 255, 0.88);
  cursor: pointer;
  user-select: none;
  transition: color 0.35s, text-shadow 0.35s;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
}
.login-title:hover {
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 2px 34px rgba(150, 210, 255, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.login-input-wrap {
  position: relative;
  margin: 0 auto 22px;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.login-input-wrap.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.login-input-wrap input {
  width: 100%;
  padding: 13px 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(12, 28, 42, 0.34);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}
.login-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 1px;
}
.login-input-wrap input:focus {
  border-color: rgba(160, 215, 255, 0.55);
  background: rgba(16, 36, 54, 0.44);
  box-shadow: 0 0 0 4px rgba(120, 195, 250, 0.1), 0 12px 40px rgba(0, 0, 0, 0.28);
}

.login-error {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #ff9d9d;
  letter-spacing: 0.5px;
}


/* 白天：输入框适配明亮场景，标题保持浅色（底部有暗色渐变托底） */
.login-page.day .login-input-wrap input {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.68);
  color: #12314e;
  box-shadow: 0 12px 36px rgba(20, 60, 90, 0.18);
}
.login-page.day .login-input-wrap input::placeholder { color: rgba(18, 49, 78, 0.46); }
.login-page.day .login-input-wrap input:focus {
  border-color: rgba(36, 120, 170, 0.6);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(80, 160, 210, 0.14), 0 12px 40px rgba(20, 60, 90, 0.22);
}
.login-page.day .login-error { color: #ffb3b3; }
.login-page.day .login-vignette {
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(0, 0, 0, 0) 46%, rgba(20, 50, 72, 0.16) 100%),
    linear-gradient(to top, rgba(8, 26, 42, 0.58) 0%, rgba(8, 26, 42, 0.24) 22%, rgba(8, 26, 42, 0) 42%);
}

@media (max-width: 560px) {
  .login-box { bottom: 4vh; }
  .login-title { letter-spacing: 6px; text-indent: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-box { animation: none; }
  .login-input-wrap { transition: none; }
}
