/**
 * 金玲巧語 - 認證系統頁面樣式
 * 
 * 文件路径：assets/css/auth.css
 * 版本：V2.0 - 禪意雅韻·蓮華金玲
 * 建立时间：2025/12/11
 * 
 * 適用頁面：
 *   - login.html
 *   - register.html
 *   - reset_password.html
 */

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

body {
    font-family: 'Noto Sans TC', 'PingFang TC', -apple-system, sans-serif;
    background: linear-gradient(135deg, #C77B8E 0%, #9B5A6F 50%, #3D2833 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* 背景裝飾 */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(232, 164, 184, 0.15) 0%, transparent 45%);
    pointer-events: none;
}

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

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 25px 80px rgba(61, 40, 51, 0.4),
        0 0 0 1px rgba(212, 175, 55, 0.2);
    padding: 45px 40px;
    animation: slideUp 0.6s ease-out;
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #D4AF37 20%, 
        #F0D77B 50%, 
        #D4AF37 80%, 
        transparent 100%);
    border-radius: 20px 20px 0 0;
}

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

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

/* Logo圖標 */
.auth-logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8960C 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.auth-header h1 {
    font-family: 'Noto Serif TC', serif;
    color: #C77B8E;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 3px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4A3728;
    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: 14px 16px;
    border: 2px solid #F0E0D8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #FFFAF7;
    color: #4A3728;
}

.form-group input:focus {
    outline: none;
    border-color: #C77B8E;
    box-shadow: 0 0 0 4px rgba(200, 123, 142, 0.1);
    background: white;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #C77B8E 0%, #9B5A6F 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(200, 123, 142, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9B5A6F 0%, #8A5669 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 123, 142, 0.4);
}

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

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

.btn-secondary {
    background: #FDF5F0;
    color: #4A3728;
    border: 2px solid #F0E0D8;
}

.btn-secondary:hover {
    background: #FFF0F3;
    border-color: #C77B8E;
}

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

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

.btn-text:hover {
    color: #9B5A6F;
}

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

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

.verification-group .btn-send-code {
    flex-shrink: 0;
    background: linear-gradient(135deg, #D4AF37 0%, #B8960C 100%);
    color: #3D2833;
    white-space: nowrap;
    padding: 14px 20px;
    font-weight: 600;
    border: 2px solid #F0D77B;
}

.verification-group .btn-send-code:hover {
    background: linear-gradient(135deg, #F0D77B 0%, #D4AF37 100%);
    transform: translateY(-2px);
}

.verification-group .btn-send-code:disabled {
    background: #E8D5A0;
    color: #9B8B7A;
    cursor: not-allowed;
    transform: none;
}

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

.password-strength .strength-weak { color: #C76B6B; }
.password-strength .strength-medium { color: #D4A056; }
.password-strength .strength-strong { color: #5D9B6B; }
.password-strength .strength-very-strong { color: #C77B8E; font-weight: 600; }

/* ==================== 表單選項 ==================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 14px;
}

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

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

.forgot-password {
    color: #C77B8E;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #9B5A6F;
}

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

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

.checkbox-label a {
    color: #C77B8E;
    text-decoration: none;
    font-weight: 500;
}

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

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

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

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

.register-tabs .tab-btn.active {
    background: white;
    border-color: #C77B8E;
    color: #C77B8E;
    box-shadow: 0 2px 8px rgba(200, 123, 142, 0.15);
}

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

/* ==================== 消息提示 ==================== */
.message {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 22px;
    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: #FFF0F0;
    color: #C76B6B;
    border-left: 4px solid #C76B6B;
}

.success-message {
    background: #F0FFF4;
    color: #5D9B6B;
    border-left: 4px solid #5D9B6B;
}

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

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

.auth-footer a:hover {
    text-decoration: underline;
    color: #9B5A6F;
}

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

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

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

.step-number {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    background: #FDF5F0;
    color: #9B8B7A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid #F0E0D8;
}

.step.active .step-number {
    background: linear-gradient(135deg, #C77B8E 0%, #9B5A6F 100%);
    color: white;
    border-color: #C77B8E;
    box-shadow: 0 4px 15px rgba(200, 123, 142, 0.3);
}

.step.completed .step-number {
    background: linear-gradient(135deg, #5D9B6B 0%, #4A8A5A 100%);
    color: white;
    border-color: #5D9B6B;
}

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

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

.step.completed .step-label {
    color: #5D9B6B;
}

/* ==================== 重置密碼步驟內容 ==================== */
.reset-step { display: none; }
.reset-step.active { display: block; animation: fadeIn 0.3s ease-out; }

.step-hint {
    text-align: center;
    margin-bottom: 22px;
    color: #6B5344;
    font-size: 14px;
}

.step-hint strong { color: #C77B8E; }

/* ==================== 完成頁面 ==================== */
.complete-icon {
    width: 85px;
    height: 85px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #5D9B6B 0%, #4A8A5A 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: bold;
    animation: scaleUp 0.5s ease-out;
    box-shadow: 0 6px 20px rgba(93, 155, 107, 0.4);
}

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

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

#step4-complete h3 {
    font-family: 'Noto Serif TC', serif;
    color: #4A3728;
    margin-bottom: 12px;
    font-size: 22px;
}

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

/* ==================== 裝飾元素 ==================== */
.auth-decoration {
    position: absolute;
    font-size: 120px;
    opacity: 0.03;
    color: #C77B8E;
    pointer-events: none;
}

.auth-decoration.top-right {
    top: 20px;
    right: 20px;
}

.auth-decoration.bottom-left {
    bottom: 20px;
    left: 20px;
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 35px 25px;
        border-radius: 16px;
    }
    
    .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: 11px;
    }
    
    .step-number {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .auth-logo-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}