/* === 淺色模式（青青草原風格） === */
.user-page-wrapper {
  background: linear-gradient(to bottom right, #d9f2d9, #b5e3b5);
  color: #2f3d2f;
  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(240, 255, 240, 0.9);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(45, 100, 45, 0.35);
  backdrop-filter: blur(10px);
}

.user-page-wrapper h2,
.user-page-wrapper h1 {
  color: #6aad5b;
  text-align: center;
  margin-bottom: 24px;
}

.user-page-wrapper label {
  display: block;
  margin-bottom: 6px;
  color: #4b6a3e;
  font-weight: bold;
}

.user-page-wrapper input.form-control {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #8fcf8c;
  border-radius: 8px;
  color: #2f3d2f;
  margin-bottom: 20px;
}

.user-page-wrapper input.form-control:focus {
  outline: none;
  border-color: #6aad5b;
  box-shadow: 0 0 5px #aadfaa;
}

.user-page-wrapper .btn {
  background: linear-gradient(135deg, #6aad5b, #89cc7c);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  width: 100%;
  font-weight: bold;
  transition: 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-page-wrapper .btn:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.user-page-wrapper .btn-success {
  background: linear-gradient(135deg, #8fcf8c, #b1e6ae);
  color: #2f3d2f;
}

.user-page-wrapper .btn-success:hover {
  filter: brightness(1.1);
}

.user-page-wrapper .btn-danger {
  background: linear-gradient(135deg, #e57373, #f28b82);
  color: #fff;
}

.user-page-wrapper .btn-danger:hover {
  filter: brightness(1.1);
}

.user-page-wrapper .success-message,
.user-page-wrapper .error-message {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.user-page-wrapper .success-message {
  color: #4b6a3e; /* 草地綠 */
}

.user-page-wrapper .error-message {
  color: #b33a3a; /* 微紅棕，柔和錯誤提示色 */
}


.user-page-wrapper a {
  color: #6aad5b;
  text-decoration: none;
}

.user-page-wrapper a:hover {
  text-decoration: underline;
}

.user-page-wrapper .btn .ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
}

.user-page-wrapper .auth-box .text-center,
.user-page-wrapper .auth-box .text-end {
  text-align: center !important;
  margin-top: 15px; /* 往下移動 */
  display: block;
}



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

/* === 登入/註冊結果頁 樣式優化 === */
.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;
}

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

/* === 深色模式（dark-mode 類別啟用） === */
body.dark-mode .user-page-wrapper {
  background: linear-gradient(to bottom right, #0a1c2b, #1a3c5a);
  color: #e6f0fa;
}

body.dark-mode .user-page-wrapper .auth-box {
  background: rgba(10, 28, 43, 0.85);
  box-shadow: 0 0 20px rgba(42, 75, 124, 0.3);
}

body.dark-mode .user-page-wrapper h2,
body.dark-mode .user-page-wrapper h1 {
  color: #e6f0fa;
}

body.dark-mode .user-page-wrapper label {
  color: #a7c0db;
}

body.dark-mode .user-page-wrapper input.form-control {
  background: rgba(0, 0, 0, 0.3);
  border-color: #2a4b7c;
  color: #e6f0fa;
}

body.dark-mode .user-page-wrapper input.form-control:focus {
  border-color: #4a7b9d;
  box-shadow: 0 0 5px #4a7b9d;
}

body.dark-mode .user-page-wrapper .btn {
  background: linear-gradient(135deg, #2a4b7c, #4a7b9d);
  color: #ffffff;
}

body.dark-mode .user-page-wrapper .btn:hover {
  filter: brightness(1.1);
}

body.dark-mode .user-page-wrapper .btn-success {
  background: linear-gradient(135deg, #4c8da2, #6daec7);
  color: #ffffff;
}

body.dark-mode .user-page-wrapper .btn-danger {
  background: linear-gradient(135deg, #c75252, #e57373);
  color: #ffffff;
}

body.dark-mode .user-page-wrapper a {
  color: #a7c0db;
}

body.dark-mode .user-page-wrapper .success-message {
  color: #9bd4e1; /* 淡藍綠，代表成功 */
}

body.dark-mode .user-page-wrapper .error-message {
  color: #f28b82; /* 淺紅色，錯誤風格與按鈕一致 */
}

/* === 密碼強度指示器樣式 === */
.password-strength-indicator,
.password-match-indicator {
  margin: 10px 0 20px 0;
  padding: 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e0e0e0;
}

.strength-title {
  font-weight: bold;
  color: #4b6a3e;
  margin-bottom: 8px;
  font-size: 14px;
}

.strength-requirement {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
  color: #666;
  transition: color 0.3s ease;
}

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

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

.strength-requirement:not(.valid) {
  color: #666;
}

/* 滿足要求的樣式 */
.strength-requirement.valid .check-icon {
  color: #6aad5b;
}

.strength-requirement.valid {
  color: #4b6a3e;
  font-weight: 500;
}

/* 暗色模式 */
body.dark-mode .password-strength-indicator,
body.dark-mode .password-match-indicator {
  background: rgba(45, 55, 65, 0.8);
  border-color: #4a5a6a;
}

body.dark-mode .strength-title {
  color: #a7c0db;
}

body.dark-mode .strength-requirement {
  color: #a0a0a0;
}

body.dark-mode .strength-requirement.valid {
  color: #9bd4e1;
}

body.dark-mode .strength-requirement:not(.valid) .check-icon {
  color: #f28b82;
}

body.dark-mode .strength-requirement.valid .check-icon {
  color: #9bd4e1;
}

/* 密碼顯示/隱藏按鈕美術風格 */
.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: #6aad5b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
}
.toggle-password:hover, .toggle-password:focus {
  opacity: 1;
  color: #388e3c;
  transform: translateY(-50%) scale(1.1);
}
.toggle-password:before {
  content: '🔒';
}
.toggle-password.hidden:before {
  content: '🔓';
}
body.dark-mode .toggle-password {
  color: #9bd4e1;
}
body.dark-mode .toggle-password:hover, body.dark-mode .toggle-password:focus {
  color: #6daec7;
}

/* === 驗證信件樣式（移植自 verification_email.html） === */
.verification-email {
  font-family: 'Segoe UI', 'Noto Sans TC', sans-serif;
  background-color: #d9f2d9;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
}

.verification-email .container {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(240, 255, 240, 0.95);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(45, 100, 45, 0.35);
  backdrop-filter: blur(10px);
}

.verification-email .header {
  text-align: center;
  color: #6aad5b;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: bold;
}

.verification-email .content {
  color: #4b6a3e;
  line-height: 1.6;
  margin-bottom: 30px;
  font-size: 16px;
}

.verification-email .verify-button {
  display: inline-block;
  background: linear-gradient(135deg, #6aad5b, #89cc7c);
  color: white;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 173, 91, 0.3);
}

.verification-email .verify-button:hover {
  background: linear-gradient(135deg, #5a9d4b, #79bc6c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 173, 91, 0.4);
  color: white;
  text-decoration: none;
}

.verification-email .footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #8fcf8c;
  color: #6a8a5d;
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.verification-email .url-box {
  word-break: break-all;
  background-color: rgba(143, 207, 140, 0.2);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #8fcf8c;
  color: #4b6a3e;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

/* 深色模式下的驗證信件樣式 */
body.dark-mode .verification-email {
  background-color: #0a1c2b;
}

body.dark-mode .verification-email .container {
  background: rgba(10, 28, 43, 0.95);
  box-shadow: 0 8px 24px rgba(42, 75, 124, 0.4);
}

body.dark-mode .verification-email .header {
  color: #9bd4e1;
}

body.dark-mode .verification-email .content {
  color: #a7c0db;
}

body.dark-mode .verification-email .verify-button {
  background: linear-gradient(135deg, #2a4b7c, #4a7b9d);
  box-shadow: 0 4px 15px rgba(42, 75, 124, 0.3);
}

body.dark-mode .verification-email .verify-button:hover {
  background: linear-gradient(135deg, #1a3b6c, #3a6b8d);
  box-shadow: 0 6px 20px rgba(42, 75, 124, 0.4);
}

body.dark-mode .verification-email .footer {
  border-top-color: #4a7b9d;
  color: #7a9abf;
}

body.dark-mode .verification-email .url-box {
  background-color: rgba(74, 123, 157, 0.2);
  border-color: #4a7b9d;
  color: #a7c0db;
}
