/* ===== physicssu.tech 登录弹窗 ===== */

/* 弹窗遮罩层 */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: overlayFadeIn 0.3s ease;
}
.login-overlay.active { display: flex; }

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 弹窗主体 */
.login-popup {
  background: linear-gradient(135deg, #0f1f3d 0%, #0a1628 100%);
  border: 1px solid rgba(55, 138, 221, 0.3);
  border-radius: 16px;
  padding: 0;
  width: 420px;
  max-width: 92vw;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(55, 138, 221, 0.15);
  animation: popupSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 弹窗头部 */
.login-popup-header {
  text-align: center;
  padding: 32px 28px 20px;
  background: linear-gradient(180deg, rgba(55, 138, 221, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(55, 138, 221, 0.15);
}
.login-popup-header .popup-logo {
  font-size: 28px;
  margin-bottom: 8px;
}
.login-popup-header .popup-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}
.login-popup-header .popup-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin: 4px 0 0;
}

/* 关闭按钮 */
.login-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}
.login-popup-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 弹窗内容区 */
.login-popup-body {
  padding: 24px 28px 28px;
}
.login-popup-body .form-group {
  margin-bottom: 18px;
}
.login-popup-body .form-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-bottom: 6px;
  display: block;
}
.login-popup-body .form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(55, 138, 221, 0.25);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}
.login-popup-body .form-input:focus {
  border-color: #378ADD;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.15);
}
.login-popup-body .form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* 登录按钮 */
.login-popup-body .login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #185FA5, #378ADD);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  margin-top: 4px;
}
.login-popup-body .login-btn:hover {
  background: linear-gradient(135deg, #378ADD, #5aa0e8);
  box-shadow: 0 4px 20px rgba(55, 138, 221, 0.4);
}
.login-popup-body .login-btn:active {
  transform: scale(0.98);
}
.login-popup-body .login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 错误消息 */
.login-popup-body .login-error {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ff6b7a;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.login-popup-body .login-error.show { display: block; }

/* 注册链接 */
.login-popup-body .login-footer {
  text-align: center;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}
.login-popup-body .login-footer a {
  color: #378ADD;
  text-decoration: none;
  margin-left: 4px;
}
.login-popup-body .login-footer a:hover {
  color: #5aa0e8;
  text-decoration: underline;
}

/* 登录成功状态条 */
.login-status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(135deg, #0f1f3d, #0a1628);
  border-bottom: 1px solid rgba(55, 138, 221, 0.2);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 9999;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}
.login-status-bar.active { display: flex; }
.login-status-bar .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-status-bar .user-info .user-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #185FA5, #378ADD);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.login-status-bar .home-btn {
  background: rgba(55, 138, 221, 0.1);
  border: 1px solid rgba(55, 138, 221, 0.3);
  color: #5aa0e8;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  margin-right: 10px;
}
.login-status-bar .home-btn:hover {
  background: rgba(55, 138, 221, 0.2);
  border-color: rgba(55, 138, 221, 0.5);
  color: #7bb6f0;
}
.login-status-bar .admin-btn {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #ffc107;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  margin-right: 10px;
}
.login-status-bar .admin-btn:hover {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.5);
  color: #ffd54f;
}
.login-status-bar .logout-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.login-status-bar .logout-btn:hover {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
  color: #ff6b7a;
}

/* 响应式 */
@media (max-width: 480px) {
  .login-popup {
    width: 95vw;
    border-radius: 12px;
  }
  .login-popup-header { padding: 24px 20px 16px; }
  .login-popup-body { padding: 20px; }
}
