/**
 * 檔案路徑: /assets/css/auth.css
 * 功能說明: 認證系統頁面樣式 - 登入、註冊、重置密碼頁面的統一樣式
 * 創建時間: 2025-10-31
 * 階段: 階段四 - 會員系統與前端整合
 * 
 * 適用頁面:
 *   - /pages/auth/login.html
 *   - /pages/auth/register.html
 *   - /pages/auth/reset_password.html
 * 
 * 設計特點:
 *   - 響應式設計（支持手機/平板/桌面）
 *   - 漸變背景
 *   - 卡片式布局
 *   - 平滑過渡動畫
 * 
 * 修改記錄:
 *   - 2025-10-31: 初始創建
 */

/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微軟雅黑', 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ==================== 容器和卡片 ==================== */
.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

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

/* ==================== 頁面頭部 ==================== */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #667eea;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 15px;
}

/* ==================== 表單元素 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

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

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

/* ==================== 按鈕樣式 ==================== */
.btn-primary,
.btn-secondary,
.btn-send-code {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-block {
    width: 100%;
    padding: 14px;
}

.btn-text {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.btn-text:hover {
    color: #5568d3;
}

/* ==================== 驗證碼輸入組 ==================== */
.verification-group .input-with-button {
    display: flex;
    gap: 10px;
}

.verification-group .input-with-button input {
    flex: 1;
}

.verification-group .btn-send-code {
    flex-shrink: 0;
    background: #667eea;
    color: white;
    white-space: nowrap;
    padding: 12px 20px;
}

.verification-group .btn-send-code:hover {
    background: #5568d3;
}

.verification-group .btn-send-code:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ==================== 密碼強度指示器 ==================== */
.password-strength {
    margin-top: 5px;
    font-size: 13px;
}

.password-strength .strength-weak {
    color: #f44336;
}

.password-strength .strength-medium {
    color: #ff9800;
}

.password-strength .strength-strong {
    color: #4caf50;
}

.password-strength .strength-very-strong {
    color: #2196f3;
    font-weight: 600;
}

/* ==================== 表單選項（記住我、忘記密碼） ==================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.remember-me input[type="checkbox"] {
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ==================== 複選框標籤 ==================== */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ==================== 註冊方式切換標籤 ==================== */
.register-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.register-tabs .tab-btn {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.register-tabs .tab-btn:hover {
    background: #ebebeb;
}

.register-tabs .tab-btn.active {
    background: white;
    border-color: #667eea;
    color: #667eea;
}

/* ==================== 註冊表單切換 ==================== */
.register-form {
    display: none;
}

.register-form.active {
    display: block;
}

/* ==================== 消息提示 ==================== */
.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* ==================== 頁腳鏈接 ==================== */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* ==================== 重置密碼步驟指示器 ==================== */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    background: #f0f0f0;
    color: #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.step.completed .step-number {
    background: #4caf50;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #999;
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step.completed .step-label {
    color: #4caf50;
}

/* ==================== 重置密碼步驟內容 ==================== */
.reset-step {
    display: none;
}

.reset-step.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.step-hint {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.step-hint strong {
    color: #667eea;
}

/* ==================== 完成頁面 ==================== */
.complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
    animation: scaleUp 0.5s ease-out;
}

@keyframes scaleUp {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

#step4-complete {
    text-align: center;
}

#step4-complete h3 {
    color: #333;
    margin-bottom: 10px;
}

#step4-complete p {
    color: #666;
    margin-bottom: 30px;
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 26px;
    }
    
    .register-tabs {
        flex-direction: column;
    }
    
    .verification-group .input-with-button {
        flex-direction: column;
    }
    
    .verification-group .btn-send-code {
        width: 100%;
    }
    
    .steps-indicator {
        font-size: 12px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .step-label {
        font-size: 10px;
    }
}