/* ============================================================
   auth.css — VEVED 用戶認證系統 (Glassmorphism)
   ============================================================ */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.auth-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  color: #fff;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.auth-modal-overlay.show .auth-box {
  transform: translateY(0);
}

.auth-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.auth-close-btn:hover {
  opacity: 1;
}

.auth-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  opacity: 1;
  border-bottom: 2px solid #6b8cff;
  font-weight: bold;
}

.auth-form-group {
  margin-bottom: 15px;
  text-align: left;
}

.auth-form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.auth-input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

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

.auth-input:focus {
  border-color: #6b8cff;
}

.auth-btn-primary {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: #6b8cff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.auth-btn-primary:active {
  transform: scale(0.98);
}

.auth-btn-primary:hover {
  background: #5a7be6;
}

.auth-btn-primary:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.7;
}

.auth-error-msg {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  min-height: 20px;
}

.auth-success-msg {
  color: #4CAF50;
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  min-height: 20px;
}

/* User Profile Badge (Top Right) */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.user-profile-badge:hover {
  background: rgba(0, 0, 0, 0.7);
}

.user-profile-badge .coins {
  color: #FFD700;
  font-weight: bold;
}
