/* public/auth.css */

/* 1. 页面背景与布局 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* 布局调整：让 footer 沉底 */
.main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

/* 2. 卡片容器 */
.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.auth-card:hover { transform: translateY(-5px); }
.auth-card.register-mode { max-width: 520px; }

/* 3. 标题与Logo */
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h1 { color: #007bff; font-size: 28px; margin: 0 0 10px 0; font-weight: 800; letter-spacing: -0.5px; }
.auth-header p { color: #6c757d; font-size: 14px; margin: 0; }

/* 4. 表单元素美化 */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #344767; font-weight: 600; font-size: 14px; }

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fcfcfc;
}

.form-group input:focus {
    border-color: #007bff;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

/* 5. 密码框与小眼睛 */
.password-wrapper { position: relative; width: 100%; }
.toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: transparent;
}
.toggle-icon:hover { color: #007bff; }

/* 6. 记住账号行 */
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 14px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; color: #555; user-select: none; }
.checkbox-label input { margin: 0; cursor: pointer; }
.forgot-link { color: #6c757d; text-decoration: none; }
.forgot-link:hover { color: #007bff; }

/* 7. 按钮美化 */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

/* 8. 底部链接与页脚 */
.auth-footer { text-align: center; margin-top: 25px; font-size: 14px; color: #6c757d; }
.auth-footer a { color: #007bff; text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

.site-footer { margin-top: 40px; text-align: center; font-size: 12px; color: #999; line-height: 1.8; }
.site-footer a { color: #999; text-decoration: none; margin: 0 5px; transition: color 0.2s; }
.site-footer a:hover { color: #555; text-decoration: underline; }

/* 9. 状态提示框 */
.result-message { margin-top: 15px; padding: 12px; border-radius: 6px; font-size: 14px; text-align: center; display: none; }
.result-message.error { background-color: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.result-message.success { background-color: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }

/* 10. 注册页特有 */
.agreement-box { background: #f8f9fa; padding: 15px; border-radius: 8px; border: 1px dashed #dee2e6; font-size: 13px; color: #555; margin-bottom: 20px; }
.agreement-box label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.agreement-box input { margin-top: 3px; }
.hint-box { font-size: 12px; color: #888; margin-top: 4px; display: block; }