/* 认证页面专用样式 */

/* 认证容器 */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

/* 步骤指示器 */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 400px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.step-item.active .step-label {
    color: #4facfe;
    font-weight: 500;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 20px;
    margin-top: -20px;
}

/* 认证卡片 */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 400px;
    width: 100%;
}

/* 认证头部 */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 16px;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 认证表单 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 表单组 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 表单行布局 */
.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-row .form-label {
    min-width: 80px;
    flex-shrink: 0;
    margin: 0;
}

.form-row .input-container {
    flex: 1;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 输入容器 */
.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 19px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
}

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #4facfe;
}

/* 验证码容器 */
.captcha-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.captcha-container .input-container {
    flex: 1;
}

.captcha-image {
    width: 120px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.captcha-image:hover {
    border-color: #4facfe;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.2);
    transform: translateY(-1px);
}

.captcha-image:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(79, 172, 254, 0.3);
}

.captcha-placeholder {
    font-size: 12px;
    color: #999;
    text-align: center;
}

.captcha-image canvas {
    border-radius: 6px;
}

.captcha-image::after {
    content: '🔄';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.captcha-image:hover::after {
    opacity: 1;
}

.captcha-hint {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: center;
    line-height: 1.3;
}

/* 错误信息 */
.error-message {
    font-size: 12px;
    color: #ff4757;
    margin-top: 4px;
    display: none;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

/* 复选框样式 */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #4facfe;
    border-color: #4facfe;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    line-height: 1.4;
}

.terms-link {
    color: #4facfe;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.forgot-password {
    color: #4facfe;
    text-decoration: none;
    font-size: 14px;
}

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

/* 认证按钮 */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn.primary-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.auth-btn.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 认证页脚 */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.auth-switch {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.auth-link {
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* 邮箱验证信息 */
.verification-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.verification-email {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.verification-email strong {
    color: #4facfe;
}

.verification-tip {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* 重新发送容器 */
.resend-container {
    text-align: center;
    margin: 16px 0;
}

.resend-btn {
    background: none;
    border: none;
    color: #4facfe;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.3s;
}

.resend-btn:hover {
    color: #3d8bfe;
}

.resend-timer {
    font-size: 14px;
    color: #666;
}

/* 返回上一步按钮 */
.back-step-btn {
    background: none;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-step-btn:hover {
    border-color: #4facfe;
    color: #4facfe;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-container {
        padding: 16px;
    }
    
    .auth-card {
        padding: 24px 20px;
        margin: 0 8px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .auth-subtitle {
        font-size: 13px;
    }
    
    /* 移动端表单行布局调整 */
    .form-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .form-row .form-label {
        min-width: 60px;
        flex-shrink: 0;
        font-size: 13px;
    }
    
    .form-row .input-container {
        flex: 1;
    }
    
    .form-input {
        padding: 17px 14px;
        font-size: 15px;
    }
    
    .captcha-container {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .captcha-image {
        width: 100px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .form-options {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .auth-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .step-indicator {
        margin-bottom: 24px;
    }
    
    .step-line {
        width: 40px;
        margin: 0 15px;
    }
    
    .step-label {
        font-size: 11px;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .auth-btn:hover:not(:disabled) {
        transform: none;
    }
    
    .auth-btn:active:not(:disabled) {
        transform: scale(0.98);
    }
    
    .captcha-image:hover {
        border-color: #e0e0e0;
    }
    
    .captcha-image:active {
        border-color: #4facfe;
    }
}

/* 密码要求提示样式 */
.password-requirements {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
    font-size: 12px;
    color: #999;
    transition: color 0.3s ease;
}

.requirement-icon {
    font-size: 10px;
    width: 12px;
    text-align: center;
    color: #999;
    transition: color 0.3s ease;
}

.requirement-text {
    font-size: 12px;
    color: #999;
    transition: color 0.3s ease;
}

/* 全局错误提示样式 */
.global-error-message {
    margin: 15px 0;
    padding: 12px 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.global-error-message .error-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.global-error-message .error-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.global-error-message .error-text {
    flex: 1;
    line-height: 1.4;
}

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