/**
 * 快反神秘客系統 - 美觀登入頁面樣式
 */

/* ==================== 基礎設定 ==================== */
.fms-login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==================== 背景動畫 ==================== */
.fms-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.fms-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 20s infinite ease-in-out;
}

.circle-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.circle-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
  animation-delay: -5s;
}

.circle-3 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(-30px, -20px) scale(1.02);
  }
}

/* ==================== 主容器 ==================== */
.fms-login-main {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
  gap: 3rem;
  align-items: center;
}

/* ==================== 左側區域 ==================== */
.fms-login-left {
  flex: 1;
  color: white;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 品牌區域 */
.fms-brand {
  text-align: center;
}

.fms-logo {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.fms-brand h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.fms-brand p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
  letter-spacing: 2px;
}

/* 金句卡片 */
.fms-quote-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.fms-quote-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fms-quote-icon {
  font-size: 1.5rem;
}

.fms-quote-day {
  font-size: 0.875rem;
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.fms-quote-text {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  font-style: normal;
}

.fms-quote-author {
  font-size: 1rem;
  opacity: 0.9;
  font-style: normal;
  display: block;
  text-align: right;
}

/* 功能列表 */
.fms-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.fms-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  font-size: 0.95rem;
}

.fms-feature-icon {
  font-size: 1.25rem;
}

/* ==================== 右側區域 ==================== */
.fms-login-right {
  flex: 0 0 420px;
}

.fms-login-box {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 模式切換標籤 */
.fms-mode-tabs {
  display: flex;
  gap: 0.5rem;
  background: #f0f0f0;
  padding: 0.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.fms-mode-tabs button {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.fms-mode-tabs button.active {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fms-mode-tabs button:hover:not(.active) {
  color: #333;
}

/* 角色選擇 */
.fms-role-selector {
  margin-bottom: 2rem;
}

.fms-selector-label {
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.fms-role-cards {
  display: flex;
  gap: 0.75rem;
}

.fms-role-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
}

.fms-role-card:hover {
  border-color: var(--role-color);
  transform: translateY(-2px);
}

.fms-role-card.active {
  border-color: var(--role-color);
  background: linear-gradient(135deg, var(--role-color)15 0%, var(--role-color)05 100%);
  box-shadow: 0 4px 15px var(--role-color)30;
}

.fms-role-icon-large {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.fms-role-name {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.fms-role-desc {
  font-size: 0.7rem;
  color: #888;
  text-align: center;
}

/* ==================== 表單樣式 ==================== */
.fms-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.fms-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fms-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fms-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fms-input-icon {
  font-size: 1rem;
}

.fms-form-group input,
.fms-form-group textarea {
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s;
  background: #fafafa;
}

.fms-form-group input:focus,
.fms-form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.fms-form-group input::placeholder,
.fms-form-group textarea::placeholder {
  color: #aaa;
}

.fms-form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* 註冊表單滾動 */
.fms-register-form {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.fms-register-form::-webkit-scrollbar {
  width: 4px;
}

.fms-register-form::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

/* ==================== 按鈕樣式 ==================== */
.fms-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.fms-btn-primary {
  background: linear-gradient(135deg, var(--btn-color, #667eea) 0%, var(--btn-color, #764ba2) 100%);
  color: white;
  box-shadow: 0 4px 15px var(--btn-color, #667eea)40;
}

.fms-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--btn-color, #667eea)60;
}

.fms-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ==================== 提示訊息 ==================== */
.fms-alert {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fms-alert-error {
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.fms-alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.fms-hint {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  margin: 0;
}

/* ==================== 頁腳 ==================== */
.fms-login-footer {
  text-align: center;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 1024px) {
  .fms-login-main {
    flex-direction: column;
    gap: 2rem;
  }

  .fms-login-left {
    text-align: center;
    padding: 1rem;
  }

  .fms-quote-text {
    font-size: 1.25rem;
  }

  .fms-login-right {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  .fms-features {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .fms-login-main {
    padding: 1rem;
  }

  .fms-login-box {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .fms-brand h1 {
    font-size: 2rem;
  }

  .fms-logo {
    font-size: 4rem;
  }

  .fms-role-cards {
    flex-direction: column;
  }

  .fms-role-card {
    flex-direction: row;
    padding: 1rem;
    gap: 1rem;
  }

  .fms-role-icon-large {
    margin-bottom: 0;
  }

  .fms-role-desc {
    display: none;
  }

  .fms-form-row {
    grid-template-columns: 1fr;
  }

  .fms-features {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .fms-feature-item {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== 動畫效果 ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fms-login-box {
  animation: fadeIn 0.5s ease;
}

.fms-quote-card {
  animation: fadeIn 0.7s ease 0.2s both;
}

.fms-features {
  animation: fadeIn 0.9s ease 0.4s both;
}
