/* sheet.css - 半屏抽屉 / Apple 授权 / Lottie 通用 / Toast / 成功页 */

/* === Loading 动画 === */
.loading-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  margin: 0 3px;
  animation: dotBounce 1.4s infinite ease-in-out both;
}
.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* === Toast === */
.toast {
  position: absolute;
  top: 100px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: all 0.3s;
  z-index: 200; white-space: nowrap;
  backdrop-filter: blur(20px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.register-page .toast { background: rgba(0,0,0,0.8); }

/* === Lottie 容器 === */
.lottie-container {
  width: 260px;
  height: 260px;
}
.lottie-container-sm {
  width: 100px;
  height: 100px;
}
.lottie-container svg, .lottie-container-sm svg {
  width: 100% !important;
  height: 100% !important;
}

/* === Lottie Fallback === */
.lottie-fallback {
  width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center;
}
.fallback-logo {
  width: 70px; height: 70px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: pulse 2s ease-in-out infinite;
}
.register-page .fallback-logo {
  background: linear-gradient(135deg, #0a84ff 0%, #0056b3 100%);
}
.fallback-logo svg { width: 36px; height: 36px; fill: #fff; }
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
  50% { transform: scale(1.05); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }
}

/* === 成功动画覆盖层（仅登录/注册页） === */
.register-page .success-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 300;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.register-page .success-overlay.show { opacity: 1; pointer-events: all; }
.register-page .success-overlay lottie-player { width: 120px; height: 120px; }
.register-page .success-text {
  font-size: 18px; font-weight: 600;
  color: #1c1c1e; margin-top: 16px;
  opacity: 0;
  animation: fadeIn 0.4s ease 0.5s forwards;
}

/* ================ 半屏抽屉 - 完善资料 ================ */
.drawer-overlay { position: absolute; inset: 0; z-index: 400; background: rgba(0,0,0,0); pointer-events: none; transition: background 0.35s; }
.drawer-overlay.show { background: rgba(0,0,0,0.4); pointer-events: all; }
.drawer { position: absolute; bottom: 0; left: 0; right: 0; z-index: 401; background: #fff; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); padding: 8px 24px 0; max-height: 85%; overflow-y: auto; }
.drawer.show { transform: translateY(0); }
.drawer-handle { width: 36px; height: 5px; border-radius: 3px; background: #e0e0e0; margin: 0 auto 16px; }
.drawer-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.drawer-nav-title { font-size: 17px; font-weight: 600; color: #1c1c1e; }
.drawer-skip-btn { font-size: 15px; color: #8e8e93; background: none; border: none; cursor: pointer; padding: 4px 0; }
.drawer-skip-btn:active { opacity: 0.5; }
.drawer-form-label { font-size: 13px; font-weight: 600; color: #6e6e73; margin-bottom: 8px; padding-left: 2px; }
.drawer-form-label .required { color: #ff3b30; margin-left: 2px; }
.drawer-input-wrap { display: flex; align-items: center; background: #f5f5f7; border-radius: 12px; padding: 0 14px; height: 50px; margin-bottom: 18px; border: 1.5px solid transparent; transition: border-color 0.2s; }
.drawer-input-wrap:focus-within { border-color: #007aff; background: #fff; }
.drawer-input-wrap input { flex: 1; border: none; background: none; outline: none; font-size: 16px; color: #1c1c1e; height: 100%; }
.drawer-input-wrap input::placeholder { color: #c7c7cc; }
.drawer-phone-wrap .prefix { font-size: 16px; color: #1c1c1e; font-weight: 500; margin-right: 10px; padding-right: 10px; border-right: 1px solid #d1d1d6; }
.drawer-code-row { display: flex; gap: 10px; margin-bottom: 18px; }
.drawer-code-input-wrap { flex: 1; display: flex; align-items: center; background: #f5f5f7; border-radius: 12px; padding: 0 14px; height: 50px; border: 1.5px solid transparent; transition: border-color 0.2s; }
.drawer-code-input-wrap:focus-within { border-color: #007aff; background: #fff; }
.drawer-code-input-wrap input { flex: 1; border: none; background: none; outline: none; font-size: 16px; color: #1c1c1e; height: 100%; letter-spacing: 2px; }
.drawer-send-code-btn { flex-shrink: 0; height: 50px; padding: 0 16px; border: none; border-radius: 12px; font-size: 14px; font-weight: 500; color: #007aff; background: #e8f0ff; cursor: pointer; transition: opacity 0.2s; white-space: nowrap; }
.drawer-send-code-btn:active { opacity: 0.6; }
.drawer-send-code-btn.disabled { color: #8e8e93; background: #f5f5f7; pointer-events: none; }
.drawer-gender-options { display: flex; gap: 10px; margin-bottom: 18px; }
.drawer-gender-option { flex: 1; height: 50px; border-radius: 12px; background: #f5f5f7; border: 1.5px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #1c1c1e; cursor: pointer; transition: all 0.2s; gap: 6px; }
.drawer-gender-option svg { width: 18px; height: 18px; }
.drawer-gender-option.selected { background: #e8f0ff; border-color: #007aff; color: #007aff; font-weight: 600; }
.drawer-gender-option:active { transform: scale(0.97); }
.drawer-confirm-btn { width: 100%; height: 52px; border: none; border-radius: 14px; font-size: 17px; font-weight: 600; color: #fff; cursor: pointer; background: linear-gradient(135deg, #007aff, #0066d6); box-shadow: 0 4px 16px rgba(0,122,255,0.25); transition: transform 0.15s; margin-bottom: 8px; }
.drawer-confirm-btn:active { transform: scale(0.97); }
.drawer-agreement { text-align: center; font-size: 12px; color: #8e8e93; margin-bottom: 30px; line-height: 1.5; }
.drawer-agreement a { color: #007aff; text-decoration: none; }
.drawer-item { opacity: 0; transform: translateY(12px); }
.drawer.show .drawer-item { animation: drawerItemIn 0.4s ease forwards; }
.drawer.show .drawer-item:nth-child(1) { animation-delay: 0.1s; }
.drawer.show .drawer-item:nth-child(2) { animation-delay: 0.15s; }
.drawer.show .drawer-item:nth-child(3) { animation-delay: 0.2s; }
.drawer.show .drawer-item:nth-child(4) { animation-delay: 0.25s; }
.drawer.show .drawer-item:nth-child(5) { animation-delay: 0.3s; }
@keyframes drawerItemIn { to { opacity: 1; transform: translateY(0); } }
