/* ================= 基础样式 ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* 背景粒子 */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
  pointer-events: none !important;
}

@keyframes float {
  0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* 图标动画 */
@keyframes icon-draw {
  0% { stroke-dashoffset: 100; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

/* 图标颜色 */
.icon-board { color: #5B8FF9; }
.icon-school { color: #5AD8A6; }
.icon-star { color: #F6BD16; }
.icon-pin { color: #E8684A; }
.icon-clock { color: #5D7092; }
.icon-paper { color: #9270CA; }

/* 提示 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 工具类 */
.spacer { flex: 1 1 auto; }

/* 登录覆盖层 */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(12px);
  z-index: 9000;
  padding: 16px;
}

.login-card {
  background: rgba(30, 41, 70, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 32px 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.login-card h2 {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
  box-sizing: border-box;
}

.login-card input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.login-card input:focus {
  border-color: #6366f1;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.login-card button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s, opacity .2s;
  margin-top: 6px;
  box-sizing: border-box;
}

.login-card button:hover:not(:disabled) { transform: translateY(-1px); opacity: 0.92; }
.login-card button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 跳过按钮：次要样式 */
#loginSkip {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  margin-top: 10px;
}
#loginSkip:hover:not(:disabled) {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.85);
  opacity: 1;
}

.login-error {
  min-height: 18px;
  margin: -4px 0 8px;
  font-size: 13px;
  color: #ef4444;
  text-align: center;
}

@media (max-width: 420px) {
  .login-card { padding: 22px 18px 18px; }
}
