/* ===== 玻璃擬態風格 - 使用者模組 ===== */
/* 統一使用青綠色系 (#64ffda) 配色方案 */

/* === 淡入動畫 === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  }
  50% {
    box-shadow: 0 8px 32px rgba(100, 255, 218, 0.3);
  }
}

/* === 主容器 === */
.user-page-wrapper {
  background: transparent; /* 讓星空背景透過 */
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Segoe UI', 'Noto Sans TC', sans-serif;
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* === 認證框 - 玻璃擬態設計 === */
.user-page-wrapper .auth-box {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(100, 255, 218, 0.3);
  border-radius: 25px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.user-page-wrapper .auth-box:hover {
  border-color: rgba(100, 255, 218, 0.5);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* === 標題樣式 === */
.user-page-wrapper h2,
.user-page-wrapper h1 {
  color: #64ffda;
  text-align: center;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
  font-weight: 600;
}

/* === 表單標籤 === */
.user-page-wrapper label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.9rem;
}

/* === 玻璃擬態輸入框 === */
.user-page-wrapper input.form-control {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.user-page-wrapper input.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.user-page-wrapper input.form-control:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(100, 255, 218, 0.4);
}

.user-page-wrapper input.form-control:focus {
  outline: none;
  background: rgba(100, 255, 218, 0.1);
  border-color: rgba(100, 255, 218, 0.6);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1),
              0 0 15px rgba(100, 255, 218, 0.2);
  color: #ffffff;
}

/* === 玻璃擬態按鈕 === */
.user-page-wrapper .btn {
  background: linear-gradient(135deg, 
    rgba(100, 255, 218, 0.3), 
    rgba(100, 255, 218, 0.2));
  backdrop-filter: blur(10px);
  border: 2px solid rgba(100, 255, 218, 0.5);
  border-radius: 25px;
  color: #64ffda;
  padding: 12px 24px;
  width: 100%;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-shadow: 0 0 5px rgba(100, 255, 218, 0.3);
}

.user-page-wrapper .btn:hover {
  background: linear-gradient(135deg, 
    rgba(100, 255, 218, 0.4), 
    rgba(100, 255, 218, 0.3));
  border-color: #64ffda;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100, 255, 218, 0.4);
  color: #ffffff;
}

.user-page-wrapper .btn:active {
  transform: translateY(0);
}

/* 成功按鈕變體 */
.user-page-wrapper .btn-success {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.3), 
    rgba(34, 197, 94, 0.2));
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
}

.user-page-wrapper .btn-success:hover {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.4), 
    rgba(34, 197, 94, 0.3));
  border-color: #22c55e;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  color: #ffffff;
}

