/* ==================== 认证模态框样式 ==================== */

.auth-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-in-out;
}

.auth-modal-show {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.auth-modal-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
  color: white;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  margin: 0 0 10px 0;
  font-size: 32px;
  font-weight: bold;
  font-family: 'Didot', serif;
}

.auth-header p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-input-group {
  position: relative;
}

.auth-input-group input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all 0.3s;
  box-sizing: border-box;
}

.auth-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.auth-input-group input:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.auth-error {
  color: #ffeb3b;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  background: rgba(255, 235, 59, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 235, 59, 0.3);
}

.auth-btn {
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  background: white;
  color: #667eea;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Noto Sans SC', sans-serif;
}

.auth-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.auth-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.auth-footer p {
  margin: 0;
}

.auth-footer a {
  color: #ffeb3b;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
  .auth-modal-content {
    padding: 30px 20px;
    margin: 20px;
  }

  .auth-header h2 {
    font-size: 28px;
  }

  .auth-input-group input {
    padding: 12px 15px;
    font-size: 14px;
  }

  .auth-btn {
    padding: 12px 25px;
    font-size: 16px;
  }
}

/* ==================== 登录/注册按钮样式 ==================== */

.auth-button-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.auth-button-group .btn {
  flex: 1;
  max-width: 200px;
}

/* ==================== 用户信息显示 ==================== */

.user-info-display {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info-display .username {
  font-weight: bold;
  font-size: 16px;
}

.user-info-display .logout-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.user-info-display .logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
