/* ========================================
   Login Page - 简约高端可爱登录界面
   ======================================== */

/* 登录遮罩层 - 覆盖整个手机壳 */
.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: linear-gradient(160deg, #fefefe 0%, #fdf8f4 30%, #fef9f5 60%, #fffdfb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.login-overlay.login-hidden {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* 背景装饰 - 柔和浮动粒子 */
.login-bg-decor {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-bg-decor::before {
  content: '';
  position: absolute;
  top: 12%;
  right: 15%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 182, 140, 0.4);
  animation: login-float 4s ease-in-out infinite;
  box-shadow:
    -60px 40px 0 3px rgba(255, 200, 160, 0.25),
    -120px -20px 0 2px rgba(255, 170, 130, 0.2),
    40px 80px 0 4px rgba(255, 210, 180, 0.2),
    -30px 120px 0 2px rgba(255, 190, 150, 0.15),
    80px -40px 0 3px rgba(255, 220, 200, 0.2);
}

.login-bg-decor::after {
  content: '';
  position: absolute;
  bottom: 18%;
  left: 12%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(200, 180, 255, 0.3);
  animation: login-float 5s ease-in-out infinite reverse;
  box-shadow:
    70px -30px 0 3px rgba(210, 190, 255, 0.2),
    30px -80px 0 2px rgba(190, 170, 255, 0.15),
    -40px -50px 0 4px rgba(220, 200, 255, 0.18),
    90px 20px 0 2px rgba(200, 180, 255, 0.12);
}

/* 登录内容容器 */
.login-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: login-content-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo / 品牌标识 */
.login-brand {
  margin-bottom: 40px;
  text-align: center;
}

/* 可爱吐司角色 */
.login-brand__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  position: relative;
  animation: login-toast-bounce 3s ease-in-out infinite;
}

.login-brand__icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(200, 160, 100, 0.15));
}

.login-brand__title {
  font-size: 22px;
  font-weight: 700;
  color: #2c2420;
  letter-spacing: 6px;
  margin: 0;
  animation: login-title-enter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.login-brand__subtitle {
  font-size: 10px;
  color: rgba(44, 36, 32, 0.3);
  letter-spacing: 3px;
  margin-top: 8px;
  text-transform: uppercase;
  font-weight: 500;
  animation: login-title-enter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* 输入区域 */
.login-form {
  width: 100%;
  max-width: 260px;
  animation: login-form-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.login-input-group {
  position: relative;
  margin-bottom: 12px;
}

.login-input {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(44, 36, 32, 0.08);
  border-radius: 14px;
  padding: 0 18px;
  font-size: 14px;
  color: #2c2420;
  text-align: center;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  backdrop-filter: blur(8px);
}

.login-input::placeholder {
  color: rgba(44, 36, 32, 0.25);
  letter-spacing: 1px;
  font-size: 13px;
}

.login-input:focus {
  border-color: rgba(255, 170, 120, 0.5);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 12px rgba(255, 170, 120, 0.1);
}

.login-input.login-input--error {
  border-color: rgba(220, 80, 80, 0.5);
  animation: login-shake 0.4s ease;
}

/* 邀请码输入框特殊样式 */
.login-input.login-input--code {
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 14px;
}

/* 登录按钮 */
.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  background: linear-gradient(135deg, #2c2420 0%, #3d3530 100%);
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 4px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  -webkit-appearance: none;
  box-shadow: 0 4px 16px rgba(44, 36, 32, 0.15);
}

.login-btn:active {
  opacity: 0.9;
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(44, 36, 32, 0.1);
}

.login-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 错误提示 */
.login-error {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(220, 80, 80, 0.8);
  text-align: center;
  min-height: 16px;
  transition: opacity 0.3s ease;
}

/* 注册提示文案 */
.login-tips {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(255, 200, 160, 0.1);
  border: 1px solid rgba(255, 200, 160, 0.15);
  border-radius: 10px;
  font-size: 11px;
  color: rgba(44, 36, 32, 0.5);
  line-height: 1.6;
  text-align: center;
}

/* 登录/注册切换 */
.login-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: rgba(44, 36, 32, 0.35);
}

.login-switch__link {
  color: #2c2420;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1.5px solid rgba(255, 170, 120, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.login-switch__link:hover {
  border-color: rgba(255, 170, 120, 0.8);
}

/* 设备信息 */
.login-device-info {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: rgba(44, 36, 32, 0.12);
  letter-spacing: 1px;
}

/* 锁定状态 */
.login-locked {
  text-align: center;
}

.login-locked__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.login-locked__icon svg {
  width: 100%;
  height: 100%;
}

.login-locked__icon svg rect {
  fill: rgba(44, 36, 32, 0.4);
}

.login-locked__icon svg path {
  stroke: rgba(44, 36, 32, 0.4);
}

.login-locked__text {
  font-size: 13px;
  color: rgba(44, 36, 32, 0.45);
  margin-bottom: 8px;
}

.login-locked__countdown {
  font-size: 28px;
  font-weight: 300;
  color: rgba(44, 36, 32, 0.6);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

/* ============ 动画 ============ */

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@keyframes login-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(1deg); }
  66% { transform: translateY(4px) rotate(-1deg); }
}

@keyframes login-toast-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes login-content-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes login-title-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes login-form-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