/* 危險按鈕變體 */
.user-page-wrapper .btn-danger {
  background: linear-gradient(135deg, 
    rgba(239, 68, 68, 0.3), 
    rgba(239, 68, 68, 0.2));
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

.user-page-wrapper .btn-danger:hover {
  background: linear-gradient(135deg, 
    rgba(239, 68, 68, 0.4), 
    rgba(239, 68, 68, 0.3));
  border-color: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

/* === 訊息區域 === */
.user-page-wrapper .success-message,
.user-page-wrapper .error-message {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out;
}

.user-page-wrapper .success-message {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.user-page-wrapper .success-message h1 {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.user-page-wrapper .error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.user-page-wrapper .error-message h1 {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}


/* === 鏈接樣式 === */
.user-page-wrapper a {
  color: #64ffda;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.user-page-wrapper a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(100, 255, 218, 0.5);
}

.user-page-wrapper a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #64ffda;
  transition: width 0.3s ease;
}

.user-page-wrapper a:hover::after {
  width: 100%;
}

/* === 按鈕波紋效果 === */
.user-page-wrapper .btn .ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* === 文字對齊工具類 === */
.user-page-wrapper .auth-box .text-center,
.user-page-wrapper .auth-box .text-end {
  text-align: center !important;
  margin-top: 15px;
  display: block;
}

/* === 登入/註冊結果頁優化 === */
.success-message h1,
.error-message h1 {
  font-size: 28px;
  margin-bottom: 12px;
  color: inherit;
}

.success-message p,
.error-message p {
  font-size: 18px;
  margin-bottom: 24px;
  color: inherit;
  opacity: 0.9;
}

.success-message .btn-success,
.error-message .btn-danger {
  max-width: 240px;
  margin: 0 auto;
  display: block;
}

/* === Alert 訊息框 === */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.4s ease-out;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* === 密碼強度指示器 - 玻璃擬態風格 === */
.password-strength-indicator,
.password-match-indicator {
  margin: 10px 0 20px 0;
  padding: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 255, 218, 0.2);
  transition: all 0.3s ease;
}

.strength-title {
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  font-size: 14px;
}

.strength-requirement {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.check-icon {
  margin-right: 8px;
  font-weight: bold;
  width: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

/* 未滿足要求的樣式 */
.strength-requirement:not(.valid) .check-icon {
  color: #ef4444;
}

.strength-requirement:not(.valid) {
  color: rgba(255, 255, 255, 0.6);
}

/* 滿足要求的樣式 - 使用青綠色 */
.strength-requirement.valid .check-icon {
  color: #64ffda;
  text-shadow: 0 0 5px rgba(100, 255, 218, 0.5);
}

.strength-requirement.valid {
  color: #64ffda;
  font-weight: 500;
}

/* === 深色模式樣式（已移除，統一使用玻璃擬態風格） === */
/* 新設計不需要分離的深色模式，因為玻璃擬態本身就適合深色背景 */

/* === 響應式設計 === */
@media (max-width: 768px) {
  .user-page-wrapper {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .user-page-wrapper .auth-box {
    padding: 30px 20px;
    margin: 0 15px;
  }

  .user-page-wrapper h2,
  .user-page-wrapper h1 {
    font-size: 24px;
  }

  .success-message h1,
  .error-message h1 {
    font-size: 22px;
  }

  .verification-email .container {
    padding: 30px 20px;
  }

  .verification-email .header {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .user-page-wrapper .auth-box {
    padding: 25px 15px;
  }

  .user-page-wrapper input.form-control {
    font-size: 16px; /* 防止iOS自動縮放 */
  }
}

/* === 密碼顯示/隱藏按鈕 === */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.password-wrapper input.form-control {
  padding-right: 45px;
  margin-bottom: 0;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: #64ffda;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
  padding: 0;
}

.toggle-password:hover,
.toggle-password:focus {
  opacity: 1;
  color: #ffffff;
  transform: translateY(-50%) scale(1.2);
  text-shadow: 0 0 8px rgba(100, 255, 218, 0.6);
}

/* === 驗證郵件樣式 - 玻璃擬態風格 === */
.verification-email {
  font-family: 'Segoe UI', 'Noto Sans TC', sans-serif;
  background: transparent;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
}

.verification-email .container {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(100, 255, 218, 0.3);
  padding: 40px;
  border-radius: 25px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  animation: fadeInUp 0.6s ease-out;
}

.verification-email .header {
  text-align: center;
  color: #64ffda;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: bold;
}

.verification-email .content {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 30px;
  font-size: 16px;
}

.verification-email .verify-button {
  display: inline-block;
  background: linear-gradient(135deg, 
    rgba(100, 255, 218, 0.3), 
    rgba(100, 255, 218, 0.2));
  backdrop-filter: blur(10px);
  border: 2px solid rgba(100, 255, 218, 0.5);
  color: #64ffda;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
}

.verification-email .verify-button:hover {
  background: linear-gradient(135deg, 
    rgba(100, 255, 218, 0.4), 
    rgba(100, 255, 218, 0.3));
  border-color: #64ffda;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100, 255, 218, 0.4);
  color: #ffffff;
  text-decoration: none;
}

.verification-email .footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(100, 255, 218, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.verification-email .url-box {
  word-break: break-all;
  background: rgba(100, 255, 218, 0.1);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(100, 255, 218, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

